Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I query NASA JPL service using query string. Response is a unsigned 16 bit per pixel png image and the values are elevation values in meters. Same is described in the capabilty xml of the layer as can be seen below:

<Layer queryable="0">
      <Name>worldwind_dem</Name>
      <Title>SRTM derived global elevation, 3 arc-second</Title>
      <Abstract>
    A global elevation model, prepared from the 3 arc-second SRTM dataset by filling some of the problem areas. Prepared by the NASA Learning Technologies.
    The default style is scaled to 8 bit, non-linear.
    It is possible to request the elevation data in meters by the short_int tyle and requesting PNG format. The resulting PNG file will be a unsigned 16 bit per pixel image. The values are then the elevation in meters.
    Values are signed 16 bit integers, but PNG will present them as unsigned, leading to a few areas with very large values (65000+)
    For elevation values in feet, request PNG format with the style feet_short_int.
      </Abstract>

When I read the elevation using following code

var pixel = bmp.GetPixel(rowIndex,
                         colIndex);
var value1 = BitConverter.ToInt16(new byte[] { 0, pixel.B },
                                  0);

I read the positive elevation value correctly but unable to read negative value. The query string tile mentioned above covers all the case, it has data for +ve, zero and -ve values.

share|improve this question
    
Anything any suggestion or ticks? –  Mohit Mar 1 '12 at 13:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.