OpenStreetMap logo OpenStreetMap

Post When Comment
Missing water=lake tags

This is from russian water tagging scheme. Original OSM water tagging scheme does not require ANY water tags. Therefore please do not offer people to break good existing data (not all countries want to use russian water tagging scheme).

Building generalisation: simplification

When moving vertexes of a polygon you can get into situation when a ring of a polygon crosses itself and then it is "not simple". This is what ST_IsSimple detects in my case in inner procedure, where only one ring is being processed.

But there is also a ST_IsValid check done with ST_MakeValid executed where we have full multipolygon with possibly multiple rings.

Building generalisation: simplification

Yes, “Simplification for 10m” means 10m tolerance.

I'm not too experienced in PostGIS and I'm not a coder. I'm thinking in general geometry and luckily PostGIS has functions for all geometry operations I need. So I cannot tell you if collectionextract may produce invalid geometries, but the first thing which comes to my mind is overlapping buildings could cause problems. You see, I'm only working with Lithuanian data and here we're using a loooot of additional QA tests daily. One of those is building overlap.

Current implementation of simplification is part of my "research" (hobby level). So on each iteration in building simplification I check if resulting geometry is valid (ST_IsSimple), if not - simplification is stopped and warning is raised so that I could check it in detail later: either additional QA rules have to be added (input data fixed), or simplification code has to be adjusted (algorithm fixed).

Have you traced to the specific bad geometry? That is can you display it in QGIS or at least extract ST_AsText to check manually? This would allow tracing back what input data is causing it.

Building generalisation: simplification

Nothing was done for optimisation yet.
Lithuania has ~1M buildings. Amalgamation+Simplification for 10m takes ~15min.
I have not tested it on other projections.
For proper use on larger areas a problem of segmentation has to be solved: recalculating only the impacted area, which is not straightforward because surrounding geometries influence the result.

Building generalisation: simplification

mboeringa,
Main part of simplification algorithm is here:
https://github.com/openmaplt/vector-map/blob/master/db/func/stc_simplify_building_line.sql
And it is far from being finished: there are a lot of TODO’s left and preserving of building area is still to be implemented. But for some cases it is already doing probably better than A** algo:
Arc_vs_PostGIS
Here:
dark polygon - original building,
light polygon - postgis,
purple outline - A (you can see that A is preserving building area so outline is moved outwards in some places).

Building generalisation: simplification

Adamant1,
I guess mboeringa has already answered main part of your question.
I will just add that generalisation usually has more than one step. Simplification is operation of just one step. Another thing you would want to do is amalgamate (merge polygons which are “close enough” into one polygon).
For some practical example: I’m currently playing with building generalisation sequence: amalgamate and then simplify on 5m, simplify and typify on 10m, simplify and typify on 20m, simplify and typify on 40m.
If you want to see how gods of cartography do it - look at SwissTopo map: https://map.geo.admin.ch

Building generalisation: simplification

mboeringa, Current building simplification uses much more complex algorithm than buffering (well, even typification uses a more complex algorithm). I was just suggesting using ST_Buffer instead of ST_Simplify, because it should give better results, but as ST_Buffer is not intended for that, you have to check if it works in your particular use case.

Building generalisation: simplification

Hi mboeringa,
For simple way of building generalisation you can try st_buffer with join=mitre. Try different combinations of +-, +-+, -+- and see what works best for your required scale. It will preserve square corners most of the time and will even remove small inner rings. BTW all code used in creating *.openmap.lt is in github.

New Tutorial on Making Printable Wall Maps

Any reason not to youse QGIS? It’s purpose is to build professional maps.

Neutral ground

Interesting, “UN decision” criteria is OK when deciding which countries to include, but is NOT OK when deciding on boundaries of included countries. Little bit from here, little bit from there, with this and that exception and we get… perfect uncertainty.

You cannot enter territorial waters of Sealand, because they will start shooting at you (with at least one case of actual shooting), so they have “physical control” :-)

Neutral ground

@rorym I never disputed “on the ground rule”. It was there for a looong time. But it is about PHYSICAL objects, not boundaries (how would you identify boundaries of national park by physical control? what about physical control for level > 2 boundaries?)

