WKT as cropping geometry

LPlateAndyLPlateAndy Global Mapper UserPosts: 79Trusted User
Hi,

I've been using the Global Mapper Scripts for a while and we've been fine to date putting in co-ordinates using DEFINE_SHAPE to define the polygon for cropping the output by POLYGON_CROP_FILE.

We're now keen to be able to crop using multi areas and geometries with holes in. One option is to use a shp file to store these but i wondered whether it might be possible to use a WKT definition to add a POLYGON or MULTIPOLYGON?

I'm still on Global Mapper 14 at the moment (works perfectly for my current requirements) so would be good to know whether this has any impact on possible solutions

Andy

Answers

  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,218
    You can use the DEFINE_TEXT_FILE command to set up an in-line input file that uses WKT to define the shapes.  Import that file using the IMPORT_ASCII command (COORD_ORDER="WKT"), and use that file name for cropping.  I don't remember exactly when the DEFINE_TEXT_FILE command was added, so it is possible that it is not available in Global Mapper 14.  If that is the case, you will need to save your crop areas to a separate file.
  • LPlateAndyLPlateAndy Global Mapper User Posts: 79Trusted User
    Thanks Bob, I'll try that out. Sorry about the duplicate posts, thought it was just going to draft...

    Andy
  • LPlateAndyLPlateAndy Global Mapper User Posts: 79Trusted User
    Hi Bob, ah - just note:

    "WKT - coordinate string in WKT (well-known-text format). This allows single line representations of areas, lines, and points"

    I guess this means WKT MULTIPOLYGON or POLYGON with inner rings is/are out?

    Thanks

    Andy
  • bmg_bobbmg_bob Global Mapper Programmer Posts: 2,218
    As far as I can tell, you should be able to use points, lines, polygons, multipoints, multilines, and multipolygons.  I would suggest trying the data in the form you want to use it.
Sign In or Register to comment.