[OSM-dev] Querying OSM data for a region

Pulkit Bhuwalka pulkit.bosco05 at gmail.com
Mon Nov 10 06:46:21 UTC 2014


Got it. Thanks a lot!


On Mon, Nov 10, 2014 at 1:41 AM, Paul Norman <penorman at mac.com> wrote:

> The database you have created is a PostgreSQL database, and there are
> libraries in most languages for connecting to one.
>
>>
>> Sorry I wasn't clear. I understand that I can use a PostgreSQL driver
>> from any language. I was wondering if there is an OpenStreetMap library/API
>> which provides data access to the database. For instance where I can run
>> queries like "return all nodes with a tag within a geometric bound". I
>> thought there might be one since Mapnik and other services might need
>> similar data access APIs.
>>
> You do this from within the standard PostgreSQL drivers. Additionally,
> after the data has been processed by osm2pgsql, you no longer need to use
> OSM-specific software, but can use non-OSM tools like Mapnik, QGIS, or
> anything that interacts with a PostGIS database.
>
> https://github.com/openstreetmap/osm2pgsql/blob/master/docs/analysis.md
> might help with writing some queries. It focuses more on queries for
> analysis, but should get you started.
>
>  Ok. So all roads and streets should be available in planet_osm_lines and
>> planet_osm_polygons with "highway"/"landuse" or some similar column on. Is
>> there a document which explains these? I want to use the data to 3D render
>> roads, so probably I might need to use planet_osm_roads.
>>
>
> Depending on the classification of roads, you might not find the data in
> the roads table, but it will be in the line table.
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev
>



-- 
Pulkit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20141110/f12a212e/attachment.html>


More information about the dev mailing list