[OSM-newbies] Garmin IMG files / mkgmap (was "Conversational gambit: New to OSM?")

Chris Hunter chunter952 at gmail.com
Wed Oct 7 06:15:04 BST 2009


I have an ESRI shapefile of hiking trails that I've run through Shp2OSM.
I've contacted Cloudmade and they have a rep that's helping me get it
licensed, to import into the main map, but in the meantime I'm trying to
compile it into an IMG (and eventually whatever other GPSr formats are
available) as an example on how to use different OSM tools.

Here's a copy of the Shp2OSM rules files I've built, but when I run the
output trough the default mkgmap rules, it isn't parsing the trails.  I also
tried groundtruth, but it's output crashes MapSource.

Chris

On Tue, Oct 6, 2009 at 6:37 PM, Someoneelse <lists at mail.atownsend.org.uk>wrote:

> Chris Hunter wrote:
> > I still haven't figured out how to roll the Garmin IMG files the way I
> > wanted them despite searching the WIKI for mkgmap documentation.  Could
> > someone point me to a good howto.
>
> When I went through this about a year ago I never found one howto that
> described exactly what I wanted to do, but did manage to cobble
> something together from several sources.  What is it you're trying to do
> that isn't quite working?
>
> Also, just in case you're not aware, there is a mkgmap-dev list here:
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
> As well as describing the current co-operation amongst developers, it
> also describes what does work and what doesn't yet, so might be worth a
> read.
>
> _______________________________________________
> newbies mailing list
> newbies at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/newbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/newbies/attachments/20091007/202f6a91/attachment.html>
-------------- next part --------------
# This is a comma-delimited format.
#
# Field:  Description:
#      1  The shapefile type to match (outer, inner, line, point) (see below)
#      2  The source attribute name to match
#      3  The source attribute value to match. Can be empty to match all values.
#      4  The name of the tag to apply when the source key/value pair match.
#      5  The value of the tag to apply. Use a sinlgle dash ("-") to use the original value.
#
# The shape file types are:
#  outer  = The outer polygon of a MultiPolygon
#  inner  = The inner polygon of a MultiPolygon
#  line   = A line string of a MultiLineString
#  point  = A point of a PointString
#
#outer,FTYPE,StreamRiver,natural,river
#outer,GNIS_Name,,name,-
#line,GNIS_Name,,name,-
#line,FTYPE,CanalDitch,waterway,ditch
#line,FTYPE,StreamRiver,waterway,stream

#Rules for importing State Park boundaries from the MN DNR's Data Deli
outer,FTYPE,,LONG_NAME,-
outer,LONG_NAME,,name,-
outer,PARK_TYPE,,MN-DNR-ParkType,-
outer,PARK_TYPE,State Park,leisure,park
outer,PARK_TYPE,State Recreation Area,landuse,recreation_ground
outer,PGM_PRJ,,MN-DNR-BREM-Program-Project-Code,-
outer,OWN_DATE,,MN-DNR-Ownership-Updated-Date,-
outer,NAME,,attribution,MnDNR Division of Parks and Recreation 
-------------- next part --------------
# This is a comma-delimited format.
#
# Field:  Description:
#      1  The shapefile type to match (outer, inner, line, point) (see below)
#      2  The source attribute name to match
#      3  The source attribute value to match. Can be empty to match all values.
#      4  The name of the tag to apply when the source key/value pair match.
#      5  The value of the tag to apply. Use a sinlgle dash ("-") to use the original value.
#
# The shape file types are:
#  outer  = The outer polygon of a MultiPolygon
#  inner  = The inner polygon of a MultiPolygon
#  line   = A line string of a MultiLineString
#  point  = A point of a PointString
#
#outer,FTYPE,StreamRiver,natural,river
#outer,GNIS_Name,,name,-
#line,GNIS_Name,,name,-
#line,FTYPE,CanalDitch,waterway,ditch
#line,FTYPE,StreamRiver,waterway,stream

