[OSM-dev] Is there a wrapper application for localosmtoshp application?

Jukka Rahkonen jukka.rahkonen at latuviitta.fi
Wed Jul 31 20:15:25 UTC 2013


Hi,

Why didn't you like the GDAL utility program ogr2ogr? The command to use
for converting OSM points into a point shapefile is
ogr2ogr -f "ESRI Shapefile" osm_points.shp input.osm points

If you want to change the field names you can use the following syntax
ogr2ogr -f "ESRI Shapefile" osm_points.shp input.osm
-sql "select name as alias_name from points"

Edit the osmconf.ini file for selecting the tags you want to include in
the shapefile. Osmconf.ini is a plain text file and GDAL ships with a
template which has helpful comments. Here is a snippet.

# keys to report as OGR fields
attributes=name,barrier,highway,ref,address,is_in,place,man_made
# keys that, alone, are not significant enough to report a node as a OGR
point
unsignificant=created_by,converted_by,source,time,ele
# keys that should NOT be reported in the "other_tags" field
ignore=created_by,converted_by,source,time,ele,note,openGeoDB:,fixme,FIXME
# uncomment to avoid creation of "other_tags" field
#other_tags=no

-Jukka Rahkonen-


amrit karmacharya wrote:
> I need to make shapefiles with custom tags from osm data. I have gone
> through every method in shapefile wiki on osm.
>
> For me the best method is LocalOSMToSHP. It let's me define the file, the
> tags I want and even create alais for column.
>
> The problem is the prog needs to be on same location as the osm file and
> the rules file is not much configurable.
>
> Is there a more friendlier app with the same functions as localosmtoshp.
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>





More information about the dev mailing list