Comments (8)
So the result of MakeValid is the same for both the old/new overlay engines, which means the result isn't "wrong" per se, just that it's got a different way to turn an invalid input to a valid output.
This is the output, the system has decided that the way to reconcile the doubled-up bottom rings is to use the outer ring as the enclosing ring, and return the spare inner ring as a line in a collection. The MakeValid code is very ring-centric, so this kind of falls out in an expected way.
A "better" or at least different MakeValid might drop all the edges into a graph and then decide what is an "enclosed area" by doing a scan-line routine. This is probably what we're seeing when we look at the rendering of the geometry in QGIS. Is it the "right" way to interpret the invalid geometry? Maybe, at least insofar as it's the visualization that most/many user interface tools will provide. I think waiting to add a graph-based MakeValid might be better than trying to coerce the existing routine into being something it is not.
from geos.
With the GeometryFixer ported at 5156001, this will be resolved on next release. (You'll have to use GEOSMakeValidWithParams if you're on the CAPI, or change from MakeValid to GeometryFixer if you're on C++ API)
from geos.
Is it an area or a line? Make valid can only do so much for you, if you feed it something nonsensical, it might return nonsense.
from geos.
The OGC has a spec for simplicity, and ISO has a spec for both validity and simplicity, for LineStrings. Moreover, if you have a large number of geometries, you should expect that you should be able to call makeValid
on them without large surprises.
from geos.
Is it an area or a line? Make valid can only do so much for you, if you feed it something nonsensical, it might return nonsense.
It is a multipolygon border, so the area enclosed is quite small.
from geos.
OK, so it's a narrow corridor... and perhaps the invalidity is at the "pole", aka the bottom, where it does this.
from geos.
This makes sense to me. It's not worth hacking the original routine with a special case. Is a graph-based MakeValid something that is on the backlog?
from geos.
Yes, a less hacked-together MakeValid is on the list of things, and will hopefully improve on the reliability of the current one a little. Unfortunately we might have these kind of behaviour changes, but I think as long as we return valid results, with some reliability that's all folks can reasonably ask.
from geos.
Related Issues (20)
- CMake CMP0153 HOT 1
- CompoundCurve construction should ensure sections are continuous
- `GEOSBuffer` on a valid Polygon creates MultiPolygon with sliver geometry HOT 1
- Geometry produced by ST_SimplifyPreserveTopology is not stable across multiple runs HOT 28
- Edge of intersection not matching the edge of original polygon HOT 2
- Dynamic library is not fully setup by `make install` ( missing ldconfig ) HOT 3
- `include/geos/constants.h` - relies on transitive inclusion of `std::size_t` which breaks build in C++23 language mode
- Build fails in C++23 language mode due to one forward declaration HOT 3
- `voronoi_polygons` results in "IllegalArgumentException: point array must contain 0 or >1 elements" HOT 2
- could not find libgeos_c HOT 1
- Polygon buffer removes its hole when quadSegs = 0
- Doubts about the goes C interface HOT 1
- `simplify` with `preserve_topology=True` difference for MultiLineString between 3.12.1 and 3.12.2
- MSVC 32-bit test failure with LargestEmptyCircle HOT 1
- Is it possible to export to dxf format HOT 1
- Refactor MCIndexSegmentSetMutualIntersector to match JTS
- MakeValid method HOT 3
- How to split a polygon with a line? HOT 1
- OverlayNG should return Point for intersection between area and zero-length LineString
- Remove prebuilt capi_indexed_predicate binary
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geos.