[gdal-dev] Convert multipolygons from OSM

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Convert multipolygons from OSM

lhomme.xavier
Hi 
 I'm trying to extract multipologons from a PBF file  and convert them to a Fgdb or ashapefile  : 

More pricesely , I'm trying to extract waterway on Paris, And I don't succeed to retreive the Seine river. But only some part.

Here is my cmdline  : 

Ogr2ogr -f "FileGDB"   c:\Users\xle\Documents\ArcGIS\idf.gdb -nln waterway -config OSM_CONFIG_FILE myosmconf.ini -skipfailures -overwrite -gt 65536  -dialect SQLITE  -sql "SELECT GEOMETRY, osm_id, waterway as fclass, name from multipolygons where waterway is not null " ile-de-france-latest.osm.pbf



waterway has been added to the myosmconf.ini 

[multipolygons]

# common attributes

# note: for multipolygons, osm_id=yes instantiates a osm_id field for the id of relations

# and a osm_way_id field for the id of closed ways. Both fields are exclusively set.

osm_id=yes

osm_version=no

osm_timestamp=no

osm_uid=no

osm_user=no

osm_changeset=no


# keys to report as OGR fields

attributes=name,type,aeroway,amenity,admin_level,barrier,boundary,building,craft,geological,historic,land_area,landuse,leisure,man_made,military,natural,office,place,shop,sport,tourism,waterway

# keys that should NOT be reported in the "other_tags" field

ignore=area,created_by,converted_by,source,time,ele,note,openGeoDB:,fixme,FIXME

# uncomment to avoid creation of "other_tags" field

#other_tags=no

# uncomment to create "all_tags" field. "all_tags" and "other_tags" are exclusive

#all_tags=yes


Is there some other parameter thaht I should take into account ? 

Or should I try with OSMOSIS to convert first to a OSM file then with Ogr2Ogr as I saw on some blogs ? 



best regards

xle


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: [gdal-dev] Convert multipolygons from OSM

jratike80
lhomme.xavier wrote
Hi
 I'm trying to extract multipologons from a PBF file  and convert them to a
Fgdb or ashapefile  :

More pricesely , I'm trying to extract waterway on Paris, And I don't
succeed to retreive the Seine river. But only some part.

Here is my cmdline  :

Ogr2ogr -f "FileGDB"   c:\Users\xle\Documents\ArcGIS\idf.gdb -nln waterway
-config OSM_CONFIG_FILE myosmconf.ini -skipfailures -overwrite -gt 65536
-dialect SQLITE  -sql "SELECT GEOMETRY, osm_id, waterway as fclass, name
from multipolygons where waterway is not null " ile-de-france-latest.osm.pbf
Hi,

Seine in OSM is quite a complicated thing http://www.openstreetmap.org/relation/962076#map=7/48.515/2.473. For converting all of it into GIS format you must study how it is constructed and think how you can collect all the pieces.

-Jukka Rahkonen-
Reply | Threaded
Open this post in threaded view
|

Re: Convert multipolygons from OSM

lhomme.xavier
Hi
 Thanks.
I just found that I need to add waterway in the closed_ways_are_polygons option in the osmconf.ini

Le 7 févr. 2017 9:05 PM, "jratike80" <[hidden email]> a écrit :
lhomme.xavier wrote
> Hi
>  I'm trying to extract multipologons from a PBF file  and convert them to
> a
> Fgdb or ashapefile  :
>
> More pricesely , I'm trying to extract waterway on Paris, And I don't
> succeed to retreive the Seine river. But only some part.
>
> Here is my cmdline  :
>
> Ogr2ogr -f "FileGDB"   c:\Users\xle\Documents\ArcGIS\idf.gdb -nln waterway
> -config OSM_CONFIG_FILE myosmconf.ini -skipfailures -overwrite -gt 65536
> -dialect SQLITE  -sql "SELECT GEOMETRY, osm_id, waterway as fclass, name
> from multipolygons where waterway is not null "
> ile-de-france-latest.osm.pbf

Hi,

Seine in OSM is quite a complicated thing
http://www.openstreetmap.org/relation/962076#map=7/48.515/2.473. For
converting all of it into GIS format you must study how it is constructed
and think how you can collect all the pieces.

-Jukka Rahkonen-




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-dev-Convert-multipolygons-from-OSM-tp5306803p5306811.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev