Thanks Thanks:  0
Showing results 1 to 4 of 4

Thread: How to retrieve nrows/ncolums?

  1. #1
    Moderator Reputation: 3584
    Join Date
    2008-01-20
    Location
    Earth
    Posts
    1,093


    Question 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)

  2. # ADS
    Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many
     

  3. #2
    VIP Member Reputation: 1050 tester's Avatar
    Join Date
    2009-11-06
    Location
    404 - Not found
    Posts
    635


    Default

    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

  4. #3
    Moderator Reputation: 3584
    Join Date
    2008-01-20
    Location
    Earth
    Posts
    1,093


    Default

    @ 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

  5. #4
    VIP Member Reputation: 1050 tester's Avatar
    Join Date
    2009-11-06
    Location
    404 - Not found
    Posts
    635


    Default

    DCA
    Can you upload this *.BIL file and coordinates?
    Knowledge should be free

Tags for this Thread

Bookmarks

Bookmarks

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •