Comments (12)
Might https://github.com/GEOSwift/GEOSwift/blob/main/Sources/GEOSwift/GEOS/Boundable.swift be what you're looking for?
from geoswift.
Aha ill chwck it out, perhaps misunderstoor the image as it shows just lines and not filled in polygon. If it works itll make my day
from geoswift.
Hmm im not sure i understand the usage of boundary.
What im trying to resolve is when users intersect lines in a polygon. instead of throwing an error, i want to ignore the internal intersection and create a polygon without the internal holes.
the concave hull algorithm is supposed to do just that. How can boundary be used for the same outcome?
Link to concave hull example
https://github.com/SanyM/ConcaveHull
now while there are packages like the above that support concave hull it would be nice to be able to solve the problem with less dependencies if possible.
from geoswift.
Apologies for my confusion. It looks like concave hull is new in geos 3.11. GEOSwift is currently on 3.10. We'll add concave hull after we update. (hopefully soon!)
from geoswift.
🤞 here's hoping :)
great work with the framework
from geoswift.
@alessdiimperio @vladislavitsi concave hull is now available on the main branch. Please give it a try and let me know if it looks okay!
from geoswift.
any example of how the implementation works?
to get these changes should i add => mainbranch url in pods?
from geoswift.
I released the changes in v10: https://github.com/GEOSwift/GEOSwift/releases/tag/10.0.0
I don't have any examples, but the release notes at that link show the method name. You just invoke it on any geometry.
from geoswift.
Tested it finally, and while it works, it unfortunately doesn't give the desired effect in many cases even.
Is there some other way to ignore "holes" in LinearRings ? or ignore the internal coordinates when a linearRing intersects itself?
With the images i provided as some sort of example.
from geoswift.
@dr-jts could you please advise here?
from geoswift.
Perhaps the GEOSMakeValid
function could help here? Note that this probably needs the GEOS_MAKE_VALID_STRUCTURE
method (use GEOSMakeValidWithParams
to specify this).
For a full explanation see https://lin-ear-th-inking.blogspot.com/2021/05/fixing-invalid-geometry-with-jts.html
from geoswift.
Thank you! @alessdiimperio, we expose only GEOSMakeValid (makeValid()
on any GeometryConvertible
) right now, but we'd be happy to expose GEOSMakeValidWithParams
as well. Would you mind opening a new issue to track that?
from geoswift.
Related Issues (20)
- [SPM] dyld[10829]: Library not loaded: @rpath/geos.framework/geos HOT 1
- Xcode Cloud: Unable to verify project that links GEOSwift using SPM HOT 2
- Inaccurate heatmap output. Maybe My Code is Wrong? HOT 3
- Question: Storing large GeoJSON Files for usage with GEOSwift HOT 2
- Update for Swift Concurrency
- Confused about `distance(to:)` usage or units HOT 2
- No access to LineStringSnapper HOT 6
- Expose Hausdorff Distance functions
- Support Z coordinates HOT 1
- CI is broken HOT 1
- Support for fixing invalid geometries with GeometryFixer/GEOSMakeValidWithParams HOT 3
- Getting at coordinates after a Polygon is buffered HOT 3
- Searching for point within a large geoJSON file HOT 6
- Get struct out of GEOSwift.JSON HOT 4
- PreparedGeometry branch Library Not Loaded HOT 9
- Prepared Geometry Codable or Public Base Access
- Compiling with Xcode 15.0 beta 5 for "My Mac (Mac Catalyst)" fails with "ld: Undefined symbols:..." HOT 3
- Split MultiPoint into multiple Points ? HOT 2
- How to get WKT string from a geometry HOT 2
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 geoswift.