Re: [OSM-talk] features of a given type within bounding box

2010-04-19 Thread Dan Yamins
> Well, you should try .../api/0.6/*[... (notice the *) to get also ways and
> relations, which contain the tag "addr:postcode".


http://osmxapi.hypercube.telascience.org/api/0.6/*[addr:postcode][bbox=-74,40,-72,42]



> Some users tag the address
> information to the buildings and those are ways... And second point is,
> -74.25,40.4,-73.7,40.9 is the bounding box for NYC, or?


No, I was being liberal in my estimates.But I still think I'm not
communicating my question properly.   What I'm looking for is NOT a list of
addresses.   I'm looking for lists of administrative regions -- be the
states, counties, postal code regions, etc..., and really any of the
boundary files that define the various place levels as recognized by OSM.
So, while


http://osmxapi.hypercube.telascience.org/api/0.6/*[addr:postcode][bbox=-74,40,-72,42]

returns locations that probably contain many of the zip codes in that
bounding box, the results to do NOT contain all the zip codes in that region
(e.g. '11021' is definitely within that box, but is not contained in any
address that is currently in the OSM database.  Even if all the zip codes
_were_ in this list somewhere, since my goes to obtain that list of zip
codes (or states, or whatever) and not speciific addresses, I'd have to do
some serious parsing on the list, -- and anyway, the downloaded thing which
be much larger than what I was looking for to start with, and therefore much
less efficient.

So let me restate my questions better:

1) Does OSM have or not have any facility to obtain as results of an API
call a list of administrative units that intersect a given bounding box,
backed -- presumbly -- by a set of adminstrative-region shapefiles that are
basically comprehensive and complete for the US?

2) If it doesn't have that facility, can someone point me to a service that
might?

Thanks!
Dan



> Have a look at
> 
>
> Greetings, Carsten
>
>
>
> --
> Hier ist mein öffentlicher GPG-Schlüssel:
> http://daswaldhorn.piranho.de/gpg.php
> =
> www.stopptdievorratsdatenspeicherung.de
>
> ___
> talk mailing list
> talk@openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk
>
>
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] features of a given type within bounding box

2010-04-19 Thread Dan Yamins
Try
>
> http://osmxapi.hypercube.telascience.org/api/0.6/node[addr:postcode][bbox=-85,40,-72,47]
>
> Works like a champ.  zip codes got added to the Karlsruhe Schema for
> addressing data.
>  


I see -- that makes -- thank you!

>From looking at the results of those calls it seems like perhaps OSM is
doing something quite different from what I'm looking for.  I was hoping
that, independently of the particular individual locations that people have
posted to the system, the basic administrative units that apply to these
regions would all already have been added.   E.g. that in the US, all
states, counties, and postal code boundary regions would have been
integrated, and then available for bounding-box search.

So for instance, let's say I wanted to have a list of all zip codes in a
given bounding box, is there a way to achieve that?   The call


http://osmxapi.hypercube.telascience.org/api/0.6/node[addr:postcode][bbox=-74,40,-72,42]

clearly does NOT produce the list of all zipcodes in new york city.

Is it accurate to say that OSM does not provide an API call that is even
intended to do this, and that OSM may not even have th relevant underlying
data (e.g. the boundary files for all the basic adminstrative units in the
US)?  If os,  does anyone know of an open source service that _does_ do
this?  Or even an entry-level commerical API service?

Thanks,
Dan




> http://wiki.openstreetmap.org/wiki/Karlsruhe_schema
>
> ___
> talk mailing list
> talk@openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk
>
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


Re: [OSM-talk] features of a given type within bounding box

2010-04-19 Thread Dan Yamins
Thanks Carsten and Ciprian for your quick responses.  I really appreciate
it.

I'm assuming that you both are suggestion that I do something like:

/node[place=county][bbox=W,S,E,N]

This seems like it definitely works.   Thank you for your help!

Is there some way of doing this for US postal_codes as well?  I guess what
I'm asking is:  is there an equivalent of

/node[place=postal_code][bbox=W,S,E,N]

?

Thanks,
Dan


On Mon, Apr 19, 2010 at 11:12 AM, Carsten Gerlach wrote:

> Hi,
>
> Am Montag 19. April 2010 16:57:48 schrieb Dan Yamins:
> > What I would like to do is to be able to limit the request to only return
> > lists of features of a particular type, e.g. county, state or posal code
> --
> > and, consequently, be able to query much larger regions.
>
> have a look at the XAPI, <http://wiki.openstreetmap.org/wiki/Xapi>
>
> Greetings, Carsten
>
>
>
> --
> Hier ist mein öffentlicher GPG-Schlüssel:
> http://daswaldhorn.piranho.de/gpg.php
> =
> www.stopptdievorratsdatenspeicherung.de
>
> ___
> talk mailing list
> talk@openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk
>
>
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk


[OSM-talk] features of a given type within bounding box

2010-04-19 Thread Dan Yamins
I'm trying to determine whether the open Street map API can be used to
extract lists of large high-level geographic features -- e.g. US states,
counties, or postal codes -- within a given bounding box.

As far as I can tell by looking here:
http://wiki.openstreetmap.org/wiki/Map_Features

it seems like the OSM data contains information on all the types of entities
I care about.

On the other hand, the API described here:
http://wiki.openstreetmap.org/wiki/API_v0.6 describes how to get data within
a given bounding box.However, this seems to return _all_ points and ways
within the bounding box, and as a result, the largest boxes I can use is
much smaller than what I need.

What I would like to do is to be able to limit the request to only return
lists of features of a particular type, e.g. county, state or posal code --
and, consequently, be able to query much larger regions.

Is the OSM api capable of this?   If so, is there a place I can read about
how to do it?   If not, could someone point me to a project that might give
this sort of capability? (I'm mostly interest in US data).

Thanks!
Dan
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk