Best way to overlay bunch of polygons?

Started by lazadugi, November 04, 2017, 01:16:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lazadugi

I have been using Orux for quite a while. But I am now getting better and better data. Even vector files!

Thus:

    What is the best way to overlay a bunch of polygons or lines?





For Google Earth I just create 0.5MB KMZ files with

   <Folder><Placemark><MultiGeometry><Polygon><outerBoundaryIs><LinearRing><coordinates>....

Yes, I do have thousands of polygons or lines, but I can live with a small window of say hundreds or less.





But this is not that easy in Orux. Most combinations do not work :(

And I am not trying to overlay bitmap images or text, just lines and polygons.

It seems that something along simple  <Placemark><LineString><coordinates> might work though...

Still there are issues: how many are allowed? how do I make lines to be thinner? are <Folder> or <MultiGeometry> offending commands? ...





What I noticed is that making dummy polygon with "Draw Overlay" on the screen saves coordinates into sqlite file oruxmapstracks.db

The result looks good on screen (thin lines, smooth, fast).

While I can create custom SQLite file (just give me few examples with lines and polygons),

what bothers me is that changing oruxmapstracks.db doesn't seem to be a good idea, right?

Is there a way to get Orux to load another separate  SQLite file with my custom overlay of lines and polygons? This would be *ABSOLUTELY FANTASTIC*!!!

lazadugi

#1
OK, I had some progress with KML (though having SQLite input overlay would probably be the best!).



One offending command I found is: <color>#ff0000ff</color>

I have that everywhere in the code. But I checked KML standard and it gives color without #: <color>ff0000ff</color>

No idea why I had colors with #, and GoogleEarth certainly didn't complain...

Maybe it would be nice if Orux master accommodates for this in the Orux app?



One quirk of Orux is that it displays thick lines by default. However adding <width>1</width> fixes that.



Another detail is that Orux is not fully checking XML validity! I had a file that

displayed in Orux, but had mismatched tags (and GoogleEarth would reject it).



Fixing <color> tags I made KMZ with about ~6000 polygons and ~4000 labels (works well in GoogleEarth with <IconStyle><scale>0</scale></IconStyle>).

Orux does load such KMZ overlay (0.5MB as KMZ, 4MB as KML), but it is horribly slowed down.

To me the good news is that Orux manages to load such amount of data!

Well, to have it usable one has to think of smaller number of elements (and probably forget labeling with icons...).





Here is an example minimal code with few polygons rendered as simple lines (bogus data, no worry):

<?xml version="1.0" encoding="ISO-8859-1"?><kml xmlns="http://www.opengis.net/kml/2.2">
<Document><name>test2.kml</name>
<Style><ListStyle id="hideChildren"><listItemType>checkHideChildren</listItemType></ListStyle></Style>
<Style id="cred"><LineStyle><color>ff0000ff</color><width>1</width></LineStyle><PolyStyle><fill>0</fill><outline>1</outline></PolyStyle><IconStyle><scale>0</scale></IconStyle></Style>
<Placemark><styleUrl>#cred</styleUrl><LineString><coordinates>
-105.2776775,40.0190773
-105.2781156,40.0189655
-105.2780518,40.0186621
-105.2776800,40.0186614
-105.2776911,40.0185682
-105.2777202,40.0185007
-105.2779118,40.0185594
-105.2779200,40.0183260
-105.2782285,40.0182927
-105.2783801,40.0182789
-105.2784778,40.0187324
-105.2784822,40.0187713
-105.2784617,40.0191199
-105.2776842,40.0192092
-105.2776775,40.0190773
</coordinates></LineString></Placemark>
<Placemark><styleUrl>#cred</styleUrl><LineString><coordinates>
-105.2777202,40.0185007
-105.2777394,40.0183462
-105.2779200,40.0183260
-105.2779118,40.0185594
-105.2777202,40.0185007
</coordinates></LineString></Placemark>
<Placemark><styleUrl>#cred</styleUrl><LineString><coordinates>
-105.2783801,40.0182789
-105.2787273,40.0182437
-105.2788861,40.0182515
-105.2790897,40.0186375
-105.2789588,40.0186698
-105.2788304,40.0184079
-105.2785095,40.0184389
-105.2784778,40.0187324
-105.2783801,40.0182789
</coordinates></LineString></Placemark>
<Placemark><styleUrl>#cred</styleUrl><LineString><coordinates>
-105.2789588,40.0186698
-105.2784778,40.0187324
-105.2785095,40.0184389
-105.2788304,40.0184079
-105.2789588,40.0186698
</coordinates></LineString></Placemark>
</Document></kml>

orux

#2
Quote from: "lazadugi"OK, I had some progress with KML (though having SQLite input overlay would probably be the best!).



One offending command I found is: <color>#ff0000ff</color>

I have that everywhere in the code. But I checked KML standard and it gives color without #: <color>ff0000ff</color>

No idea why I had colors with #, and GoogleEarth certainly didn't complain...

Maybe it would be nice if Orux master accommodates for this in the Orux app?



One quirk of Orux is that it displays thick lines by default. However adding <width>1</width> fixes that.



Another detail is that Orux is not fully checking XML validity! I had a file that

displayed in Orux, but had mismatched tags (and GoogleEarth would reject it).



Fixing <color> tags I made KMZ with about ~6000 polygons and ~4000 labels (works well in GoogleEarth with <IconStyle><scale>0</scale></IconStyle>).

Orux does load such KMZ overlay (0.5MB as KMZ, 4MB as KML), but it is horribly slowed down.

To me the good news is that Orux manages to load such amount of data!

Well, to have it usable one has to think of smaller number of elements (and probably forget labeling with icons...).




Hello!



OruxMaps does not fully support the kml standard, because it is quite complex, although it must represent lines and polygons fairly well, as long as they do not have volume.



There is no limit of elements to be visualized; The limit is set by your hardware. There are countless devices, very powerfull, other with limited hardware, so I have not set limits.



Parsing xml is very slow if you try to load very large kml.



If you try to paint many lines, rendering may be slow, depending on your hardware.



The best way to see what capabilities the app supports, is creating in OruxMaps polygons and lines, with the function 'draw overlay' and then exporting that overlay as kml, from the list of tracks.



If you have doubts with some elements, you can write to my email.







orux