Custom tile naming

tjhbtjhb Global Mapper UserPosts: 454Trusted User
edited November 2009 in Suggestion Box
Mike,

Would it be possible (i.e. how hard would it be!) to expand the tile naming options in GM in the following sort of direction—either in the GUI (manual exports, and batch exports) or in the scripting environment, or both?

(My pick would be the scripting environment first, but what do I know.)

I'm thinking of being able to use predefined variables to write really meaningful tile names.

So a scheme such as—

N$YMax_S$YMin_W$XMin_E$XMax

—where $YMax, $YMin, $XMin, $XMax were parsed as look-up variables, and N S E W _ as literals, might produce a filename for one (unprojected) tile like this:

N50_S-15.005_W175.5_E-175

Some people would probably want a way to achieve this as well, for the same tile, and using N S E W in a different way from above (this time meaning hemisphere):

50N_15.005S_175.5E_175W

I don't want to double-guess you on how that version might be represented in variables. (If you wanted suggestions I'm sure you'd ask.)

We have a large client who needs hundreds of tiles at a time in the first format described above. My present workflow involves tiling in the usual way out of Global Mapper, then importing all tiles to Manifold and re-exporting to new file names by script. It's a bit slow and wasteful doing it this way. (But it would be slower again to use Manifold to do the tiling as well! GM much faster.)

For many other purposes it would often be excellent to be able to create tiles with geographically meaningful names. I don't know of any other software that will do this in one hit.

A related thing I'd like, not as important but worth mentioning now, is to be able to write a geographic extent (and/or a projected extent) into the ordinary Windows file properties of any file exported from GM.

Comments

  • tjhbtjhb Global Mapper User Posts: 454Trusted User
    edited November 2009
    [Quick addition:]

    I know this might be a good reason to purchase the SDK—then I could spend a month figuring out how to do it myself. Probably not quite justified for me yet.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited November 2009
    That is something that might be do-able, especially from a script where I don't have to worry about adding a user interface. I'll try and look at this in the next couple of days.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • tjhbtjhb Global Mapper User Posts: 454Trusted User
    edited November 2009
    That's great Mike and thank you for thinking about it.

    On the other hand, I just ran the suggestion past one of my colleagues. He at first thought "that would be brilliant". Then he reminded me that there's an easier way to achieve what I'm doing now. Before each export, I could create an ad-hoc tiling in Manifold, label the tiles by script according to the naming convention I want, export to shapefile, and in GM use those areas to crop and label the layers for export.

    I've done roughly that enough times before, in other contexts, so why didn't I think of it here? Don't know. It's good to have colleagues.

    There is one snag to it, but it's small. When exporting from GM a base filename must be specified, to which the value in a column may optionally be appended, if selected areas are used for tiling. To have complete control over the naming pattern, it would often be necessary to remove the base filename from each tile after export. That's no big deal. (I think a base filename is mandatory in scripting as well as in the GUI.)

    Perhaps it would be more efficient, rather than introducing a new mechanism to create filenames using variables (which a lot of people might not learn to use), instead, to make the base filename optional for exports. I don't think there's a reason in principle why a folder name alone should not be enough, where a column is used to provide naming. (Any label collisions could be handled automatically by numerical suffixes, as I think is the case now.) This might work equally well in manual exports, in batch mode and in scripting.

    Excuse me thinking out loud and thanks once again for listening.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited November 2009
    Actually the base filename can be made optional. If when you specify the export filename just specify a filename with a period and the file extension. Then you should just get your specified filename with the specified extension.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • tjhbtjhb Global Mapper User Posts: 454Trusted User
    edited November 2009
    You are kidding! I have to try this.

    There's going to have to be a sticky thread somewhere for publicizing "hidden tricks" like this.

    That's great Mike.
Sign In or Register to comment.