On Thu, 14 Aug 2025 16:35:11 +0100,
ckgoo...@gmail.com wrote:
> I will need to solve the problem of gaps between my polygons
> somehow though but I have thoughts on how I can do this
> without topologies.
>
Hi Chris,
if you are noticing too many gaps between polygons, this
surely means that you are using very poor quality data.
If I remember correctly, you are using the national borders
derived from OSM, which are always expected to be topologically
correct.
If this doesn't happen, it's almost certainly because there's
some phase in your process chain that catastrophically lowers
the quality of the data, irreversibly destroying the initial
topological coherence.
The most obvious suspicion is that you are applying some very
aggressiva generalization/simplification of polygons so to
reduce the size of the required storage.
There's nothing wrong with this; it's something that's
used frequently, but obviously, this way you'll end up with
a dataset that can only be viewed at the largest scales
(continents) but will be completely unusable at the most
detailed scales (single country, region, province etc).
In other words: you have suppressed so much information that
what remains is insufficient to show detailed maps with an
acceptable level of accuracy.
I easily understand that a worldwide coverage of high-resolution
data requires exaggerated amounts of storage that are difficult
if not impossible to manage, especially on portable devices.
You're struggling with two irreconcilable needs: using minimal
storage while still maintaining good data quality.
Two conflicting needs that simply can't exist together.
Here are some possible solutions to solve the problem.
1) Adopt the most canonical solution.
Geographic data are never stored on the client; they are hosted
on the server, where there are no storage limitations.
The two WEB protocols WMS and WFS were invented specifically to
discipline the exchange of geographical information between client
and server.
https://en.wikipedia.org/wiki/Web_Map_Service
https://en.wikipedia.org/wiki/Web_Feature_Service
I assume, however, that this is too complicated a solution for
your purposes which seem quite limited; you are probably looking
for something much simpler.
2) Partition and slice data into multiple levels.
I understand that what you've already achieved is adequate for
continental scales, but to move to higher levels of detail, however,
further information is needed.
The simplest solution might be to add a second full-resolution level
(not generalized/simplified) to be used at more detailed scales.
To keep storage demand within reasonable limits, this second level
will not have global coverage, but will instead be broken down into
discrete packages (single country, region, province).
It's virtually impossible for a user to be in multiple parts of the
world at the same time, so it would be sufficient to upload only the
data needed for the area in which the user is currently located;
detailed data will be then deleted when no longer needed to free
up space.
In short, a sort of dynamic plug-in system, simple and easy to
manage
for the usert that should never require the download of excessive
amounts of data.
To better understand, take a look at how GeoFabrik organizes its
OSM data packages offered for downloading:
https://download.geofabrik.de/
3) Change data provider.
OSM datasets are certainly valid, but they are also very large.
Fortunately, there is an alternative provider of worldwide
geographic
open data:
https://www.naturalearthdata.com/downloads/
Natural Earth datasets are smaller in size, are immediately ready
for
use without any need for preliminary cleanup, and are topologically
correct.
But above all they are offered with three different levels of
generalization and size:
* Large Scale
* Medium Scale
* Small Scale
Evaluate them carefull and without prejudicey, because IMHO they
could be the optimal solution for your needs.
bye Sandro