-
Moderator
Reputation: 3621
How to retrieve nrows/ncolums?
Question to all you GIS wizards :
I've got a DEM file which is at .BIL format but I don't have a header file.
Known are the coordinates of the file but unknown are the number of rows and number of columns.
Does anyone knwo how to calculate these values form the coordinates if the gridsize is known?
(The formule (maxLL-minLL)/grid is not giving the right results)
-
2009-11-15 07:20 PM
# ADS
Circuit advertisement
-
VIP Member
Reputation: 1050
DCA
Your formula is right. Maybe you use another format of coordinates.
Take, for example, some DEM in Atoll format. In index.txt file is information about corners' coordinates and resolution:
file_name.bin X1 X2 Y1 Y2 R
Convert it by GlobalMapper to BIL format. And check *.HDR file:
NROWS=(Y2-Y1)/R
NCOLS=(X2-X1)/R
Last edited by tester; 2009-11-16 at 11:33 PM
Knowledge should be free
-
Moderator
Reputation: 3621
@ tester
That's exactly what I thought but if I use those values as calculated with the formulae it ends up with a distorted result. I know the correct results and then the picture/result is fine.
Strange, strange
-
VIP Member
Reputation: 1050
DCA
Can you upload this *.BIL file and coordinates?
Bookmarks