Subscribe to this thread
Home - General / All posts - Possible to export to .gpx?
tonyw
642 post(s)
#05-Jan-22 00:05

I'm setting up a simple map viewer in Google MyMaps. I had suggested the client use M9 Viewer but no uptake. I provided printed maps instead. My next options are PDF files with layers they can view/hide or Google My Maps to which I can remotely continue adding layers which is appealing. The client would probably be OK using a browser based map.

In M9 I tried exporting to .kml but am limited by the table having only Name and Description fields, I haven't figured out a way to import more fields. The features are areas, there are about 700 areas so too many to manually add back data into the fields. For point data I can export lats and long and many fields to .csv which MyMaps will import fine.

I see MyMaps will import .gpx though I don't see an option in M9 to export to .gpx unless I'm missing something. I read the M9 manual on .kmz/.kml but it covers mainly importing those formats.

Any suggestions on populating MyMaps with areas and data in fields? MyMaps is super basic but will do the job here.

Thanks.

Formats Google My Maps will import

  • CSV
  • TSV
  • KML
  • KMZ
  • GPX
  • XLSX
  • Google Sheet
  • One or more photos in Google Drive or Google Photos

Unzipped KML and KMZ files can be up to 5MB. Other files can be up to 40MB.

oeaulong

378 post(s)
online
#05-Jan-22 01:36

I did this more years ago using v8. I have only had success with creating the description field with, like labels, aggregate info fields to show up in the Description dialog in GE, but haven't tried to prettify the result. I am pretty sure that this field can be html to provide some context of emphasis in tags, etc. I think with some SQL, you can create/build a nvarchar field holding html "label" info from other fields and roll it into a calculated field. When you need to update the .kml, copy the calculated field over to Description and export. Also, KML uses "ID" as an internal field, so any ID field in manifold, that value transfers in GE/Maps.

Manifold 9 supports GPX. Perhaps that is a better data route for you, it seems to export more fields. see: https://manifold.net/doc/mfd9/gpx.htm

good luck with the client.

dchall8
916 post(s)
#05-Jan-22 07:10

I used to make Google Earth files available from our appraisal district via our website. The export to kml came from Manifold 8 and included fairly sophisticated HTML for colors and formatting. Our data changed all the time, so I had to update the field which held the HTML coding before every release. The result looked like this image only with the details filled in.

When the user clicked on a parcel, the bubble appeared with information as well as clickable links to get more information. And now that I think about it, the link for directions from the airport opened a new tab with Google Maps driving directions. If you search this forum most of the coding is posted here.

Google Earth can set up kml files for Google Maps, but I never tried that with these. If your user is willing to use Google Maps, might they be willing to use Google Earth?

My most important users were the appraisers in my office. I set up the file and a special code on our server which checked the kml file for updates every 15 minutes, so they were were always working with the most recent post. If they wanted an updated posted, that took about 10 minutes to make and post.

Attachments:
Google Earth Overlay Neighborhood with bubble.png

adamw


9,820 post(s)
online
#05-Jan-22 14:03

From the list of formats, it seems the choice is between either (a) keeping all fields (well, all fields with simple types like number / text / date, opposite to binary / geom / tile, anyway) but forfeiting areas and exporting points (CSV, TSV, XLSX), or (b) keeping areas but using a fixed set of fields (KML, KMZ). We do not currently export GPX, but even if we did, that likely wouldn't be of much help because GPX files mostly follow a fixed structure, like KML = case (b) above. We do not currently export to Google Sheets either, but that would be like CSV, case (a) above.

You could try using KML and combining all fields you want to show in Google Earth into Description, creating something like: 'Households: xxx' + CrLf + 'Area: xxx' + CrLf + ... . An even better alternative would perhaps be putting the fields into some database with a web interface, then generating a link to the relevant record and putting the URL for that link into the Description - but that might be too much work if you don't already have such a database that you could use. In the future, we could probably allow exporting values for all fields into KML as custom attributes.

Mike Pelletier


1,966 post(s)
#05-Jan-22 15:45

... allow exporting values for all fields into KML as custom attributes.

This would be very useful and remove another need for one of those other GIS packages. :-)

tonyw
642 post(s)
#05-Jan-22 22:42

Thanks everyone for the ideas.

@Oeaulong: Thanks, I ended up doing something similar, fortunately my label info was already in separate fields in M9. I ended up making copies of my table in M9, renaming two fields to Name and Description, create a drawing, exporting the drawing to .kmz, importing to MyMaps then opening the data table and duplicating the columns which gave me the opportunity to change the column title and setting one as the "title column". Then deleting the original columns "name" and "description". So one table to multiple .kmz files each becoming a layer in MyMaps.

