[gdal-dev] SDTS

Frank Warmerdam warmerdam at p...
Sun Jul 15 23:50:50 EDT 2001


Ben Discoe wrote:
> 
> Thanks to your help so far! I've made a lot of great progress.
> 
> The current problem is with getting information out of SDTS DLG with OGR.
> 
> In the "classic" DLG representation, there are "nodes" which are connected
> by "lines". The "lines" connect the nodes, not only via an array of points,
> but they also reference the start and end nodes by index.
> 
> Using OGRLineString in the "Line String" layer, i can get the array of
> points for each line. But, i cannot figure out how to tell which are the
> start and end nodes.
> 
> I tried iterating through the OGRFieldDefn for these features, but none of
> them contain the node information.
> 
> I could try doing a manual lookup of start and end nodes, by comparing the
> (x,y) values at the ends of the lines... but is there a way to get the
> information directly, as one does from a normal DLG?

Ben,

The ENID/SNID (end and start node) information was being discarded. I have
added ENID and SNID attributes on the line features with the integer record
numbers of the end and start node. This doesn't indicate what module (layer)
the nodes come from. If you need the module information too I can add it. 

Note that some other "structural" information is also discarded, such as that
used to build the polygons from the nodes and lines, but I hadn't seen it as
being of much value before. 

I assume you want the start/end nodes to trace the network? 

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