I'm having difficulties reading the Gridded height data (OS Meridian 2). I'm loading with OSGB 1936 reference system but have trouble finding the lat/lon data for each point. i.e.I open the attribute table to see three columns FEATURE_SE, FEATURE_CO, and HEIGHT. I know the data loads correctly, as it produces the right shape map but don't know how to query the height at a position as I can't figure out how the Feature_se and feature_co link to lat/lon, or OSGB references. Thanks if more information is needed please ask and I'll try and find it.
|
I'm not one to just say RTFM, but have you tried reading the manual? First, I would say that the height data is going to be a bit ropey because it's derived from Landform PANORAMA data (a now defunct product), which was derived from contours many years ago, and the values are rounded to the nearest metre with a grid spacing of 200 metres - worse than SRTM. But accuracy might not be critical for you, which is fine. Secondly, there's no notion of latitude and longitude in Meridian 2 data, its all stored in the OSGB36 projection. To get the long/lat of a point, you'll need to unproject and shift the datum to get to presumably WGS84 long/lat (OSGB36 uses the Airy ellipsoid hence the datum shift, but that's usually handled automatically); this can be done with either a library like proj4, or if you're using PostGIS, the function ST_Transform(). In the manual, it says that height has a feature code of 6762, that'll be the So putting this all together, you could use a PostGIS SQL statement something like this:
Which should return the WKT representation and height of the point nearest to Buckingham Palace. Where 4326 is the SRID of WGS84 coordinate system, and 27700 is the SRID of the OSGB36 projection. |
|||||||
|