For another project, I populated an Excel table with lats and longs and many fields with data. MyMaps will import .csv with many fields, but this only works for point data. That gives me an idea, to add another geom field to the table in M9, this new geom field being the centroid of each area. Then I can export a drawing with points to a .csv file with multiple fields to import to MyMaps. I would end up with two layers, one for the area borders, the second with points and the data. I'll try that and see if it's intuitive to use (use points at centroids to open the data table).

I checked out .gpx and M9 imports .gpx but won't export to .gpx.

@dchall8: Oh right, Google Earth can import shapefiles. I tried the web version of Google Earth but couldn't find a way to import data. Unless someone is already using Google Earth, I rarely can get people to download and install new software.

@Adam: That's an idea to store a link in Description.Right, on another project I stored a URL in the Description field of MyMaps and the URL led to a webpage with pictures, stories, video and other info on the site represented by the point in MyMaps. I created a new gmail address for the client for the MyMap so I could link to google sheets. I will need to see if I can link to a record (row). The client doesn't have any database capability nor do they use any webhosting services.

@Oeaulong: Thanks. Re: "good luck with the client". I've never had much luck with any clients getting them to try new things, to download and install software, like M9 Viewer, or to use a team collaboration site, or to access resources in a secure part of their website, or to use cloud storage hardware THEY bought, etc. I should talk, I'm like that too, unless I'm absolutely forced to, I avoid installing or signing up for anything new. Browser based has a low threshold for adoption.

oeaulong

378 post(s)
online
#05-Jan-22 23:16

Glad you made some progress.

I made my bread in the Aughts mostly through the multi layer ad absurdum PDF and taught clients the whole "Turn off all layers. Good. Now turn on the layers you want to look at." approach. Still a very handy mapping presentation tool, though I have long pined for some augmentation to the PDF export.

The shapefiles import into Google Earth require the upgrade to Pro. I don't think that they are charging for it anymore, but probably still requiring registration with an API key and maybe a separate install. Even the import of shapefiles, i don't believe, maintain extra fields to be presented.

A great add-in for manifold might be an html builder applet that can tie into the manifold exposed fields to help generate such polished KML description fields..

Keep at it and repost any new insights you may come across. Cheers.

Oeaulong

tonyw
642 post(s)
#06-Jan-22 05:23

I tested adding a now geom field "points geom" based on Transform, Centre, Inner. My areas are irregular shapes with convex and concave borders so the centres sometimes fall in not so useful places (see attached image). The point with the yellow arrow I moved from the edge. I left the point with the red arrow but that point probably could be moved to between the two brown coloured areas. With a small number of areas I could manually position the points. I'd have to re-do the re-positioning each time I got an updated table.

A thought, what if Manifold 9 cold generate a standalone executable (no installation required) that was a .map file and viewer together. The client would download it, run or open the .exe file (therein lies a problem, software unknown to the operating system) and you have a standalone map with it's own viewer. The functions would be zoom, turn on/off layers, print, and pen tool for annotating. Sharing by cloud storage would take care of sharing large files.

Attachments:
Centroids.jpg

Dimitri


6,899 post(s)
online
#06-Jan-22 07:48

a standalone executable (no installation required) that was a .map file and viewer together.

That's an appealing idea, but as you point out, there are significant security issues when launching an unknown .exe in Windows.

You can get close to the above right now. For example, you can distribute a .zip file that in the zip file has an unzipped portable installation of Viewer, plus the .map file you want to open. To make the .zip file smaller, you can just include either only the bin64 (for 64 bit operation) or bin (for 32 bit operation) parts of the installation. Hand out the .zip file to your recipients, and then they simply unzip and double-click on manifold.exe to launch and then open the .map file.

Or, you could just put the installation and .map file on a USB drive, and tell people to Run the USB drive (you can set what file is to be executed when a USB drive is autorun).

You could also provide a batch file that launched Manifold with the desired .map file, which is an option when launching Manifold in a command line.

Another way to simplify the above is if when Manifold launched it checked to see if there was a "startup.map" file in some standard part, like a data folder or the shared folder, of the installation hierarchy. In that case, launching Manifold would automatically launch with that startup.map. You could then package Viewer with the desired .map, and launching Viewer would launch with that .map.

I've sent in the idea for a startup.map as a suggestion.

There are other possibilities for being able to distribute an .exe that when double-clicked automatically launches Viewer with a given .map, but they are more complex and using .exe to distribute data is a security risk.

But if you're willing to take on such risks, Manifold could, for example, have an option to save a .map as an auto-installing .exe file. The .exe would consist of the data payload, plus a tiny executable that would a) first check if Viewer or 9 were already installed, and if not, b) download a Viewer portable installation, install it, and launch it with the data payload. In that case the size of the .exe would not be much bigger than the actual .map payload within, and you'd have the benefit that when users launched it they'd be working with a recent Viewer build.

