Help with terrain files...
Olly Betts
olly at survex.com
Thu May 8 21:25:57 BST 2025
On Wed, May 07, 2025 at 07:21:35AM +0000, razvid at gmail.com wrote:
> I tried to load a .bil file using the UTM 34N coordinate system. That
> might have been the issue. I thought it would work, but I kept getting
> the error:
> "No terrain data near area of survey!"
Unhelpfully the code currently requires WGS84 lat/long but doesn't
actually check the coordinate system matches that so it'll just
read the coordinate numbers and treat them as lat/long, which typically
will give coordinates nowhere near the correct ones for data in a
UTM coordinate system.
It would be possible to check if there's a .prj file - for SRTM data
that looks like this:
Projection GEOGRAPHIC
Datum WGS84
Zunits METERS
Units DD
Spheroid WGS84
Xshift 0.0000000000
Yshift 0.0000000000
Parameters
There seems to be a JSON (or JSON-like) .prj format too though, and
I'm not sure what we need to handle here, so thus far I've left this
alone thinking that moving to using GDAL will take care of it.
> It’s working now with WGS84 — I converted all the coordinates to this
> system, and everything is fine.
> One more question, is there any way to have the raster at a bigger
> resolution?
Yes, aven will use the resolution as specified in a .hdr file
alongside the .bil file (XDIM and YDIM specify the size of each
pixel of the raster). If there's no .hdr, then the default is
1 for both (which is what ESRI document to use).
Cheers,
Olly
More information about the Survex
mailing list