Talk:Osmxapi

From OpenStreetMap

Jump to: navigation, search

Discuss Osmxapi here:


Contents

data as attachment (HELP!)

I am trying to use a PHP script (based on the ones used by the binary map API) to get data from XAPI for a specific bounding box and content filtering. XAPI appears suitable as it is not limited to 0.25 degrees for the BBox and the OSM API gives you ALL the data when I want very limited subsets. For the first tests I am retrieving just coastline ways for the UK.

The script is working so far but expects the data to be bundled with the HTTP response whereas XAPI delivers it as an attachment in a separate file 'data.osm'. Unfortunately, being a complete PHP novice, I don't know if I can save and access this file using a PHP script.

Is there a way to either get the data included in the body of the response or to tell .../API/0.5/way[...] where the attachment should be saved? --Elvin 15:16, 7 May 2008 (UTC)


other output formats

Any chance of other output formats besides osm xml? Like GeoRSS, KML, GML,... SVG :) --Stefanb 08:25, 27 July 2007 (BST)

Why not use XPath based protocol?

http://www.informationfreeway.org/api/0.5/node[@k='amenity']['@v='hospital']

Oracle has XML capabilities. It should be possible to store XML data directly to the DB. SELECT and INDEX are able to understand XPATH.

Here some examples for PHP: http://www.oracle.com/technology/oramag/oracle/05-jul/o45php.html

--User:Robotnik 22:15, 30 December 2007

Errors

Getting 501 internal server error for http://informationfreeway.org/api/0.5/way[railway=subway] Ojw 10:21, 24 December 2007 (UTC)

No value

How to get objects without a property? For example coutries without Polish name.

http://smxapi.hypercube.telascience.org/api/0.5/node[place='country][name:pl=...

Steelman 19:19, 10 January 2008 (UTC)

Only ways

I think it might be useful to allow download only ways (not referenced nodes). I need it to get highway refs so I can compare them with the official list. Other use could be all kind of way related statistics. Downloaded file can get quite big when referenced nodes are included. --Jttt 19:34, 16 May 2008 (UTC)

UTF8 encoding bug?

Seems that for usernames containing accented characters (like what I got from http://www.informationfreeway.org/api/0.5/way%5bosm:timestamp=2008-01-15T20:52:15Z%5d ), the accents are not properly converted to utf-8, they seem to remain in latin-1 or similar charset.

This of course breaks many software trying to process the data, as they'll choke on the character and bail out ...

--Bilbo 00:29, 8 June 2008 (UTC)

Maximum Response Size

Is there a maximum response size? If so could it be mentioned in the article, perhaps, with some suggestions for how to download multiple sets and merge them into one. It seems that now that New Zealand exceeds 60,000,000 bytes I have no luck downloading it. Perhaps I'm just unlucky, or perhaps there is a limit in place. Karora 22:43, 13 June 2008 (UTC)

Hmmm... looks like something's broken on the server, since I get a ERROR 501: Internal Server Error back. Karora 04:58, 14 June 2008 (UTC)
Yes, I'm getting a 501 error too, and only trying to download a relatively small area. jamjar2906 21:41, 20 July 2008 (UTC)

incomplete data

I downloaded postal_codes of Germany with this url: http://www.informationfreeway.org/api/0.5/*[postal_code=*][bbox=6,47,15,55]. And now I see, data I get is not all that is in database. Data provided here is based on the planet.osm file. I also download Berlin from download.geofabrik.de based also on planet file. Here the data is included (north-east of Berlin). So the error is not on the file. All data which is missing in osmxapi-stream was created before a specific (unknown) date. Any idea why this happen (501 internal server error?) and how this can be fixed in future. --Bahnpirat 14:10, 27 June 2008 (UTC)

wildcards in the value?

hi, it could be userfull to enable the use of wildcards in the value part of the query
eg:

wget http://www.informationfreeway.org/api/0.5/way[name=via*][bbox=9.0556,45.3782,9.2777,45.5585] -O osm_milano_via.osm

in this way i could select just the ways with the name starting with "via" (so i can convert them to "Via") --EdoM (lets talk about it) 08:55, 1 August 2008 (UTC)

Personal tools
recent changes