[GRASS5] Re: missing mapinfo support

Allan Metts ametts2 at mindspring.com
Mon Nov 24 08:30:39 EST 2003


Thanks John! -- I'll give these a try...

Allan


At 08:23 AM 11/24/2003, John Gillette wrote:
>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
>
>_______________________________________________
>grass5 mailing list
>grass5 at grass.itc.it
>http://grass.itc.it/mailman/listinfo/grass5




More information about the grass-dev mailing list