polygon splitting/more than 255 polygons errors

Hi, I have recently downloaded some mkgmap generated maps that produce this error when displayed in navit: :garmin_obj.c:1279:1|:Error more than 255 polygons/lines in a subdiv are not supported It seems there were some patches for this around, did they get integrated? Do they require some special option? Tried to reporduce the issue it with mkgmap-r2009 and attached test data, I get neither the above error but the object (the Altenburg in Bamberg) isn't displayed either. Richard --- Name and OpenPGP keys available from pgp key servers

Hi Richard,
Hi,
I have recently downloaded some mkgmap generated maps that produce this error when displayed in navit: :garmin_obj.c:1279:1|:Error more than 255 polygons/lines in a subdiv are not supported
This does not look like an mkgmap problem to me. Reading the error message I assume that navit does not support subdivisions containing more than 255 polygons + lines. But as far as I know there is no such a limit for garmin devices.
It seems there were some patches for this around, did they get integrated? Do they require some special option?
There is at least one known bug regarding the creation of subdivisions. I am working on it and will post the patch when it is ready to commit. There is a first version of the patch (see http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2011q2/011818.html) but some things are not fixed in it.
Tried to reporduce the issue it with mkgmap-r2009 and attached test data, I get neither the above error but the object (the Altenburg in Bamberg) isn't displayed either.
Can you please how you created your map? 1. Where did you get your data from? 2. Did you use splitter and which splitter settings do you use? 3. Please send your complete mkgmap parameters. Otherwise it is not easy to reproduce the problem. Thanks! WanMil
Richard
--- Name and OpenPGP keys available from pgp key servers
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

There seems to be a limit to the number of polygons/polylines in a RGN subdivision as the pointers if any within each subdivision are two bytes long.But then you can have endless subdivisions as with many topo maps. -- View this message in context: http://gis.638310.n2.nabble.com/polygon-splitting-more-than-255-polygons-err... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi Richard,
Hi,
I have recently downloaded some mkgmap generated maps that produce this error when displayed in navit: :garmin_obj.c:1279:1|:Error more than 255 polygons/lines in a subdiv are not supported
This does not look like an mkgmap problem to me. Reading the error message I assume that navit does not support subdivisions containing more than 255 polygons + lines. But as far as I know there is no such a limit for garmin devices.
I have taken a look into the source code. There is a limit for 255 lines with garmin id < 0x010000 per subdivision but no single limit for polygons. Lines, points and shapes with garmin id > 0x010000 have their own limits based on the size they need. But I wonder why there is no single limit for polygons. Only the overall size of points+lines+polygons is limited to 65528 bytes. Maybe this is wrong?
It seems there were some patches for this around, did they get integrated? Do they require some special option?
There is at least one known bug regarding the creation of subdivisions. I am working on it and will post the patch when it is ready to commit.
There is a first version of the patch (see http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2011q2/011818.html) but some things are not fixed in it.
Tried to reporduce the issue it with mkgmap-r2009 and attached test data, I get neither the above error but the object (the Altenburg in Bamberg) isn't displayed either.
Can you please how you created your map? 1. Where did you get your data from? 2. Did you use splitter and which splitter settings do you use? 3. Please send your complete mkgmap parameters. Otherwise it is not easy to reproduce the problem.
Thanks! WanMil
Richard
--- Name and OpenPGP keys available from pgp key servers

Hi,
I have recently downloaded some mkgmap generated maps that produce this error when displayed in navit: :garmin_obj.c:1279:1|:Error more than 255 polygons/lines in a subdiv are not supported
This does not look like an mkgmap problem to me. Reading the error message I assume that navit does not support subdivisions containing more than 255 polygons + lines. But as far as I know there is no such a limit for garmin devices.
looks like the message comes from libgarmin. If you think its an error in libgarmin I will have a look at that.
There is a first version of the patch (see http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2011q2/011818.html) but some things are not fixed in it.
if possible recommend me some nightly snapshot or similar which I could test.
Tried to reporduce the issue it with mkgmap-r2009 and attached test data, I get neither the above error but the object (the Altenburg in Bamberg) isn't displayed either.
Can you please how you created your map? 1. Where did you get your data from? 2. Did you use splitter and which splitter settings do you use? 3. Please send your complete mkgmap parameters.
I got the data as http://api.openstreetmap.org/api/0.6/map?bbox=10.866503,49.878919,10.871985,... here for viewing http://www.openstreetmap.org/?lat=49.880477&lon=10.869244&zoom=18&layers=M downloaded to "map-altenburg-only.osm.xml" and mkgmap map-altenburg-only.osm.xml The resulting image (mkgmap-r2009) does no longer produce the visible error message but the castle isn't visible either. Richard --- Name and OpenPGP keys available from pgp key servers

Hi, On Fri, Sep 2, 2011 at 9:26 PM, Richard <rz@linux-m68k.org> wrote:
Hi,
I have recently downloaded some mkgmap generated maps that produce this error when displayed in navit: :garmin_obj.c:1279:1|:Error more than 255 polygons/lines in a subdiv are not supported
This does not look like an mkgmap problem to me. Reading the error message I assume that navit does not support subdivisions containing more than 255 polygons + lines. But as far as I know there is no such a limit for garmin devices.
looks like the message comes from libgarmin. If you think its an error in libgarmin I will have a look at that.
The message is indeed from libgarmin, but if someone proves that polygons can be more than 255 fixing wouldn't be so trivial. 255 limit comes from garmin object addressing - in mdr(index file) you have subdiv(2 bytes):object(1 byte). there are references to this in the various sections in img file itself, lbl sections. If someone have noticed for example that polylines and polygons can be indexed too mdr sections before first poi section describing variuous types available for search seen in an old metroguide map that can fake Lake Someranodmbiglake name. -- have fun, alex P.S. Richard if you have fixes or need help with libgarmin, contact me.

Hi,
On Fri, Sep 2, 2011 at 9:26 PM, Richard<rz@linux-m68k.org> wrote:
Hi,
I have recently downloaded some mkgmap generated maps that produce this error when displayed in navit: :garmin_obj.c:1279:1|:Error more than 255 polygons/lines in a subdiv are not supported
This does not look like an mkgmap problem to me. Reading the error message I assume that navit does not support subdivisions containing more than 255 polygons + lines. But as far as I know there is no such a limit for garmin devices.
looks like the message comes from libgarmin. If you think its an error in libgarmin I will have a look at that.
The message is indeed from libgarmin, but if someone proves that polygons can be more than 255 fixing wouldn't be so trivial.
255 limit comes from garmin object addressing - in mdr(index file) you have subdiv(2 bytes):object(1 byte). there are references to this in the various sections in img file itself, lbl sections.
If someone have noticed for example that polylines and polygons can be indexed too mdr sections before first poi section describing variuous types available for search seen in an old metroguide map that can fake Lake Someranodmbiglake name.
I tried to check with a simple testcase if more than 255 polygons in one subdivision are supported. But it's not so easy as I expected. I created a single OSM file with 256 lakes (natural=water) close together. But MapSource cuts the lakes on virtual borders around the map and doesn't display them in each zoom level. MapSource is not bugfree but when I see the result of such a simple file I assume there's more wrong with the subdivision handling of mkgmap. Also using less than 256 polygons (e.g. 64) does not give better results. So I cannot give a clear answer till now. WanMil
participants (4)
-
Alexander Atanasov
-
n Willink
-
Richard
-
WanMil