But it's not clear what the gain is in that beyond simply providing a Viewer installation, and I doubt Manifold would be eager to introduce yet another risky use of .exe files for data distribution. Viewer isn't hard to install, and once installed you get an association with .map files, so users can thereafter simply double-click a .map file to view it. Viewer installation packages can be confirmed by their SHA to know the .exe is legitimate.

adamw


9,820 post(s)
online
#06-Jan-22 13:21

A small clarification regarding:

Or, you could just put the installation and .map file on a USB drive, and tell people to Run the USB drive (you can set what file is to be executed when a USB drive is autorun).

In order to make a USB drive like that, you would need to:

(a) put the unpacked portable install onto it (eg, as: viewer\...),

(b) put the MAP file onto it (eg, into the root folder: mymapfile.map),

(c) put the AUTORUN.INF file with instructions to launch the desired viewer EXE (64-bit or 32-bit) with the MAP file into the root folder.

AUTORUN.INF is quite simple to write, it's just a regular text file which would contain something like:

[AutoRun]

open=viewer\bin64\manifold.exe mymapfile.map

Here is the full syntax: AUTORUN.INF entries

The majority of systems will not actually do what AUTORUN.INF tells them to the moment you plug in the USB drive into the PC - and that's a good thing (security) - but you still can right-click the drive and tell it to "run" using the context menu, which is pretty user-friendly.

Dimitri


6,899 post(s)
online
#06-Jan-22 15:19

Another version of the above is to distribute a .zip file that contains Viewer, the .map (or .mxb) file, and a batch file to launch Viewer with the .map file.

There's a new example of the above added to the Examples sections of the product download pages for 9 and for viewer: meteorites.zip (33356 KB).

That is a zip file that contains a 32-bit Viewer portable installation (build 176), the meteorites.map project, and a batch file, all in a 33MB zip file.

Download, unzip the file, and then double-click on the double-click me.bat file to launch Viewer with the meteorites project. The batch file shows how easy it is to publish data in a form that includes the free Viewer and does not require users to do a separate Viewer download and installation. A 32-bit Viewer installation is used so the same file can be distributed for use either in 32-bit or 64-bit Windows.

Batch files are easy to create: write whatever you want into a .txt file using notepad, and then change the three letter extension to .bat.

tonyw
642 post(s)
#08-Jan-22 19:21

Thanks Dimitri and Adam for the ideas for deployment.

Question, is the Viewer standalone? I downloaded the portable version and the instructions in installation.txt says MS .net framework and visual C redistributable still need to be present (installed) on the users computer.

I have MS .net framework and visual C redistributableon my laptop (from the M9 installation). From the portable download I opened manifold-viewer-9.0.176-x64.zip\manifold-viewer-9.0.176-x64\bin64 and tried to run "manifold.exe". It is a compressed file that needs to be unzipped. I hadn't used Portable, I assumed it was stand alone. This is a question for another topic, but Portable seems a lot like the installer version requiring installation of the two MS packages and unzipping? The only difference is no permanent installation of M9 Viewer?

What I need is something a bit different, for users to use it is a standalone map viewer where the single file opens in a viewer showing the map (one file, no command line, no batch file). I would need the user interface reduced to show just the Layers pane and nothing else on startup (turn layers on/off being the only option). The Style, Select, Transform, and Info panes would need to be disabled on startup as well in the Viewer. Google's MyMaps does the job but is tedious to generate each layer given limitations of .kmz files to two fields.

It's the nature of my business, the clients have expertise in other areas but unlike most of us, they don't spend their days in front of a computer. They do everything on their cellphones. Some don't have laptops. For some we have arrangements for the user to go to someone's office to use a computer. The lender of the computer is unlikely to want new software installed or spend time offering tech support. Still I want to get past maps on paper so the user can turn on/off layers and have "ah hah"! moments.

Dimitri


6,899 post(s)
online
#09-Jan-22 15:18

I downloaded the portable version and the instructions in installation.txt says MS .net framework and visual C redistributable still need to be present (installed) on the users computer.

Correct. The documentation does a good job of covering it. See the Installations topic.

is a standalone map viewer where the single file opens in a viewer showing the map (one file, no command line, no batch file).

There are pluses and minuses, including significant security risks, that are discussed earlier in this thread.

Still I want to get past maps on paper so the user can turn on/off layers and have "ah hah"! moments.

The way to do that is with IMS, such as is already in 8 and will eventually appear in 9.

tonyw
642 post(s)
#09-Jan-22 03:59

double-click on manifold.exe to launch and then open the .map file.

I will check out the portable viewer again, the above suggests Viewer will launch without installation.

dchall8
916 post(s)
#06-Jan-22 00:53

@dchall8: Oh right, Google Earth can import shapefiles. I tried the web version of Google Earth but couldn't find a way to import data. Unless someone is already using Google Earth, I rarely can get people to download and install new software.

I was thinking you would export the kml from Manifold into Google Earth desktop. Then export the kml from GEd to Google Maps MyMaps for your clients.

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.