#Rules for importing State Park trails from the MN DNR's Data Deli
#Copy raw data
line,PGM_PRJ,,attribution,MnDNR Division of Parks and Recreation
line,TRAIL_NAME,,name,-
line,PGM_PRJ,,MN-DNR-PGM-PRJ-codes,-
line,SHAPE__ID,,MN-DNR-Shape-ID,-
line,TRAIL_USE,,MN-DNR-Trail-Use,-
line,TRAIL_SRC,,MN-DNR-Trail-Source,-
line,TRAIL_DATE,,MN-DNR-Trail-Input-Date,-
line,OWNERSHIP,,MN-DNR-Trail-Owner,-
line,ADMIN,,MN-DNR-Trail-Administrator,-
line,MIN_WIDTH,,MN-DNR-Trail-Min-Width,-
line,SURFACE,,MN-DNR-Trail-Surface,-
line,INTERPRET,,MN-DNR-Interpretive-Trail,-
line,HANDICAP,,MN-DNR-Handicap-Accessibility,-
line,RCVR_TYPE,,MN-DNR-GPSr-Model,-
line,MAX_PDOP,,MN-DNR-GPSr-Accuracy,-

#Convert DNR's Trail Usage tags into OSM format
line,TRAIL_USE,A,highway,path
line,TRAIL_USE,B,highway,path
line,TRAIL_USE,B,foot,designated
line,TRAIL_USE,B,sac_scale,hiking
line,TRAIL_USE,B,trail_visibility,good
line,TRAIL_USE,C,horse,designated
line,TRAIL_USE,D,bicycle,designated
line,TRAIL_USE,E,mountainbike,designated
line,TRAIL_USE,F,ski,designated
line,TRAIL_USE,G,ski,designated
line,TRAIL_USE,H,snowshoe,designated
line,TRAIL_USE,I,snowmobile,designated
line,TRAIL_USE,J,motorcar,designated
line,TRAIL_USE,J,highway,road

#Hiking Club - should have excellent trails through all parks - heavily used and very heavily marked
line,TRAIL_USE,K,sac_scale,hiking
line,TRAIL_USE,K,trail_visibility,excellent
line,TRAIL_USE,K,highway,path

#Codes L, M & S are official use only
line,TRAIL_USE,L,access,forestry
line,TRAIL_USE,L,vehicle,no
line,TRAIL_USE,M,access,official
line,TRAIL_USE,M,vehicle,no
line,TRAIL_USE,S,access,official

#Codes N, O & P are for recreational off-road vehicles - no keys in OSM yet
line,TRAIL_USE,N,atv,designated
line,TRAIL_USE,O,ohv,designated
line,TRAIL_USE,P,motorcycle,designated

#Q=unknown
line,TRAIL_USE,Q,highway,path
#R = rollerblades, again no keys in OSM as of yet
line,TRAIL_USE,R,rollerblade,designated
line,TRAIL_USE,T,highway,path
#U = Winter hiking - no key yet, using default hiking
line,TRAIL_USE,U,sac_scale,hiking
#V = Other
line,TRAIL_USE,V,highway,path
#W = Sidewalk
line,TRAIL_USE,W,highway,footway

#X = abandoned - not using since there is some controversy in the OSM community

line,TRAIL_USE,Y,highway,path
line,TRAIL_USE,Z,highway,construction

#convert width code to metric
line,MIN_WIDTH,1,width,1.5
line,MIN_WIDTH,2,width,3
line,MIN_WIDTH,3,width,4.57
line,MIN_WIDTH,4,width,5

#Convert SURFACE tag to currently approved "tracktype" key and depreciated "surface" key
#Value Domain for Data Element SURFACE:
#1 = Natural Soil surface type - no improvements were made
#10 = Other - other trail surface - usually a one time use
#2 = Sand and/or Gravel are used as the trail surface
#3 = Limestone, etc...
#4 = Asphalt trail surface type
#5 = Concrete trail surface type
#6 = Boardwalk trail surface type
#7 = Plastic
#8 = Wood
#9 = Woodchips trail surface type

line,SURFACE,1,tracktype,grade5
line,SURFACE,1,surface,ground
line,SURFACE,2,tracktype,grade3
line,SURFACE,2,surface,sand
line,SURFACE,3,tracktype,grade4
line,SURFACE,3,surface,unpaved
line,SURFACE,4,tracktype,grade1
line,SURFACE,4,surface,asphalt
line,SURFACE,5,tracktype,grade1
line,SURFACE,5,surface,concrete
line,SURFACE,6,tracktype,grade2
line,SURFACE,6,surface,wood
line,SURFACE,7,tracktype,grade1
line,SURFACE,7,surface,plastic
line,SURFACE,8,tracktype,grade3
line,SURFACE,8,surface,wood
line,SURFACE,9,tracktype,grade3
line,SURFACE,9,surface,compacted
line,SURFACE,10,tracktype,grade5



More information about the newbies mailing list