OpenStreetMap Query Language

Hello,

I am designing customised query language for querying OpenStreet data. For this I need XSD schema for the query language. Do you have XSD for this?

Also do you have other documentation apart from “http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide”.

best,
Aditya

please read

https://help.openstreetmap.org/questions/41078/location-and-use-of-xsd-schema-files

Do you know overpass turbo wizard? http://wiki.openstreetmap.org/wiki/Overpass_turbo/Wizard
Check it out before inventing something new (and most likely more difficult to use :sunglasses: ).

Do you mean an XSD file for Overpass XML query language? Unfortunately, there’s no XSD available, AFAIK.

Hi,

Thanks for your reply.

I see that overpass turbo works quite good in running queries.

However the main objective here is to do OSM data filtering from a given default url base say (http://overpass-api.de/api/interpreter) and then passing a string query at run time to get only desired data in the XMLStream.

A short example for query string would be to specify:

bounding box and then tag filters or node filters and then only get the sorted osm file loaded in the InputStreamreader of a JavaClass. 

I do not see that the overpass turbo returns the filtered osm rather it just points out the query terms in the map. I am currently working with OSMFilter but there I want to specify an XSD file for the query language used by http://overpass-api.de/api/interpreter. But as you said there exists no XSD for the QL. So I need to either write an XSD for the query language myself or try some other url along with querying options for openstreet map (with also xsd file).

Please provide me some suggestions on this.

Best,
Aditya

Hi,

basically, you can send queries directly to Overpass API either as Overpass QL or Overpass XML (see the OSM wiki for details).

Here’s an example query using HTTP GET parameters, which you could also directly use from Java.

http://overpass-api.de/api/interpreter?data=node%5Bamenity%3Ddrinking_water%5D%2846.58600177159869%2C11.674690246582031%2C46.80546464302894%2C12.057495117187498%29%3Bout%20meta%3B

That example returns all nodes in a bounding box with a specific tag. In Overpass Turbo, you can get this link via: http://overpass-turbo.eu/s/gNl → Export → raw data directly from Overpass API.

You can of course also use HTTP POST.

Please read this page for further details: http://overpass-api.de/command_line.html

I’m really not clear on what you need the XSD for. Can you elaborate a bit on that? OSMFilter has no way to deal with XSD files at all.
Are you maybe trying to follow some guide you found on the web? If so, can you please post that as well?

Hi,

Thanks for the quick response.

I will explain you the workflow for our current project.

We need to have XSD for OSM query language and then combine this along with the “openstreet map query” to get a combined XML with data and further apply XSLT transformation to get the apt. OSM query language.

Also, I would like to make one correction, We are using OSM2WORLD for this purpose.

Hope I have made it clear this time.

I’m really struggling with the following statement:

It would be good, if you could refer to commonly used terminology, or at least clearly indicate which terms you introduced on your own… e.g. there’s really no such thing as “OSM query language” in general OSM-lingo.

Also, if possible please try to explain your ideas in a more natural language. I found it very hard to figure out what you’re trying to do, as you provide little to no overall context.

Something like "We want to have a 3D view of OpenStreetMap, but want to limit our view to certain kinds of buildings, … we looked at OSM2World, … We thought about some new language to faciliate xyz " or the like.

As I’m running out of ideas, maybe someone else can fill in here…