Global Mapper 15
Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    STH
    STH is offline
    Global Mapper User
    Join Date
    Oct 2007
    Location
    Norway
    Posts
    435

    Default Custom Gridding on export

    Is it possible to load custom gridding from a file? We have a file that contains the grids and would like it to load in GlobalMapper and then export as GeoTiff. Perhaps add the option in "Gridding" something like "Grid Layout from Selected Area/File". Similar to "Export Bounds" and "Crop Selected Area Features(s)"? The Gridding may be described as a text-file or DXF-file? If text-file is the option then it should load the following tags:

    "TileName" "NWx" "NWy" "SEx" "SEy"

    Is this possible?

  2. #2
    Administrator
    Join Date
    Jun 2007
    Posts
    16,437

    Default

    This is not currently possible with Global Mapper, but is something on our todo list. You could do something like this using the Global Mapper SDK, then you could just read the file yourself and do individual export commands. Or you could write a small application to create a Global Mapper script file that does all of the exports that you need, then run that script file.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com

  3. #3
    Global Mapper User
    Join Date
    Jan 2008
    Posts
    1

    Default Gridding Based on Vector?

    Mike,

    Why not allow gridding based on a vector (shapefile) in the Global Mapper Workspace?

    For instance right now I am using an arcscript for ArcMap to batch clip an NAIP county aerial based on the grid shapefile included in the NAIP download. It has been running for about 3 hours and it is 30% done. I guess I will leave going tonight. We all now how much faster a process like this would go if I could use Global Mapper instead.

    Paul

    P.S.

    If there someway to accomplish this that I have missed let me know and you could be my hero.

  4. #4
    Administrator
    Join Date
    Jun 2007
    Posts
    16,437

    Default

    Paul,

    You can clip an export to one or more selected area features on export, but there is not currently a way to do multiple exports based on multiple selected area features (i.e. one export per area feature). This is something that we are considering for a future release though.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com

  5. #5
    STH
    STH is offline
    Global Mapper User
    Join Date
    Oct 2007
    Location
    Norway
    Posts
    435

    Default

    I am trying to do this now. I have a done the following:
    Code:
    GLOBAL_MAPPER_SCRIPT VERSION="1.00" FILENAME="T:\WORKSPACE.GMW"
    UNLOAD_ALL
    DEFINE_PROJ PROJ_NAME="UTM_ZONE32_WGS84"
    Projection     UTM
    Datum          WGS84
    Zunits         NO
    Units          METERS
    Zone           32
    Xshift         0.000000
    Yshift         0.000000
    Parameters
    END_DEFINE_PROJ
    SET_BG_COLOR COLOR=RGB(100,100,100)
    
    IMPORT FILENAME="T:\testfile.tif" \
    	 TYPE="GEOTIFF" LABEL_FIELD="" ANTI_ALIAS="NO" \
    AUTO_CONTRAST="NO" CONTRAST_SHARED="YES" \
    	 CONTRAST_MODE="NONE" 
    
    EXPORT_RASTER FILENAME="T:\testfile_export.tif"   \
        TYPE=GEOTIFF LAYER_BOUNDS="T:\testfile.tif"   \
        POLYGON_CROP_USE_ALL="T:\Areas.shp" \
    However it does not crop at the Areas within the file Areas.shp.

    I am trying to do something similar to: File - Batch convert/reproject and selecting "Crop to Selected Areas" and "Maintain Full Size When Cropped"
    Sincerely yours

    Sigbjørn
    Norway

  6. #6
    Administrator
    Join Date
    Jun 2007
    Posts
    16,437

    Default

    Your EXPORT_RASTER command should have a POLYGON_CROP_FILE="t:\Areas.shp" parameter as well as a POLYGON_CROP_USE_ALL=YES parameter. As it is not you are not actually specifying a crop file.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com

  7. #7
    STH
    STH is offline
    Global Mapper User
    Join Date
    Oct 2007
    Location
    Norway
    Posts
    435

    Default

    I could not use this approach because of a black border around 1/2 pixel within the crop-area. So I have to do it by feathering each import file, and crop 2 pixels. So i use the following:

    My final approach was to load all background files and then do this for each file on top of the background-files:
    Code:
    IMPORT FILENAME="newMosaic.tif" \
    TYPE="GEOTIFF" PROJ_NAME="UTM_ZONE32_WGS84" LABEL_FIELD="" 
    ANTI_ALIAS="NO" AUTO_CONTRAST="NO" \
    CONTRAST_SHARED="YES" CONTRAST_MODE="NONE" CLIP_COLLAR="NONE" 
    TEXTURE_MAP="NO" TRANSLUCENCY="512" \
    FEATHER_BLEND_SIZE="2" FEATHER_BLEND_EDGES="48" 
    FEATHER_BLEND_POLY="FEATHER_POLY"	
    EXPORT_RASTER FILENAME="Q:\mergedMosaikk.tif" \
    TYPE=GEOTIFF OVERWRITE_EXISTING="NO" LAYER_BOUNDS="newMosaikk.tif" \
    However this seems to take a lot of time, and I am not sure why. Is it because of the FEATHER_BLEND_SIZE="2" - calculations? Is there a difference if you load/unload one and one file rather than loading all files in the beginning of the script? Is the problem that the files are located on a network drive and GM does not buffer the files on a temp-file locally or in memory/swap file and requires a lot of reading then the network is busy? I see that GM only use around 70-80MB of memory and the swap-file is only 3-400MB.

    UPDATE: When turning off the FEATHER_BLEND completely with the same files it is lightning fast - so I guess the computation of the FEATHER_BLEND_POLY takes all the time. But I guess there is no other way to do my operation faster?
    Last edited by STH; 04-15-2008 at 04:15 PM.
    Sincerely yours

    Sigbjørn
    Norway

  8. #8
    Administrator
    Join Date
    Jun 2007
    Posts
    16,437

    Default

    Whenever you do a polygon-based operation (i.e. crop or feather to polygon), this will tend to significantly slow down your export, particularly if the crop polygon has a lot of vertices, as the point-in-polygon operation can be slow.

    However, one other thing that I notice is that you are not specifying the bounds to export when using the EXPORT_RASTER script command. When you specify a polygon crop file during export the bounds of that polygon will be used as the export bounds, but in the absence of a crop polygon or explicitly specified export bounds, the bounds of all loaded data will be used, which could be the most significant source of your slowdown as you may be exporting a lot more data that you are intending to.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com

  9. #9
    STH
    STH is offline
    Global Mapper User
    Join Date
    Oct 2007
    Location
    Norway
    Posts
    435

    Default

    The FEATHER_POLY I use consist of 7 different areas (non-overlapping) around 300 points within the GMW-file. They are on the format XXXXXX.XX0 , XXXXXXX.XX0. Where the last number is always zero. I guess it wont help much if I remove the 0`s at the end.

    I thought that the export with: LAYER_BOUNDS="newMosaikk.tif" would use the bounding rectangle of the selected file. At least the export file seems to generate correctly and equal to the input-size. I have tried to export the Mosaic-tile as a Shape-vector-file and used that as input to LAYER-BOUNDS, and I can not see a very big difference in processing time.
    Sincerely yours

    Sigbjørn
    Norway

  10. #10
    Administrator
    Join Date
    Jun 2007
    Posts
    16,437

    Default

    Sorry, I did not see the LAYER_BOUNDS parameter. You are correct that it will specify the layer bounds to use for the export.

    The format of the feather polygons does not make any difference as they are all ready into memory. The cause of your slowdown is most likely the polygons as the point-in-polygon and distance-to-polygon operations can slow things down a lot when feather blending. Other than simplifying your polygons to reduce the number of vertices there is not much that you can do.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com

 

 
Page 1 of 2 12 LastLast

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by vBSEO 3.6.1
Copyright 2008-2012 Globalmapperforum.com
All times are GMT. The time now is 04:36 AM.
vBulletin 4.0 skin by CompleteVB