[GRASS5] Re: missing mapinfo support
John Gillette
JGillette at rfmd.com
Mon Nov 24 08:23:40 EST 2003
It's been a long time since I did this. I wrote
2 gawk programs to translate mif to Grass ascii
format. See below. You process the file with the
first and then run the result through the second.
(You may have to manually fiddle with the header)
Also, have you tried the GDAL utility ogr2ogr?
http://www.remotesensing.org/gdal/ogr/ogr_utilities.html
I think you should be able to go from
.TAB, .DAT, .MAP, .ID, .IND to shape file
and then do v.in.shape.
John
--------------------------------------
step1:
BEGIN { RS = "Pline" ; FS = "\n" }
#{ print $0}
{ $2 = ("L" substr($2,2)) }
{ print $2 }
{ for (i=3; i<=NF-1; i++) print " " $i }
# strip off Pline statement and add "L"
-------------------------------------
step2:
{ if ($1 == "L") { print $0 } else { print " " $2 " " $1 } }
# swap order except for lines with "L" in them
More information about the grass-dev
mailing list