Defining export bounds in script
LPlateAndy
Global Mapper UserTrusted User
Hi,
Loving global mapper and the scripting - it's possible for anyone to use - even me!
I've found the GUI tools to set the export bounds by a selected feature and get a random polygon - that's great.
I tried doing the same by scripting and setting the extents by a shp file which worked to a certain degree in that it limited the image to a rectangular area containing the features extents. However, it also included mapping outside the requested polygon where i had expected a white (or otherwise) background.
Is there something i forgot to do?
Also, it would actually be even better if i could set the bounds using a 'GLOBAL_BOUNDS' style of command but with the option to specify all the points in the required polygon rather than just the bottom left, top right.
Hope someone can help!
Thanks
Andy
Loving global mapper and the scripting - it's possible for anyone to use - even me!
I've found the GUI tools to set the export bounds by a selected feature and get a random polygon - that's great.
I tried doing the same by scripting and setting the extents by a shp file which worked to a certain degree in that it limited the image to a rectangular area containing the features extents. However, it also included mapping outside the requested polygon where i had expected a white (or otherwise) background.
Is there something i forgot to do?
Also, it would actually be even better if i could set the bounds using a 'GLOBAL_BOUNDS' style of command but with the option to specify all the points in the required polygon rather than just the bottom left, top right.
Hope someone can help!
Thanks
Andy
Comments
-
Hi,
OK - i did look first honest... just not hard enough!
POLYGON_CROP_FILE works fine.
However, it would still be really handy if (as an alternative) i could specify a co-ord string in the current co-ord sytem for export.
Thanks
Andy -
Andy,
I will add an item to the todo list to allow this.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Andy,
FYI, I have completed adding support for inline specification of crop polygons, so the upcoming v10 release will have this feature. Here is an example of what your scripts can look like with this feature:
GLOBAL_MAPPER_SCRIPT VERSION="1.00" FILENAME="C:\Temp\export test\test.gmw"
UNLOAD_ALL
DEFINE_SHAPE SHAPE_NAME="CROP_POLY"
377493.234,4323974.016
375343.359,4318676.109
381101.953,4314414.750
387014.109,4317178.875
386975.719,4322400.000
381869.766,4324588.266
377493.234,4323974.016
END_DEFINE_SHAPE
IMPORT FILENAME="C:\Temp\export test\blue_springs_4_quads.dem" TYPE="USGS_DEM" EXPORT_RASTER FILENAME="C:\TEMP\EXPORT TEST\BLUE_SPRINGS_DEM_EXPORT.TIF" TYPE="GEOTIFF" \
POLYGON_CROP_NAME="CROP_POLY"
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Hi Mike,
How come not every software supplier can achieve this kind of turnaround!
Any idea when V10 is expected - nearest month would be handy.
Thanks again!
Andy
P.S. Should i get an e-mail when there's a response to a thread? Only asked i might have missed this had i not happened to log back in. -
In your user settings there is a way to automatically subscribe to threads which you have posted. Also, if you look at the top of this thread, you'll see "thread tools". You can select "subscribe to this thread" and you should get an email.
Paul -
Andy,
We expect to officially release v10 around the end of August, but the first beta of v10 (which will include this new polygon crop feature) will hopefully be out in a week or two. The beta will be announced on the forum.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
cool - it just keeps getting better!
Appreciate your hard work Mike. -
Looking forward to the next release...
--
Tim
Categories
- 13K All Categories
- 5.8K Features Discussion
- 350 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 421 Projection Questions
- 837 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 181 Announcement and News
- 941 Bug Report
- 562 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 580 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 244 How I use Global Mapper
- 111 Global Mapper Forum Website