Note that your example wiki page states about necessity to have data for different representations.

Neutral ground

2017 is for sure not “long” ago to be “old OSM standard” :-)

Neutral ground

@escada no, I haven’t tried that. Discussion is what data should there be in the OSM database and what possibilities should be given to all data users.

Neutral ground

There is no “long standing OSM rule” of “de facto control”. This is invented by OSMF in 2013. At the same time OSMF page states it is not here to tell “what and how to map”.

Long standing OSM rule “mapping what is on the ground” from the very beginning had exceptions for non physical objects and the FIRST example of this exception mentioned was always administrative boundaries. Most of admin boundaries have been imported from official sources, without “checking of control on the ground”.

Also note that sentence about physical control in admin border wiki page was added a WEEK ago - after DWG decision and after this fallout has started.

And regarding of showing what you want. This is exactly the problem. It WAS possible to show whatever you want a week ago (because all official opinions were in the database), but it is not longer possible to do that (OSMF has decided to leave only one opinion). DWG decision has REDUCED the number of options to cartographers thus making OSM data less useful.

Neutral ground

There is no problem having correct Ukraine’s borders with current tagging scheme.

OpenStreetMap never had physical control clause for borders. Osmf (which is not osm) has invented it even when osmf declares it should not say what and how should be tagged.

DWG authority on decisions over territorial disputes

Thank you PlaneMad, your comment is VERY important! Current situation with OpenStreetMap and a separate thing - OSMF - look disturbingly similar to Orwell’s stories.

My thoughts on recent actions of DWG
  1. I’m pointing out that OSMF has done more than it is allowed to do and did not comply with it’s own rules of existence or raison d’être.
  2. I (or anybody else) have never denied the fact that de facto Russia controls Crimea for the time being. I’m saying that this “control” principle is OSMF’s invention, not OpenStreetMap invention.
  3. Reality check: Google, Microsoft etc. with endless pockets and armies of lawyers have adapted maps to international/local law. Apparently it was a waste of money, they could have simply written a sentence somewhere on the terms and conditions page: “we depict position on the ground” and that would have been it. Or not…?
My thoughts on recent actions of DWG

OSMF mission is to help mappers, not control and command them. So OSMF should make sure that MORE mappers/users are happy which is not the case in this place as was explained by data users.

OSMF decision is based on OSMF self invented rule of “borders as on the ground” (OSMF should not have had the right to invent such rules by themselves in the first place). This rule is strange because from basic knowledge in Physics and/or Philosophy we know that immaterial things are not observable by physical means, borders as all other immaterial things live in official documents so those should be used to fetch geometry and attributes.

Disputed Territories policy is also NOT clear. It states that decision is made by “wide international support” and “control on the ground”. So in case of Crimea this does not work, it becomes “control of the ground IRRESPECTIVE OF WIDE INTERNATIONAL SUPPORT”. Not that wide international support also represents WIDE INTERNATIONAL NEED AND REQUIREMENT as it dictates international position as well as legal requirements not to knowingly misrepresent the situation (not spread fake information) which in this situation OSMF is doing - misrepresenting Crimea as being part of Russia when in almost all countries it is recognised that de jure situation is different.

Leaving Crimea as part of Ukraine has no technical problems so it could have continued like that. This case has exposed the lack of transparency, lack of accountability, wish for unconditional control on behalf of OSMF which leaves us with some disturbing questions regarding the role and future of OSMF.

DWG authority on decisions over territorial disputes

I had a discussion with NATO representatives. Apparently this issue is NOT a simple technical issue inside of OSM only. More information will be coming shortly. This looks like a standard Soviet style propaganda campaign to divide representatives of free world - people of free world are fighting among themselves for the bonus of aggressor - Russia.

DWG authority on decisions over territorial disputes

No point of going to ridiculous examples. Only recognised countries. They all have very concrete officially claimed boundaries. So nothing claimed by any nationalist coocoos. And there is a technical simple solution to that. Problem is that there us no WILL to do anything. Because for those in power to do the decision it does not matter.