![]() |
|
Other DEM file format ? - Printable Version +- RouteConverter Forum (https://forum.routeconverter.com) +-- Forum: Users (https://forum.routeconverter.com/forum-17.html) +--- Forum: English: Discussions (https://forum.routeconverter.com/forum-12.html) +--- Thread: Other DEM file format ? (/thread-3119.html) Pages:
1
2
|
Other DEM file format ? - tybern - 13.01.2021 Hello, If I understood well, RC can use DEM data only in files in SRTM/HGT format. So, the resolution nis limited up to 1" arc. In some country, more precise DEM are available now. For example, in France, french IGN release freely the RGEALTI DEM at 5m since 1st of january, and the one at 1m will be available soon. Is there a possibility that RC became able to read and use DEM files in other format ? GeoTIFF or BIL/HDR for example ? Best regards, RE: Other DEM file format ? - nordlicht - 13.01.2021 (13.01.2021, 11:00)tybern Wrote: Is there a possibility that RC became able to read and use DEM files in other format ? GeoTIFF or BIL/HDR for example ? DEM files are raster data, apart from HGT the only raster file format RC can handle is MBTiles, the only possible projection is web mercator. For anything beyond that I would suggest to use a GIS. RE: Other DEM file format ? - routeconverter - 13.01.2021 (13.01.2021, 13:27)nordlicht Wrote:(13.01.2021, 11:00)tybern Wrote: Is there a possibility that RC became able to read and use DEM files in other format ? GeoTIFF or BIL/HDR for example ? Yes, it's possible to extend the supported formats. The ElevationService interface looks like this: https://github.com/cpesch/RouteConverter/blob/960e704dbbb14e1658c736c93a83d7ef9d8512bf/elevation-service/src/main/java/slash/navigation/elevation/ElevationService.java The HGT files as an inspiration is here: https://github.com/cpesch/RouteConverter/blob/c54e4d073f64c6c076b2e4461b54b21ac5073a00/hgt/src/main/java/slash/navigation/hgt/HgtFiles.java (13.01.2021, 13:27)nordlicht Wrote: DEM files are raster data, apart from HGT the only raster file format RC can handle is MBTiles, the only possible projection is web mercator. For anything beyond that I would suggest to use a GIS. The API to fulfill is Double getElevationFor(double longitude, double latitude) throws IOException; with WGS84 coordinates. If @tybern wants to spend time parsing other files which need to be queried with other algorithms – why not try it? RE: Other DEM file format ? - nordlicht - 13.01.2021 (13.01.2021, 13:59)routeconverter Wrote: ...why not try it? ... and open Pandora's box?
RE: Other DEM file format ? - tybern - 13.01.2021 (13.01.2021, 14:04)nordlicht Wrote: ... and open Pandora's box? Don't understand... RE: Other DEM file format ? - tybern - 13.01.2021 @routeconverter : I'm not Java programmer, my (hidden) question was : can you add this feature... ? Best regards RE: Other DEM file format ? - routeconverter - 13.01.2021 (13.01.2021, 14:08)tybern Wrote: I'm not Java programmer, my (hidden) question was : can you add this feature... ? I don't know. If it's a simple as the MBTiles – probably. But I don't want to search for a specification of the file format and example files. Can you do some research and post links here? RE: Other DEM file format ? - tybern - 13.01.2021 (13.01.2021, 14:52)routeconverter Wrote: But I don't want to search for a specification of the file format and example files. Can you do some research and post links here? Yes, it's possible. I will do as soon as possible. To be continued... ;-) RE: Other DEM file format ? - tybern - 13.01.2021 Christian, There a lot of DEM file formats. So, I think the better (minus work) will be BIL (band interveaved by line). The HGT format is a BIL format. In HGT, data are in Integer 16, and stand for square tiles 1°x1°, 3061 data per rows. For the purpose of better accuracy DEM file, I will suggest BIL/HDR/PRJ format (also called ESRI HDR labelled, or ESRI BILL format), : The .PRJ file is an ASCII file for projection, like that : Code: GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]This file is mandatory if you want to accept different type of projection. But if you want, for example, only WGS84, it is enough to say "it is WGS84" (HGT files are WGS84, it's conventional). The .HDR file is an ASCII file for description of the BIL file, like that : Code: BYTEORDER I
LAYOUT BIL
NROWS 3601
NCOLS 7201
NBANDS 1
NBITS 32
BANDROWBYTES 28804
TOTALROWBYTES 28804
PIXELTYPE FLOAT
ULXMAP -4.0000000001111
ULYMAP 48.0000000001111
XDIM 0.000277777777808638
YDIM 0.000277777777839488In this example, the PRJ and HDR are files after converting an two HGT files into one BIL format. The .BIL file is like in .HGT. In HGT, pixel type is INT16, in BIL, it can be other types, FLOAT 32 in this example. So, I can give you files for testing, but say to me if you prefer any projection (WGS84, or Lambert 93, or...), or only WGS84. Do you prefer square tiles, or any rectangular size ? Do you prefer Interger16 data or is it possible to use Float type ? (I think float is better for accuracy). After your reply, I will generate files for you, for testing. Best regards, Bernard RE: Other DEM file format ? - routeconverter - 15.01.2021 (13.01.2021, 17:07)tybern Wrote: So, I can give you files for testing, but say to me if you prefer any projection (WGS84, or Lambert 93, or...), or only WGS84. Hi Bernard, I'm still in the analysis phase – please consider my naive/stupid questions:
|