[Gdal-dev] OGR: SDTS Elevation

Curt, WE7U archer at eskimo.com
Mon Oct 18 11:52:00 EDT 2004


USGS SDTS-format DLG vector contours have field names labeled
"ELEVATION".  Some maps have these in meters, others are in feet.
The difference appears to be whether they have an AHPT layer (feet)
or an AHPR layer (meters).

What is the proper (fast!) way to determine which I have?

Must I run through all the layer names once to determine this?

Should I use GetLayerByName() to see which layer is present first,
then use that to decide whether to draw "ft" or "m" after the
elevation label?

Will any of this slow me down due to accessing layers more than
once, or is this info cached in the driver so that I'm not really
taking a hit?

I'm not sure whether the driver is combining SDTS elements together
into OGR layers so that I get elevation and vectors together in the
layers that I'm drawing, or whether I'm drawing layers as they're
being read from file.  Depending on how that is done it might make a
difference in the techniques to use to determine how to draw things
quickly at the OGR API level.

I'm using the "C" interface.  Speed is very important to us:  This
is a tracking application and we can load a lot of maps at a time to
cover an area, plus if we're tracking a moving object we can be
reloading maps constantly.  The spatial filtering does appear to be
helping so far to keep things fast.

Below is what I'm seeing.  This is one that has elevation in feet,
so it has an AHPT layer.

--
Curt, WE7U			         http://www.eskimo.com/~archer
"Lotto:    A tax on people who are bad at math." -- unknown
"Windows:  Microsoft's tax on computer illiterates." -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"


Layer 0: 'AHPF'
  Field 0: RCID (Integer)
  Field 1: ENTITY_LABEL (String)
  Field 2: SUPPLEMENTARY (String)
  Field 3: AMENDED (String)
  Field 4: APPROXIMATE (String)
  Field 5: DEPRESSION (String)
  Field 6: GLACIER_OR_SNOW (String)
  Field 7: UNDERWATER (String)
  Field 8: BEST_ESTIMATE (String)
  Field 9: SPOT_CATEGORY (String)
  Field 10: PHOTOREVISED (String)
  Field 11: RISE (String)
  Field 12: FILL (String)

Layer 1: 'AHPT'
  Field 0: RCID (Integer)
  Field 1: ELEVATION (Real)

Layer 2: 'AHDR'
  Field 0: RCID (Integer)
  Field 1: BANNER (String)
  Field 2: SOURCE_DATE (String)
  Field 3: DATE_QUALIFIER (String)
  Field 4: QUAD_NUMBER (String)
  Field 5: L_PRIM_INTERVAL (Real)
  Field 6: L_PB_INTERVAL (Real)
  Field 7: S_PRIM_INTERVAL (Real)
  Field 8: S_PB_INTERVAL (Real)
  Field 9: CODED_FLAG (String)
  Field 10: EDGEWS (String)
  Field 11: EDGEWR (String)
  Field 12: EDGENS (String)
  Field 13: EDGENR (String)
  Field 14: EDGEES (String)
  Field 15: EDGEER (String)
  Field 16: EDGESS (String)
  Field 17: EDGESR (String)
  Field 18: VERTICAL_DATUM (String)
  Field 19: SW_LATITUDE (Real)
  Field 20: SW_LONGITUDE (Real)
  Field 21: NW_LATITUDE (Real)
  Field 22: NW_LONGITUDE (Real)
  Field 23: NE_LATITUDE (Real)
  Field 24: NE_LONGITUDE (Real)
  Field 25: SE_LATITUDE (Real)
  Field 26: SE_LONGITUDE (Real)

Layer 3: 'NP01'
  Field 0: RCID (Integer)

Layer 4: 'NE01'
  Field 0: RCID (Integer)
  Field 1: ENTITY_LABEL (String)
  Field 2: SUPPLEMENTARY (String)
  Field 3: AMENDED (String)
  Field 4: APPROXIMATE (String)
  Field 5: DEPRESSION (String)
  Field 6: GLACIER_OR_SNOW (String)
  Field 7: UNDERWATER (String)
  Field 8: BEST_ESTIMATE (String)
  Field 9: SPOT_CATEGORY (String)
  Field 10: PHOTOREVISED (String)
  Field 11: RISE (String)
  Field 12: FILL (String)
  Field 13: ELEVATION (Real)

Layer 5: 'NA01'
  Field 0: RCID (Integer)

Layer 6: 'NO01'
  Field 0: RCID (Integer)

Layer 7: 'LE01'
  Field 0: RCID (Integer)
  Field 1: SNID (Integer)
  Field 2: ENID (Integer)
  Field 3: ENTITY_LABEL (String)
  Field 4: SUPPLEMENTARY (String)
  Field 5: AMENDED (String)
  Field 6: APPROXIMATE (String)
  Field 7: DEPRESSION (String)
  Field 8: GLACIER_OR_SNOW (String)
  Field 9: UNDERWATER (String)
  Field 10: BEST_ESTIMATE (String)
  Field 11: SPOT_CATEGORY (String)
  Field 12: PHOTOREVISED (String)
  Field 13: RISE (String)
  Field 14: FILL (String)
  Field 15: ELEVATION (Real)

Layer 8: 'PC01'
  Field 0: RCID (Integer)




More information about the Gdal-dev mailing list