1

Hi.

I want to have an overview of schools in a specific area (the municipality of Lyngby-Taarbæk, Denmark). If I use Google Maps (which I by all means wish to avoid), I can create my own map showing exactly the POI I need. I don't mind mind sharing my map of these POI. Is there a way that doesn't include installing and figuring out new software?

With regards

Jacob

asked 28 Dec '14, 09:38

Jacobbahn's gravatar image

Jacobbahn
31113
accept rate: 0%

Thanks for the answer. That worked very well. I ran in to two issues though:

1) Some schools of that municipality is apparently not listed. Can I (easily) do that my self?

2) I would appreciate that the names of the schools would show up next to the spot on the map. Is there a simple way?

(28 Dec '14, 11:42) Jacobbahn

2 Answers:
4

To answer all of your questions in one go:

Use this Overpass Query:

[out:json][timeout:25];area(3602183062)->.searchArea;(node["amenity"="school"](area.searchArea);way["amenity"="school"](area.searchArea);relation["amenity"="school"](area.searchArea););out body center;>;out skel qt;
{{style:
    way[amenity] {
      text: name;
    }

    node[amenity] {
      text: name;
    }

   relation[amenity] {
      text: name;
    }

}}

It returns not only schools represented by nodes, but also those represented by ways or relations. The names get displayed by the little Mapcss at the end of the query.

The Vej (or Way) refers to the OSM object that is used to represent the object. It has nothing to do with the physical "street" object on which one drives.

Frederik's query only asked for schools represented by a node, so some of the schools you mention did not appear the answer, as they are represented by (closed) ways.

The query I link to uses a slightly different syntax. This is the new standard language of Overpass, but the XML-format in Frederik's answer is still supported.

Editing is pretty simple. First you have to make an account on openstreetmap.org. Then you see an edit button above the map openstreetmap.org. Follow the tutorial offered by the iD tutorial. You could also read LearnOSM

permanent link

answered 28 Dec '14, 13:29

escada's gravatar image

escada
18.7k16159298
accept rate: 20%

edited 08 Jan '15, 06:29

For a beginner, I would highly recommend to start with overpass turbo wizard. It automatically does all the magic for you, i.e. no need to learn anything new.

Just type: amenity=school in "Lyngby-Taarbæk Kommune" in the wizard dialog on overpass-turbo.eu. You can read all about the wizard here:

http://wiki.openstreetmap.org/wiki/Overpass_turbo/Wizard

It's super simple to use. Just give it a try.

(28 Dec '14, 15:21) mmd
5

There is a query tool that you can use to find the objects in question. It is called "Overpass API" and can be conveniently accessed through the Overpass Turbo web site. Using Overpass to find the schools in Lyngby-Taarbæk requires that you first identify the OSM relation ID of that municipality - 2183062 - and then add 3600000000 to that number to use it in an Overpass query like so:

<osm-script output="json">
  <query type="node">
    <has-kv k="amenity" v="school"/>
    <area-query ref="3602183062"/>
  </query>
  <print mode="body"/>  
</osm-script>

(See it in action directly on Overpass Turbo.)

You can influence the look of the result within certain limits, see http://wiki.openstreetmap.org/wiki/Overpass_turbo/MapCSS. If you want more control over the look of the map, you should have a look at the UMap service which lets you draw stuff on the map and edit it. You can even export the query results from the above Overpass query and import them into UMap for editing, or directly link UMap and Overpass - but then of course you can't manually edit the result.

(Example for an editable UMap with the above data.)

(answer edited to include comments by escada and mmd, thanks!)

permanent link

answered 28 Dec '14, 11:17

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
73.3k866641137
accept rate: 24%

edited 28 Dec '14, 21:23

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×443
×163
×77
×6

question asked: 28 Dec '14, 09:38

question was seen: 3,799 times

last updated: 08 Jan '15, 06:29

powered by OSQA