[Xastir] SDTS to shapefile conversion?

Tom Russo russo at bogodyn.org
Mon Jan 3 18:20:01 EST 2005


On Mon, Jan 03, 2005 at 04:25:13PM -0600, we recorded a bogon-computron collision of the <jdw at eng.uah.edu> flavor, containing:
> 
> The contours are in LE01 with the elevation information and some other  
> data.  

> Most of the contours are also in another file.  Other shapefiles  
> are points, consisting of data points at the edge of the area where  
> contour lines end.  One seems to be nothing more than the 4 corner  
> points.  

> Another is high and low points (e.g., mountain tops and  
> sinkhole bottoms).

These are the locations little spot elevation crosses you see on your topo maps.

> With a very simple dbfawk to draw labels and change the color the  
> resulting map looks pretty much like the display of native SDTS data,  
> except:
> 
> - most of the labels are only drawn at the map edges, i.e., when a  
> contour line runs off the map.

I think this is related to the other label-drawing issues we have been 
talking about in private email.  There's a lot of additional processing being
done to determine when to display labels that's not controlled by your
dbfawk file.

> - there is a line outlining the map; the area is in a rectangular box.  
> SAR types may like this, as they know when they're switching quads.  I  
> don't; I'd prefer a smoother transition.

I believe you'll find that these are distinguishable by having null entity
labels.  Even if that's not the case, you can recognize real contour lines
by the entity label "0200200" or "0200201" (for carrying contours, or lines
where several contours have merged at a cliff).  The bounding rectangle
won't have that.

FWIW the other entity labels you'll see in hypsography layers are:
  0200205: bathymetric contour
  0200207: watershed divide
  0200208: closure line
  0200299: processing line
  0200300: spot elevation, less than 3rd order
  0200301: spot elevation, less than 3rd order, not at ground level

Other surveying markers are in the Survey Control layer, so I think that's why
the hypsography layer only shows 3rd order or lower spot elevations.

>  I couldn't find the quad name in any data file.  It may not have been  
> in the SDTS data to begin with.

It is in the IDEN file, and that appears not to be transferred to the shape
files.  You can retrieve that with sdtsdump, a simple program that is getting
increasingly hard to locate.  I last found it at:
ftp://ftp.blm.gov/pub/gis/sdts/dlg/c_code.zip


The .dbf files with no associated shapefile are special information from
the SDTS transfer.  AHDR is a primary attribute table.  In the case of 
hypsography layers, AHPF and AHPT (or AHPR) are DBF versions of attribute 
tables as well.  Since ogr2ogr puts the elevations in the LE01 dbf file
anyway, you can safely ignore these.  Presence of an AHPT module means
the elevations are in feet, AHPR means they're in meters (the STDS DLG3
documentation has two conflicting statements about that, one says AHPR is in 
feet the other that AHPR is meters.  By inspection I can tell you it's
AHPR=meters, AHPT=feet).  AFAICT that's the only way to tell.

For more detail, look at the SDTS DLG3 Transfer Description at 
http://thor-f5.er.usgs.gov/sdts/datasets/tvp/dlg3/dlg3sdts.ps

HTH,
T.

-- 
Tom Russo    KM5VY     SAR502  DM64ux         http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1 http://www.qsl.net/~km5vy/
 "When life gives you lemons, find someone with a paper cut."



More information about the Xastir mailing list