[GRASS-user] Importing a SDTS/DLG files?
Tom Russo
russo at bogodyn.org
Thu Nov 30 09:19:24 EST 2006
> James McManus wrote:
> ..
> > When I issue the "g.region vect=BHroads" or "v.info BHroads" I get the
> >
> > following error message:
> >
> > ERROR: Cannot open old vector BHroads at PERMANENT on level 2
> >
SDTS files contain several tables with no geometry (OGR calls them "Layers")
that probably confuse v.in.ogr, and also contain point, line, and polygon
features. My guess is that v.in.ogr doesn't quite grok which things it needs
to ignore.
When I do an ogrinfo on an SDTS road file I see:
> ogrinfo TR01CATD.DDF
ERROR 4: SDTS Driver doesn't support update.
Had to open data source read-only.
INFO: Open of `TR01CATD.DDF'
using driver `SDTS' successful.
1: ARDF (None)
2: ARDM (None)
3: AHDR (None)
4: NP01 (Point)
5: NA01 (Point)
6: NO01 (Point)
7: LE01 (Line String)
8: PC01 (Polygon)
I bet if you were to use a "layer=NO01,LE01,PC01" option to v.in.ogr your
woes would go away. In fact, when I try to import the very same SDTS file
above, it worked fine and gave line, point, and polygon features; the vector
map displays Just Fine.
> > >> I would like to try using v.in.dlg. It does not appear to be
> > >> included in grass-6.2.0. Has this routine been discontinued in
> > >> grass-6.2.0?
>
> yes, as (theoretically) there is an OGR solution. You can always install
> GRASS 5.4.0 along side GRASS 6, import it, then run v.convert in GRASS 6
> to get the thing loaded.
There is no longer an equivalent of v.in.dlg in grass 6, as that module read
in the old style "DLG-Optional" format from the USGS. OGR does not support
the DLG-O format and not SDTS, so at this point the DLG-Optional format is
unusable in GRASS, and if you have DLG-O files you have to convert them to
shapefiles with another tool (I use Global Mapper). IIRC, v.in.dlg never
understood SDTS format DLGs from USGS --- in old grass 5.0 you used v.in.sdts
for that (a tool that did understand the various tables in an SDTS file, but
due to the poor attribute support in grass5 had to do some crazy things to try
to accommodate the complex attribute system).
--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"And, isn't sanity really just a one-trick pony anyway? I mean all you get is
one trick, rational thinking, but when you're good and crazy, oooh, oooh,
oooh, the sky is the limit!" --- The Tick
More information about the grass-user
mailing list