Convertendo ESRI Shapefile para OSM

Inicialmente instale o pacote gdal-bin para obter o programa ogr2ogr:

$ sudo apt-get install gdal-bin

Converta para os mapas EPSG:4326 ou WGS84:

$ ogr2ogr -t_srs EPSG:4326 -s_srs "ESRI::SPSOROPCB.prj" "newSPSOROPCB.shp" "SPSOROPCB.shp"

Ou

$ ogr2ogr -t_srs WGS84 -s_srs "ESRI::SPSOROPCB.prj" "newSPSOROPCB.shp" "SPSOROPCB.shp"

Installe o suporte a ShapeFile no perl:

# cpan App::cpanminus

# cpan Geo::ShapeFile

Baixe o script shp2osm.pl :

$ wget http://svn.openstreetmap.org/applications/utils/import/shp2osm/shp2osm.pl

Converta o shapefile para OSM:

$ perl shp2osm.pl newSPSOROPCB > SPSOROPCB.osm

Para visualizar o resultado utilize o JOSM ou outro editor/visualizador para OSM.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s