From Navit's Wiki
Revision as of 18:23, 2 July 2017 by KaZeR (talk | contribs)
Jump to: navigation, search

Renameing Idea

Creating symlink to the actual file to let navit acces the right file

cd maps/shapefiles/

for i in *.shx; do ln -s $i ${i%.*}.cpg.shx; done
for i in *.shp; do ln -s $i ${i%.*}.cpg.shp; done

for i in *.dbf; do ln -s $i "${i##*.}"dbfmap; done
for i in *.dbf; do ln -s $i "${i##*.}"map; done
for i in *.dbf; do ln -s $i ${filename%.*}dbfmap; done
for i in *.dbf; do ln -s $i ${i%.*}.dbfmap; done #<-- right?!
for i in *.shx; do ln -s $i ${i%.*}.cpg.shx; done
for i in *.shp; do ln -s $i ${i%.*}.cpg.shp; done

Logs about shapefiles until we can write a proper documentation

juin 05 08:07:33 <stem> hello juin 05 08:08:15 <stem> any one worked on shape file ? juin 05 08:09:21 <stem> we are facing problem while using shapefile in navit juin 05 08:10:21 <stem> Can any one help juin 05 08:24:48 <cp15> Stem, what is the problem? juin 05 08:25:10 <cp15> You need to create a .dbfmap file where you define the mapping between shapefile objects and navit objects juin 05 08:25:38 <stem> ya thats the problem juin 05 08:26:04 <stem> how to create the dbfmap file using dbf file juin 05 08:26:14 <stem> actually i ahve dbf file juin 05 08:26:48 <cp15> It should contain something like this: juin 05 08:26:50 <stem> but the problem is to create dbfmap from dbf juin 05 08:26:52 <cp15> OBA=2227 type=poly_park label=${GN} juin 05 08:27:17 <cp15> (separator between OBA=2227 and type=... must be a tab juin 05 08:28:05 <cp15> Which means that all objects which have OBA=2227 in their dbf file are mapped to a poly_park with a label of the gn field of dbf juin 05 08:28:40 <cp15> You can specify multiple keys on the left side, for example juin 05 08:29:05 <cp15> OBA=2227,SUBTYPE=1 type=poly_park label=${GN} juin 05 08:29:26 <cp15> If there are multiple matches the longest one (with the most keys) will be used juin 05 08:29:51 <cp15> Once you get it working, maybe you could document it in our wiki? juin 05 08:32:12 <stem> so you mean to say that dbfmap must be created by us, as you said ... juin 05 08:32:28 <stem> manually... juin 05 08:32:52 <cp15> Since there is no scheme what has to be in the .dbf, yes juin 05 08:33:10 <cp15> You can uncomment the unknown stuff in navit.xml so you will see all objects juin 05 08:33:29 <cp15> Then change the gui to gtk and you can right-click on a object and it will show you the dbf key and values juin 05 08:34:04 <cp15> Then you can add then to the .dbfmap as needed. As soon as you redraw the map the new entries will be used juin 05 08:34:32 <cp15> Ah, and you have to take care to get the right projection. What projection does your shapefile have? juin 05 08:37:56 <stem> GEOGCS["Lat Long WGS84",DATUM["D_WGS_1984",SPHEROID["World Geodetic System of 1984",6378137.0,298.257222932867]],PRIMEM["Greenwich",0.0],UNIT["degree",0.0174532925199433]] juin 05 08:38:19 <stem> this is what projection file reads... juin 05 08:41:17 <cp15> Ok, that is the default juin 05 08:44:20 <stem> For creating dbfmap, should i need to cnsider all the prj , dbf, shp file and then edit those parameters in bdfmap file and feed this to navit juin 05 08:48:10 <stem> do you feel we can use shapefile in navit without any problem or any other tatics to convert shapefile to binfile juin 05 09:53:10 <cp15> stem, you can use maptool to convert shapefiles to navit binfiles, but you need the dbfmap anyways