[gdal-dev] SDTS

Frank Warmerdam warmerdam at p...
Fri Jul 13 08:44:56 EDT 2001


Ben Discoe wrote:
> 
> Great to hear that SDTS projection got fixed!
> 
> My next trouble is with using OGR to read SDTS-DLG files. (I'm using the
> version of OGR compiled in that latest GDAL release).
> 
> I downloaded some SDTS-DLG files, which i can load and view correctly in the
> USGS DlgV32 software. OGR seems to load and parse them "mostly correct",
> but i cannot get the feature geometry.
...
> Unfortunately the return from GetGeometryRef is always NULL, although the
> feature count is correct and there are no errors reported.
> 
> Is this functionality known to work in OGR?

Ben,

I am not sure which scale of DLG you were working with, but if I run ogrinfo
against a 1:24000 DLG I get:

warmerda at gdal[176]% ogrinfo -ro HP01CATD.DDF 
INFO: Open of `HP01CATD.DDF'
using driver `SDTS' successful.
1: AHPF (None)
2: AHPT (None)
3: AHDR (None)
4: NP01 (Point)
5: NE01 (Point)
6: NA01 (Point)
7: NO01 (Point)
8: LE01 (Line String)
9: PC01 (Polygon)

Of these layers, the first three (with geometry type None) are pure secondary
attribute tables. You will find the Point, Line String and Polygon layers 
have geometry.

Given an OGRLayer, you can call poLayer->GetDefn()->GetGeomType() to get the
geometry type from the enumeration OGRwkbGeometryType in ogr_geometry.h
(values such as wkbPoint, wkbPoint25D, wkbLineString, wkbLineString25D, etc). 

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list