Is it s script? - I need a custom feature
Fdarma
Global Mapper User
Sorry for the "ignorant' question.
I do the same operation on a daily basis, and I'd like to simplify it.
Basically, I have 5000 points opened on global mapper at the proper location that represent pictures at the location they were taken (the file name of the photo is one the the attribute of each point). I draw a polygon around the photos I want to select (maybe 1,000 out of the 5,000), then I export into csv to get the list of pictures I selected.
Then, I need to write a bat file that copy, paste the photos to a different folder, from the folder where the original 5000 photos are located.
It is time consuming, and I'd like to create a little "custom" function that, after I select the polygon around the photos I want, ask me where the photos are located, where I want them. And then...go.
Am I dreaming? Or is there a name for what I am trying to do, between a script, a plugin, SDK, and other acronym I don't understand?
Thanks in advance.
Frank
I do the same operation on a daily basis, and I'd like to simplify it.
Basically, I have 5000 points opened on global mapper at the proper location that represent pictures at the location they were taken (the file name of the photo is one the the attribute of each point). I draw a polygon around the photos I want to select (maybe 1,000 out of the 5,000), then I export into csv to get the list of pictures I selected.
Then, I need to write a bat file that copy, paste the photos to a different folder, from the folder where the original 5000 photos are located.
It is time consuming, and I'd like to create a little "custom" function that, after I select the polygon around the photos I want, ask me where the photos are located, where I want them. And then...go.
Am I dreaming? Or is there a name for what I am trying to do, between a script, a plugin, SDK, and other acronym I don't understand?
Thanks in advance.
Frank
Comments
-
Frank,
I think you might be able to do this with a script. Once you have just your points of interest, you can use the SPLIT_LAYER command (Global Mapper Scripting Reference) to split up that point layer into separate layers, one for each point based on the image filename attribute. The layer description of each should be that filename. Then you should be able to use the LAYER_LOOP_START...LAYER_LOOP_END (Global Mapper Scripting Reference) to loop through each layer, then inside the loop use RUN_COMMAND (Global Mapper Scripting Reference) to run the DOS command to copy the file from the original image location (%LAYER_DESC% special parameter from the loop) to the new desired location.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
Thanks! that sounds feasible...I'll try and let you know. Thanks for your answer, amazing service.
-
Hello again,
It seems to be the right way, but split_layer create layers who description becomes "description - attr_1".
Any ways I can just have the "attr_1", so I can use the %layer_Desc% as parameter in the loop?
Thanks, -
Are you on v15? I could add a parameter to SPLIT_LAYER to say that the new layer description would just be the attribute value rather than including the original description. Would that work?
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
YEs, I am on V15 since last week, and yes, that would do the trick Ithink. I would just concatenate the extension ".jpg" on the dos command (it is not in the attribute)
That would work great! -
I have added support for adding LAYER_DESC_ATTR_ONLY=YES to the SPLIT_LAYER command so the new layer descriptions will just be the attribute value. I have placed a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15.zip with the latest changes for you to try. Simply download that file and extract the contents into your existing v15.xx installation folder to give it a try. If you are using the 64-bit v15 version there is a new build at http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper15_64bit.zip .
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation -
Bamm, it works!! 1500 pictures extracted out of 5000 by simply drawing around the area I want, deleting what is outside, and running a script. 1 hrs of work becomes 30sec. Very, very usefull.
Thanks a lot. I really appreciate the unbelievable support.
I'll try to make the script a little fancier (maybe some way the script will ask the user in what folder the pictures are, and where to copy them), but it works great as is.
Is there a place that user upload their scripts for other to use? -
Yes there is a 'User Scripts' forum just for things like this at User Scripts - Global Mapper Forum. Your script sounds like a great example for showing some complex usage including running a DOS command.
Thanks,
Mike
Global Mapper Guru
geohelp@bluemarblegeo.com
Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website