MP Export Error
Roger Edrinn
Global Mapper UserTrusted User
I've attached two shape files: Cities and Public Lands. No matter how I combine them, import into GM, export to a single shapefile, combine in a GM package file, use in a workspace, these two files only render the city areas when exported to MP.
In opening the MP file, one sets the TYPE= as State, City i.e. some alpha string, while the other sets TYPE=0x02 a hex string.
In looking at the MP_Type attribute, all are vacant, hence GM should default to its MP_TYPE values. Correct?
Suggestions?
Thanks
In opening the MP file, one sets the TYPE= as State, City i.e. some alpha string, while the other sets TYPE=0x02 a hex string.
In looking at the MP_Type attribute, all are vacant, hence GM should default to its MP_TYPE values. Correct?
Suggestions?
Thanks
Comments
-
Roger,
The problem is that the Shapefiles do not have an inherent classification, so unless the LAYER attribute found in those Shapefiles matches the name of an area type in Global Mapper, the areas are assigned the type 'Unknown Area Type'. Any types that do not have a built-in default MP_TYPE mapping (such as 'Unknown Area Type') just write out the description for the type/feature as the TYPE= value in the exported MP file so that users can modify their RgnType.txt file to add new type assignments for cGPSMapper. If cGPSMapper does not find a text match, I believe that they now discard the features (I think they use to write them out as an unknown type which some units would still render).
What I would suggest is using the Search->Search by Attributes menu command to search on the different LAYER attributes found in the public lands file and edit the matching features for a particular LAYER value to either be of some built-in type with an automatic MP_TYPE assignment (like one of the park types) or manually add your own MP_TYPE attribute to those features to provide the type assignment that you want.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Mike,
Thanks for straightening me out. Now at least I know what is wrong. The fix is actually fairly easy.
Thanks again -
Still puzzled by why GM did not assign the correct MP_TYPE to some of the areas. For example, GM knows what a National Forest and National Park is. What happened?
I did as you suggested and assigned an MP_TYPE to all know areas, any unknown area was deleted. The net result, all the areas showed correctly. However, a little mystery. Rocky Mtn NP, a very large area only showed when zoomed in, strange.
Another benefit, 095a no longer errors. Apparently it doesn't want to see TYPE=text, needs to see a hex string.
Thanks for the help. -
If there are already area types with a name that match the LAYER attribute from the Shapefiles, then those types will be automatically assigned. Since there is a 'National Park' area type, any features with a LAYER attribute value of 'National Park' got auto-assigned. You can set up auto-assignment on load this way simply by adding new custom area types with names matching the LAYER attribute value from the Shapefiles.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
I think you're not understanding me.
I opened the raw shapefile and went through every area and assigned both the correct name <Feature Name> and <Feature Type> selecting the default area for each type. For non-standard area types, new ones I created, each had been previously assigned a specific unique MP_TYPE.
I then exported those area vectors to a new shapefile, the one attached. I used the same process for the cities, it worked.
So I wasn't looking for GM to auto assign anything. I had already done the heavy lifting, yet GM didn't retain that knowledge and export the hex TYPE= value.
What am I missing?
Thanks -
What options did you select when exporting the Shapefile from Global Mapper? Did you select the option to 'Add Feature Type (LAYER) Attribute to DBF'?
Here again I might recommend using Package files as it has built-in support for all of the type and styling information used in Global Mapper and doesn't have to base everything off a generic set of attributes, which may be ambiguous in some cases.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
I used the default Shapefile export settings and selected export all, no cropping.
I have one problem with the package file export. When I open it, rather than seeing the name of the package file in the Control Center, I see all the source files. FWIW, I'd much rather see just the package file name and use the options menu to see the source files.
Thanks -
If you check the box to 'Add Feature Type' when exporting your Shapefile then the types should be maintained perfectly. This option is not checked by default.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
On the File Selection tab of the Shapefile Export Options dialog, the third of four switches reads:global_mapper wrote: »If you check the box to 'Add Feature Type' when exporting your Shapefile then the types should be maintained perfectly. This option is not checked by default.
Add Feature Type (LAYER) Attribute to DBF
That box is checked when I open the dialog, not so with your version?
I have v9.03 April 27
So assuming the actual version I used, a least a half-dozen upgrades in the last two weeks, was also checked? Then if I understand correctly, the problem I experienced should not have happened?
Thanks -
It looks like I was mistaken as the 'Add Feature Type (LAYER) Attribute to DBF' option IS checked by default, however it looks like you had it unchecked when your SHP files were generated because if you had assigned types to the features then saved a SHP file with that checked, you should also have had GM_TYPE attributes in the resulting file, which does not seem to be the case.
What was your original source for this data from which you generated the Shapefiles?
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
The two files above started from CDOT.global_mapper wrote: »What was your original source for this data from which you generated the Shapefiles?
Because they are relatively small, I most likely worked straight through and then exported my results to the shapefile. I do not have a workspace file.
Discovered the same problem with my Placenames, the MP file has Type=Point rather than Type=hex. However I do have a gmw, so might be able to quickly recover by opening it and exporting to package?
I'm not a rookie at this, just not getting the results I was expecting.
Thanks
Edit: Looking some more, CDOT no longer has Land Status, see their note. Also, I do have two gmw files, didn't notice them yesterday, they don't appear under Open/all common types. -
Is it possible that you accidentally unchecked that box when you did your Shapefile export? If you load the workspace files that you found are the type assignments preserved? Can you then try exporting those to Shapefiles and see if it works ok?
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Highly unlikely, the purpose is clear and I was exporting the shapefile with those definitions in mind.global_mapper wrote: »Is it possible that you accidentally unchecked that box when you did your Shapefile export?
Other than exporting to an MP file, I know not how to tell.If you load the workspace files that you found are the type assignments preserved?
I exported my Place Names to a package file, then included it in my master, then exported to MP. The MP file had many points as Type=text, not Type=hex.Can you then try exporting those to Shapefiles and see if it works ok?
So I would ask you, is their an ironclad way to check if the MP_TYPE defintions are set correctly? Or must I go through every point in the Vector Point tab and explicitly set the MP_TYPE?
Even a labor entensive solution is better than this wild goose chase.
Thanks -
After loading my Place Names workspace file, I opened the Configuration dialog > Points tab and started going through the list of points. Each point type attribute had an MP_TYPE assigned. Yet many of those same points had Type=text in the MP file.
I'm confused. -
After looking at your Shapefile data I think that you are getting Type=<string> and not Type=<hex> in your export is because many of the features have an explicit MP_TYPE attribute with an empty value. Since the default attribute list for a feature type is only used if the feature itself does not have a MP_TYPE value, this blank value would short-circuit the use of the default attribute list and cause things to fall back to the default Global Mapper type to MP_TYPE mapping, which itself just writes the type name out if no type mapping is known.
I think you are getting the empty MP_TYPE attributes by using Shapefiles. With Shapefiles every feature has the same set of attributes, just with potentially different vaules. So if one feature in your export has a MP_TYPE value specified for it, then ALL features in the export will get a MP_TYPE attribute. Those that didn't already have one will have a blank one, which will then cause problems when you re-import and try to use it for MP export.
I have decided to get around this by simply ignoring empty MP_TYPE attributes associated with individual features. This means that the default attribute list could be used even for Shapefiles where some but not all features have a MP_TYPE attribute. I have placed a new build at http://www.globalmapper.com/global_mapper9.zip with the change for you to try. Simply download that file and extract the contents into your existing v9.xx installation folder to give it a try.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Your explanation makes sense and better yet, your fix solved the problem. I'm off and gridding.
Thanks -
I am running into the same issue here, I thought when I create a custom type in GM10 and than export to MP format that GM10 creat's all the information needed to export correctly to compile the MP file to cGPSmapper.
Is that not so? Please explain the correct process what one has to do, thanks in advance for yor help. -
When creating a custom type you also need to add a MP_TYPE attribute to the default attribute list for that type so that Global Mapper will know the MP file type mapping to use. See the tutorial on this at http://www.globalmapper.com/helpv10/cGPSMapper.pdf for details.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Thank you Mike for the PDF tutorial, I read that before and it makes no sense regarding the use within GM.
I created a new type inGM10 ( Please see picture ) and I need to know where i can assign the "hex" values to my new type. When I export to MP format and open the MP file in notepad then I get the TYPE= <BLM Land> and there is no "hex value.
Therefore when I compile the MP file to Img format "cGPSmapper is giving me an error code of "308" (Type Element cannot be 0).
So please expalin what the process is to create a custom type within GM10, thanks Mike -
You need to press the 'Attributes' button on the Area Styles tab of the Configuration dialog and then add a MP_TYPE attribute with the value as your hex code as the value for that attribute.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Thank you for your response Mike,
Mike I created a new type, I added the type attribute data as well. And still I am getting the same error "308" from cGPSmapper. I looked at the MP file and there are no TYPE= <hex> data in the file, please see attached files please.
Any Idea what might be the problem ? -
The name of your attribute should be 'MP_TYPE', not the name of your type. Changing that name in your default attribute list should fix the problem.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Mike i changed the name and it shoes now in the MP file. However when I open the finished MP file in GM10 there is no color displayed and the Feature type is saying "undefined area ( please see the 2 pictures ).
So I opened the file in GPSMapEdit and everything is in red and the description is stating "Unknown" .
What happened to the colors and to the description ? -
Can you send me the MP file that was created? I would have expected the type to be auto-assigned in Global Mapper when you loaded the MP file since there was a feature type with a MP_TYPE value of 0x56 in the default attribute list. Note that any color information used in Global Mapper would NOT carry over into the MP file. Only the type assignment does. It is up to the GPS units to decide how to render a type, cGPSMapper does not have any control over that.
As an aside, what is the 0x56 area type? I do not see that in the RGNType.txt file distributed with cGPSMapper.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Thanks again Mike for your quick response,
Mike I don't know what happened but after the update you send me the colors are showing up now. Also when I open the same file with GM9 they do not.
Regarding the 0x56 type, this is a custom type I created with "GenType". I did not use this yet because I do not know how to add the custom type file to "cGPSmapper".
I must tell you I still do not understand custom types yet even after reading the tutorial and other papers. All I want to do is modify the name for overlays. I want to use the types what are there including the crosshatch, however I would like to modify the colors and apply different names to them.
That's why I think that I have to create custom types, I think I lost here.
-
Ah, it sounds like you want to define your own types with your own specified style information. This is a rather complex thing to do and is not yet supported in Global Mapper automatically. You would need to create your own custom type definition files. I don't have any personal experience doing this, but I think there is some documentation for this at cGPSmapper - Your Tool For Creating Maps that describes the process.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Thank again Mike for your help,
I will check this link out today.
Can you please tell me then what the custom type is in GM10 is ? Also what does the Attribute is for then, thanks.:) -
The custom type and default attribute list support for MP in Global Mapper is for defining your own mapping from a Global Mapper type to a type hex code used by cGPSMapper. For example you might define a new road line type and you want Global Mapper to know on export what MP hex code to use for features of that type. The default attribute list mechanism provides an easy way to do that. For pre-defined MP types, the hex code is all that you need as the Garmin units themselves determine how to draw features of that type.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com -
Thanks again Mike that makes sense. I guess I have work to do and get going on this.
thanks for all your help Mike. -
there is a new rgntype file with the latest cgpsmapper. Do I need to copy that file to a spicial folder so GM knows what types are used.
Is there a list of names and numbers that are used by GM.
for instance
0x04 Arterial Road -medium
0x05 Arterial Road-thick
but there is only one Arterial road in GM.
Categories
- 13K All Categories
- 5.8K Features Discussion
- 351 Downloading Imagery
- 1.3K Elevation Data
- 385 Georeferencing Imagery Discussion
- 652 GM Script Language
- 56 User Scripts
- 115 GPS Features
- 423 Projection Questions
- 837 Raster Data
- 1.4K Vector Data
- 6.7K Support
- 183 Announcement and News
- 944 Bug Report
- 565 SDK
- 1.2K Suggestion Box
- 3.8K Technical Support
- 583 Other Discussion
- 132 GIS Data Sources
- 27 Global Mapper Showcase
- 246 How I use Global Mapper
- 111 Global Mapper Forum Website
