Global Mapper Pro

land-sea mask

saleh
saleh Global Mapper User
edited December 2012 in Elevation Data
Hello,
I have the elevation data (DEM), I want to edit the height data to have only 0 and 1.
0 = sea data
1 = land data
in another way, I want to have a raster data which represent sea-land map (2D).

also I have vector data which has area and costlines features, but I don't know how to:
1. reduce the data (its so detailed), I don't need so much details.
2. how to combine these two features to build a raster map.

thanks
Saleh

Comments

  • global_mapper
    global_mapper Administrator
    edited December 2012
    Saleh,

    You could load the elevation data layer twice. On both go to the Alter Elevations tab of the Options dialog. For the sea one set the maximum valid to 0, which should make all of the land be invalid. On the other set the minimum valid to 0.001, then add a multiplier factor of 0 and an offset of 1, which should end up making everything at or above 0.001 to a value of 1, at least if I'm doing my math right.

    If you just want the image, you could skip this and just setup a custom shade with 2 values, both at 0 elevation, the first black and the second white. This should make everything at or below 0 to black and everything above to white.

    You can reduce vector features by selecting them with the Digitizer Tool, then selecting the Move/Reshape right-click menu to Simplify the features.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • saleh
    saleh Global Mapper User
    edited December 2012
    Hello Mike,
    Thank you for the quick reply, yes I have tried the “alter elevation values”. But I have some questions here. I have global mapper 13.
    global mapper.png

    Firstly, I can’t change the scale to zero, zero is not valid. I have to change it to very small number. Then, all the values, even the invalid values are changed to ones (in case of land). And the property “replace invalid values” does not work???? The same to “power” value is the same, if I put 0 (in the land case), it will change all the values to 1, even the invalid values.

    Thanks a lot
    Saleh
  • global_mapper
    global_mapper Administrator
    edited December 2012
    Actually the 'Replace Invalid With' is a better solution I think. Load the file once, set the maximum valid to 0, then check to replace invalid with and set it to 1. This should give you the undersea values and everything else as 1. Export that to a new file, then bring that back in and do the same thing, but set the minimum valid to 1 this time, making all of the ocean become invalid. Set to replace invalid with 0 and you should have what you need!

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • saleh
    saleh Global Mapper User
    edited December 2012
    Hello Mike,
    Yes, I tried this "replace invalid values", but as I said in the previous post, it doesn't work, doesn't give any values to the invalid ones and if I do what you have suggested in the last post, I will get only invalid values at the end. My original file is DEM file 10m resolution, I just reduced the resolution from 10 to 20m and uploaded the file. I hope you can have a look at it.

    https://www.dropbox.com/s/1vrxhlj8jzc0e1c/DEM-20.dem

    thanks a lot
    Saleh
  • global_mapper
    global_mapper Administrator
    edited December 2012
    Saleh,

    Ah of course I forgot if you have set your maximum value to 0 then if you set to replace invalid with 1 then 1 will still be invalid. What you should do instead is set your maximum valid to 1 and your minimum valid to 0, then also check the box to clamp values to the valid range. That should clamp everything to 0 and 1 (assuming you don't have any values in between 0 and 1).

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
Sign In or Register to comment.