[gdal-dev] New user query about OGR library NTF import
ajc200 at maths.leeds.ac.uk
Sat Nov 14 13:49:22 EST 2009
Many thanks for your e-mail and such a rapid reply!
I don't want to suggest that there is necessarily a problem with the OGR
library, it could well be that I simply don't understand what it is doing
An example file is available on the OS web-site:
(self extracting zip file)
and the technical reference which describes the format at
(see pdf page 29 onward).
In the NTF file the first record of 'type' 50 (i.e. data) starts
which I think means the first two grid point have heights -3.0m and -3.3m
respectively (Z_MULT=0.1 hence X by 0.1).
In the OGRINFO -la output for the file (produced using FWtools246 under
windows XP pro within a 32 bit virtual machine) the first two features
HEIGHT (Integer) = -3
POINT (275000 185000 -3)
HEIGHT (Integer) = -3
POINT (275000.0 185010.0 -3.299999952316284)
What I can't understand is why the height is reported as an integer and
also where the figures after the decimal point in the z coordinate are
Overall what I am hoping to achive is a simple text file listing X, Y, Z
(one per line of the file) coordinates for the land surface which can be
fed into a surface generation program (surfer).
Any help in understanding the OGR output would be appreciated.
On Sat, 14 Nov 2009, Frank Warmerdam wrote:
> Can you provide access to an example file? If
> distribution is an issue, you can make it available just
> to me.
> Best regards,
> On Sat, Nov 14, 2009 at 1:10 PM, A.J. Carter <ajc200 at maths.leeds.ac.uk> wrote:
>> I was hoping someone might be able to help me with a query about using the
>> OGR library to read an Ordnance Survey Landform Profile file in NTf format:
>> The file contains a 501 X 501 grid with height values at each point. From
>> the technical reference on the OS web page it lists this as being stored
>> within a field called Z_COORD. Manually inspecting the NTF file (which is
>> plain text) I can see values like 00159 meaning 15.9m AOD. If I run the NTF
>> through OGRINFO -al on the file produces a feature for this point:
>> HEIGHT (Integer) = 15
>> POINT (310000.0 490000.0 15.899999618530273)
>> At the moment I can't understand why it's writing out the height as an
>> integer, and also where the many decimal places in the z coordinate of the
>> point have come from.
>> Any help would be much appreciated.
>> I'm relatively new to GIS software; sorry if this is a silly question!
>> Many thanks,
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
> I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
> 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