GPSFileDepot Forums

General Category => Map Making Support => Topic started by: savage on August 06, 2008, 02:14:20 PM

Title: Problem with cGPSMapper
Post by: savage on August 06, 2008, 02:14:20 PM
Any ideas how to debug this one:


*******************************************************************************
          Garmin and MapSource are registered trademark or trademarks of
                     Garmin Ltd. or one of its subsidiaries.
*******************************************************************************
              cGPSMapper home page: http://cgpsmapper.com
*******************************************************************************
Importing and preprocessing data
Current import datum is: W84 :WGS 84 Global Definition II
Reading [DICTIONARY]

../MA/MAtopo01_A1.MP(139931) : Error E038: Type of element cannot be 0.
Title: Re: Problem with cGPSMapper
Post by: -Oz- on August 06, 2008, 02:42:06 PM
i know what the issue is but at the same time I can't tell you.

Can you email me the .mp file? services @ gpsfiledepot.com (remove the spaces around the @)

There is an Unknown type on line 139931.  Once "we" know the name we can figure out where the error was.
Title: Re: Problem with cGPSMapper
Post by: savage on August 06, 2008, 03:57:48 PM
Thanks for the tip. Here is the bad part:

[RGN80]
Type=Unknown Area Type
Label=Massachusetts
Data0=(42.5,-73),(42.5,-73.3560404),(42.500018,-73.356031),(42.510002,-73.352527),
(42.511139,-73.352064),(42.511594,-73.351892),(42.524154,-73.347303),

It looks like it is some sort of boundary (state or county). Let me know if you need the file.
Title: Re: Problem with cGPSMapper
Post by: -Oz- on August 06, 2008, 04:04:26 PM
Did you convert the state to a line?  Because it seems like although you may have you left the polygon that the state border came from.

If that is the case maybe the tutorial needs a little bit more work.
Title: Re: Problem with cGPSMapper
Post by: -Oz- on August 06, 2008, 04:24:25 PM
side note: you won't be able to compile any segments because most likely the state continues into those segments.
Title: Re: Problem with cGPSMapper
Post by: savage on August 06, 2008, 06:03:27 PM
Thanks. I will looked into the state and county lines tomorrow. I think I remember having difficulties in this area.
Title: Re: Problem with cGPSMapper
Post by: -Oz- on August 06, 2008, 06:10:40 PM
if I can help you out let me know.  The key is to copy the line (not the polygon) and then paste it into a new file so you don't have the polygon.  (or open the control panel and close the polygon layer).
Title: Re: Problem with cGPSMapper
Post by: savage on August 07, 2008, 06:41:07 PM
I am still getting quite a few of those "Unknown area type". I am going to make a bare bone map and add one layer at a time to see where they are coming from. I know I removed the border completely.

This could take a few days to figure out.
Title: Re: Problem with cGPSMapper
Post by: -Oz- on August 08, 2008, 04:18:55 AM
very interesting.  let me know the results; perhaps I missed something in the tutorial.
Title: Re: Problem with cGPSMapper
Post by: savage on August 08, 2008, 12:18:59 PM
I made some progress. The Unknown Area Type is coming from the nhd_waterbody.shp file. There maybe others. Here is an snippet of the associated MP file:

[RGN80]
Type=Unknown Area Type
Data0=(42.793154,-74.090861),(42.7932061,-74.0908459),(42.79324,-74.0908361),
(42.7932875,-74.0907875),(42.793332,-74.090742),(42.7933389,-74.0907009),
(42.793304,-74.0906521),(42.79331,-74.090539),(42.7932929,-74.09051),
(42.793251,-74.090521),(42.79318,-74.0906109),(42.7931169,-74.0906419),
(42.7929449,-74.090676),(42.792906,-74.0907061),(42.792895,-74.0907239),
(42.7928969,-74.0908009),(42.7929141,-74.090877),(42.7929359,-74.0909039),
(42.792976,-74.0909109),(42.793049,-74.090888),(42.793154,-74.090861)
[END]

I tried to track it down to the .sql file but unfortunately the lat/long are not easily readable in the SQL file and the SHP file is binary.

What next?
Title: Re: Problem with cGPSMapper
Post by: savage on August 08, 2008, 12:42:08 PM
I was looking inside the sql database and there are many mp_type that are null:

19432;"Unknown Area Type";159293933;"11/04/07";"High";0;"";0.004;0;2020006013018;"LakePond";39000;0.00266677692073;

The fcode is 39000 but those fcode are not updated by the sql query.

What is a 39000? Is it a pond?
Title: Re: Problem with cGPSMapper
Post by: -Oz- on August 08, 2008, 02:22:55 PM
I've updated all the water queries to have a catch-all at the end where if the type isn't set it gets rid of it.

http://www.gpsfiledepot.com/tools/nhd_queries.zip

With that said; fcode 39000 is a "LAKE/POND" with no attributes. I've updated the queries to take this into account.  So your best bet is to download the new queries and rerun the waterbody stuff.  Sorry and I find it odd with my maps I've never caught that fcode.
Title: Re: Problem with cGPSMapper
Post by: savage on August 09, 2008, 06:06:19 PM
Thanks. Those new queries fixed a lot of problems but I am still getting few "Unknown Are Type". Stay tuned!
Title: Re: Problem with cGPSMapper
Post by: -Oz- on August 09, 2008, 06:16:16 PM
really; definitely let me know where, very odd since I just made most of new mexico and have yet to run into these issues; must be a new england thing :-D
Title: Re: Problem with cGPSMapper
Post by: savage on August 10, 2008, 03:26:10 AM
I think some of the "Unknown Area" are coming from the nps_boundary.shp
Could you check it for MA?
Title: Re: Problem with cGPSMapper
Post by: -Oz- on August 10, 2008, 07:35:34 AM
I think some of the "Unknown Area" are coming from the nps_boundary.shp
Could you check it for MA?
Did you download http://www.gpsfiledepot.com/tools/nps_boundary.zip  I actually had forgot to upload it until Friday when I tried to download it and realized it didn't exist.  I just opened it an everything has a MP_TYPE but if you want to check the one you have open it in Global Mapper and then go to Search>search by attributes, names, descriptions; there should be a column called MP_TYPE and every single one should have 0x14 in it.  If it doesn't download the new one (linked above) and check that.

Hopefully that'll solve the issues.  I look forward to seeing your map.  I am just waiting for the USGS NHD people to email me the rest of the water data for new mexico then I just need to compile it; everything is processed.

Do you have another state you're going to work on next?  I have a program I've been working on that make making maps much much faster and if you want to test it out I'll send it your way.
Title: Re: Problem with cGPSMapper
Post by: savage on August 10, 2008, 02:21:26 PM
Ok that was my mistake! I checked the MP files do not have any Unknown Area and the cGPSmapper is running. Let's wait and see!

My next state is going to be Maine. I did Massachusetts because I live there and it is easier to test on my Garmin. Now that I am almost done with MA, I think ME is going to be easier.

Sure if you have better software I will be happy to try it out.
Title: Re: Problem with cGPSMapper
Post by: -Oz- on August 10, 2008, 03:11:42 PM
I sent you an email with the program; let me know what you think.

Glad its working.  Once you make the setup for it make sure to post it :)