I am using overpass turbo web http://overpass-turbo.eu/#
after typing in
[out:csv(::lat,::lon;false)];
relation(2081626);>;out;
I get already a list of coordinates, under "data" tab
48.0786156 11.5510212
48.0769149 11.5502003
48.0763526 11.5505930
48.0768127 11.5502292
48.0761811 11.5499233
...
How could I plot this list of coordinates on "Map" tab as a route, on the map
try this Overpass XML
<osm-script>
<id-query ref="2081626" type="relation"/>
<union>
<item/>
<recurse type="down"/>
</union>
<print/>
</osm-script>
Related
I have an issue with build-in (non accessible) webMethods Integration Server soapClient service. Somehow it changes the request it should send while processing it, renaming parameter items to item.
what is send to the method:
<request>
<t1>1</t1>
<operation>op</operation>
<service>1</service>
<params>
<count>1</count>
<items>
<key>12</key>
<value>12</value>
</items>
</params>
</request>
what request webmethods sends:
<request>
<t1>1</t1>
<operation>op</operation>
<service>1</service>
<params>
<count>1</count>
<item>
<key>12</key>
<value>12</value>
</item>
</params>
</request>
I'd be grateful for any workaround/idea for a solution.
I see in your example code that you first create an document named "items", then you map this document to a document list named "items". This is not valid. Please note that the pipeline in IntegrationServer is nothing but a key-value map, and the keys must be unique. That is the reason why you still have a single document named "items" instead of a document list. Rename your document to something like "item", and then use appendToDocumentList to add it to the "items" doc list.
I'm trying to figure out if Overpass-API's bbox-query should be returning ways that:
Are entirely enclosed by the box (all nodes are inside the box)
Have at least one node inside the box.
At least one segment intersects with the box (even if no nodes are actually inside it).
The docs suggest that it should do #3.
http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Bounding_box_clauses_.28.22bbox_query.22.2C_.22bounding_box_filter.22.29
A way is found not only if it has a node inside the bounding box but also if it just crosses somewhere the bounding box.
But, in practice I'm seeing that it's basically only #1.
Which is much less useful as that makes it difficult to make sure you've got all the ways which affect your bounding box.
I think I misunderstood. It does seem to return the ways that only intersect, ie #3, even if they have no nodes in the box. But I was confused because in my query I was also getting nodes and doing a union. It doesn't get the nodes for the way so Overpass-Turbo UI can't render the way. By recursing down, it gets the nodes as well and shows what I expect.
I was further confused because I was doing a query for relations as well, which finds many intersecting relations.
For example
<osm-script output="xml" timeout="25"><!-- fixed by auto repair -->
<!-- gather results -->
<union>
<query type="way">
<bbox-query w="-79.39941" s="43.64019" e="-79.39798" n="43.64120"/>
</query>
<query type="node">
<bbox-query w="-79.39941" s="43.64019" e="-79.39798" n="43.64120"/>
</query>
</union>
<union>
<item/>
<recurse type="down"/>
</union>
<!-- print results -->
<print mode="meta" order="quadtile"/>
</osm-script>
This is an example of osm xml:
<node id="1000" ...>
...
<tag k="shop" v="supermarket"/>
</node>
<node id="26999673" ...>
...
<tag k="public_transport" v="station"/>
<tag k="railway" v="station"/>
<tag k="train" v="yes"/>
</node>
I know that "shop", "railway", "station" are poi categories, because I am human. But how can I extract them by script?
You can try this: https://github.com/kiselev-dv/gazetteer it will generate JSON with addresses, and pois also with address. Pois are categorized according to https://github.com/kiselev-dv/osm-doc so you can define your own POI types.
That entirely depends on your interpretation of POI which is a very broad term.
Mappers in OSM are allowed to use any tags they like. Consequently there is no such thing as a POI category. But there are many frequently used tags of which most are documented at the map features wiki page.
I want to query a Wikimedia Commons category and get the count of sub categories and photos in a category.
For example when you look at the web page "Category:Collections of the Brooklyn Museum" in Wikimedia Commons, you get the list of subcategories.
One of the subcategories
European art in the Brooklyn Museum‎ (7 C, 301 F)
has the numbers 7 C and 301 F which means this has 7 categories and 301 images.
How do I query the Wikimedia Commons to get this category and image count information of subcategories?
I tried the following queries
http://commons.wikimedia.org/w/api.php?action=query&list=categorymembers&cmlimit=100&cmtitle=Category:Collections%20of%20the%20Brooklyn%20Museum
which gives me the category members of the category.
I can do an action render query which produces the html representation from which I can scrape the 7 C and 301 F count information.
What query can I use to get this count information without the html scraping?
You can use prop=categoryinfo for this.
For example, the query:
http://commons.wikimedia.org/w/api.php?action=query&prop=categoryinfo&titles=Category:Collections%20of%20the%20Brooklyn%20Museum
returns:
<api>
<query>
<pages>
<page pageid="21253813" ns="14" title="Category:Collections of the Brooklyn Museum">
<categoryinfo size="105" pages="0" files="88" subcats="17" />
</page>
</pages>
</query>
</api>
I am using Overpass API.
I have an issue to find some points of interest (cafes, hospitals, schools) near (around in 100-200 miles) my point. I have only latitude and longitude.
Overpass API gives opportunity to get POIs using your place name. But I don't have it. I have only coordinates.
How can I do that ?
Use the around statement!
<query type="node">
<around lat="..." lon="..." radius="..."/>
<has-kv k="amenity" v="cafe" />
</query>
<print />
Try this example on overpass turbo!