Global Mapper v25.0

misalignment between imagery

fferro
fferro Global Mapper User
edited January 2013 in Projection Questions
I've downloaded a terrain data file and a satellite image (same area). There is a big misalignment between both files as you can see in the capture.

capture1vk.th.jpg

Raster image from: "World Imagery".
Elevation data from: ASTER DEM, tiled only, 1.5 arc-second per pixel

Workspace projection (LEFT image)
Projection: UTM Zone: 32 (6ºE - 12ºE - Northern Hemisphere) Datum: NAD83 Planar Units: METERS

Raster projection (CENTER image) default projection
Elevation projection (RIGHT image) default projection

capture2qx.th.jpg

Thanks in advance
Fernando

Comments

  • global_mapper
    global_mapper Administrator
    edited December 2012
    Fernando,

    Is it a mis-alignment only in that the same lat/lon bounds don't cover the same area, or are the elevations for a particular area actually different? Note that because different datums are used the same lat/lon values will represent slightly different areas on the ground. The actual data should line up though.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • fferro
    fferro Global Mapper User
    edited December 2012
    Thanks for your answer Mike,
    I Don't know exactly. The elevation file exports very well to 3D Studio MAX. The point of interest it's at the center of the mesh.
    But the raster image, used as a texture in MAX is too way to the south. The same point is well below its actual location.

    capture3bc.jpg

    Uploaded with ImageShack.us
  • global_mapper
    global_mapper Administrator
    edited December 2012
    I'm not sure if 3D Studio Max knows about datums. Try setting your datums to the same one (try WGS84) on the Projection tab of the Configuration dialog prior to export so that those match up and see if that looks better.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • fferro
    fferro Global Mapper User
    edited December 2012
    I'm not sure if 3D Studio Max knows about datums.

    MAX knows nothing about datums. Just centers the texture (raster) image around the imported DXF mesh (elevation).
    Try setting your datums to the same one (try WGS84) on the Projection tab of the Configuration dialog prior to export

    I don't understand. Each downloaded file in Global Mapper has it's own Projection, with a default setting (Overlay Control Center > Options... > Projection Tab). That is what I've uploaded in my first post.
    My elevation shows: Projection: Geographic (Latitude/Longitude) Datum: WGS84 Planar Units: ARC DEGREES
    My raster: Projection: Mercator Datum: GOOGLE MAPS (SPHERE RADIUS 63..) Units: METERS

    My workspace has this settings: Projection: UTM Datum: NAD83 Units: METERS.
    Needed to get a square mesh in 3Ds MAX.
    Which one do I have to edit?
    Both images should be centered in Global Mapper. That is not what I see (first image uploaded in first post).

    Thanks
    Fernando
  • fferro
    fferro Global Mapper User
    edited December 2012
    I've found a workaround.
    Just downloading a raster image smaller than the elevation.
    I guess a better solution would be to crop the downloaded raster image to the same size of the elevation but I don't know how to do it.

    capture4su.jpg
    Uploaded with ImageShack.us
  • global_mapper
    global_mapper Administrator
    edited December 2012
    Fernando,

    Ah I see, if 3Ds Max doesn't understand anything about positioning, what you should do instead is export your terrain, then do your imagery export and on the Export Bounds tab press the button at the bottom to use the last exported bounds. Then your imagery layer should end up with the same bounds as the terrain layer.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • fferro
    fferro Global Mapper User
    edited January 2013
    Well, after some research...
    Terrain exported from Global Mapper with success as DXF file in UTM projection
    The mesh imported in 3Ds MAX has some issues.

    raster2.th.jpg

    All faces in the mesh have inverted normals (look in the wrong direction).
    And first row of vertex at wrong height (Z: -10.000 meters below the rest).

    raster1.th.jpg

    The UVW coordinates are flipped horizontally (maybe something related with the inverted normals).
    Any clues?
    Thanks
    Fernando
  • global_mapper
    global_mapper Administrator
    edited January 2013
    Fernando,

    Global Mapper wouldn't store a normal out in the DXF file, just the raw coordinates of the features. I wonder if 3Ds Max treats the axes as flipped or something, like how in images the Y values increase down rather than up like they do in normal Cartesian systems, like map projections. That could certainly flip the normals and the display.

    I think the first row of -10 that you are seeing is from the bounds of the export going outside the bounds of the data. If you restrict the export bounds slightly does that work?

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.bluemarblegeo.com/
  • fferro
    fferro Global Mapper User
    edited January 2013
    I don't like to restrict the export bound because the texture maps coordinates in MAX depends on the size of the object. I will try to find out another way.

    raster3.jpg

    The terrain was exported from GM as DXF Mesh and imported in 3Ds MAX.
    The satelite image was exported as Raster PNG
    The bridges were exported from GM as DXF Vectors and imported in 3Ds MAX.
    Raster and vector with Export Bounds > Reset to Last Exported Bounds
    All three in UTM Projection.
    The coordinates of the texture map are centered in the mesh object in 3Ds MAX.
    There is a little misalignment between the raster image and the vectors.
    How could I check which one is wrong?
    Thanks
  • fferro
    fferro Global Mapper User
    edited January 2013
    Maybe the problem started when downloading the terrain.

    File > Download Online Imagery/Topo/Terrain Maps...
    Select Data Source: ASTER GDEM Wolrdwide Elevation Data (1.5-arc-second Resolution)
    Select Area to Download
    Within 2 Kilometers of latitude -34.4753340797967 longitude: -58.6316886890949

    So, this point should be at the center, right?

    And the satellite image:
    File > Download Online Imagery/Topo/Terrain Maps...
    Select Data Source > *** POPULAR SOURCES *** > World Imagery
    Select Area to Download
    Within 3 Kilometers of latitude -34.4753340797967 longitude: -58.6316886890949

    Tools > Configure > Projection:
    Projection: UTM
    Zone: -21 (60ºW - 54ºW - Southern Hemisphere)
    Datum: NAD83
    Planar Units: METERS

    raster4.jpg
  • global_mapper
    global_mapper Administrator
    edited January 2013
    Did you also have the datum set the same for all 3 exports? The lat/lon in the online download dialog will be referenced to WGS84, so if you are trying to center on that in another datum it will be shifted. Normal mapping software would handle that fine, but if 3DS Max doesn't know about all the mapping stuff I guess you have to get the sizes just right so they line up. If you export to the same bounds and resolution I would expect the results to line up extremely closely though.

    For the row of -10 I may have a fix. Due to round-off and the DXF mesh samples going all the way to the very edge of the rendered data, it's possible the samples would have gone ever so slightly outside the bounds of the data. I've added a tiny fudge factor to account for that at the edge row and column which will hopefully take care of that. I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14_64bit.zip .

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.bluemarblegeo.com/
  • fferro
    fferro Global Mapper User
    edited January 2013
    Did you also have the datum set the same for all 3 exports? The lat/lon in the online download dialog will be referenced to WGS84, so if you are trying to center on that in another datum it will be shifted. Normal mapping software would handle that fine, but if 3DS Max doesn't know about all the mapping stuff I guess you have to get the sizes just right so they line up. If you export to the same bounds and resolution I would expect the results to line up extremely closely though./QUOTE]
    you are right about 3ds MAX. It knows nothing about projections.
    The way you project a raster image over a mesh is very simple. You have to center a UVW map over the mesh and that's it.
    So, Global Mapper has to export the terrain mesh and the satellite image with the same size and center point.
    This is all my goal in this project.
    I started downloading the terrain centered in a geographic point (Lat/Lon).
    Then, I downloaded the satellite image at the same point but with bigger bounds.
    I have to export with UTM projection because I need a grid with square cells.
    But, If I export both with the same projection they would be seen the same way in both programs, right?
    I'm adding some shapes around building just to check the alignment. Exporting them as DXFs with the same UTM projection.
    For the row of -10 I may have a fix. Due to round-off and the DXF mesh samples going all the way to the very edge of the rendered data, it's possible the samples would have gone ever so slightly outside the bounds of the data. I've added a tiny fudge factor to account for that at the edge row and column which will hopefully take care of that. I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v14.xx installation folder to give it a try. If you are using the 64-bit v14 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper14_64bit.zip .
    Thank you Mike. I will give a try to this new version tomorrow
  • global_mapper
    global_mapper Administrator
    edited January 2013
    If you export everything with the same projection and datum as well as the exact same bounds and sample spacing I would expect the results to line up in 3DS Max. The DXF mesh might be interpreted differently though since it contains full 3D coordinates for each mesh object and not pixel space coordinates starting at (0,0). So I'm not sure how those are placed.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.bluemarblegeo.com/
  • fferro
    fferro Global Mapper User
    edited January 2013
    Hi Mike,

    It doesn't matter how MAX interpret the coordinates, because the raster image is always applied over the CENTER of the imported mesh.

    The raster image is downloaded in Globlal Mapper with the center at the same spot than the terrain.
    Global Mapper shows the raster a little bit to the right, but CENTERED when exported as PNG.
    I've set the Workspace with UTM Projection and NAD83 Datum, exporting all (terrain, raster and shapes) with currently selected display projection.
    The raster is centered but the terrain and the vector shapes are misaligned (again as seen in Global Mapper 2D window).

    1*
    When downloading imagery:
    Within 3 Kilometers of latitude -34.4753340797967 longitude: -58.6316886890949
    "Within" in this sentence is aproximately?

    2*
    Is it correct to set a bigger bound to raster than terrain to cover it all (exporting at the terrain size of course)?

    3*
    I can see at the Overlay Control Center > Options... that Projection settings of each individual layer is different.
    the World Imagery layer has a Mercator Projection, GOOGLE MAPS (SPHERE RADIUS 63... Datum and the ASTER GDEM layer has a Geographic (Latitude/Longitude) Projection and a WGS84 Datum.
    Who decided this? Do I have to change it?

    4*
    Which is the right workflow to get terrain, satellite and shapes created with the digitizer centered at the same spot?

    That's all what I'm looking for. Thanks in advance.
  • global_mapper
    global_mapper Administrator
    edited January 2013
    Each online layer has a "native" projection that the data is actually provided in from the server. When you specify to download around a particular lat/lon with a radius the smallest box in the native layer projection that covers that distance and radius is calculated. Because some projections have constantly changing scale, the specified center lat/lon might not be at the center of that bounding box in every projection.

    What you should do is set the view/export projection on the Projection tab of the Configuration dialog to a consistent projection (like UTM with an appropriate zone) prior to export, then on the Export Bounds tab specify the exact same bounds for each export. Then not only will the center be identical but the edges will be as well, assuming you also use the same sample spacing for the export.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.bluemarblegeo.com/