RE: [GRASS5] Re: missing mapinfo support

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

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@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5