![GeometryOps.jl](https://private-user-images.githubusercontent.com/32143268/309424882-92c5526d-23a9-4e01-aee0-2fcea99c5001.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzNzE2MjcsIm5iZiI6MTcyNDM3MTMyNywicGF0aCI6Ii8zMjE0MzI2OC8zMDk0MjQ4ODItOTJjNTUyNmQtMjNhOS00ZTAxLWFlZTAtMmZjZWE5OWM1MDAxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIzVDAwMDIwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgzNDY4NWEwZjQyNjk4NDBiMjU4ODZjMTMzNmY4YzZhYjkxY2RiODFlYWJkZTEyZDdiNzRhNWMzMGJhYjk5YjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.OAfCNYtIupkwHOkEOdkdmvGHhC_TxignqcKtMKBRhfo)
Warning
This package is still under heavy development! Use with care.
GeometryOps.jl is a package for geometric calculations on (primarily 2D) geometries.
The driving idea behind this package is to unify all the disparate packages for geometric calculations in Julia, and make them GeoInterface.jl-compatible. We are focusing primarily on 2/2.5D geometries for now. All methods in this package will consume any geometry which is compatible with GeoInterface - see its integrations page for more info on that!
Most of the use cases are driven by GIS and similar Earth data workflows, so this might be a bit specialized towards that, but methods should always be general to any coordinate space.
We welcome contributions, either as pull requests or discussion on issues!
GeometryOps tries to offer most of the basic geometry operations you'd need, implemented in pure Julia and accepting any GeoInterface.jl compatible type.
- General geometry methods (OGC methods):
equals
,extent
,distance
,crosses
,contains
,intersects
, etc - Targeted function application over large nested geometries (
apply
) and reduction over geometries (applyreduce
)- Both
apply
andapplyreduce
consume arbitrary tables as well, like DataFrames!
- Both
signed_area
,centroid
,distance
, etc for valid geometries- Line and polygon simplification (
simplify
) - Polygon clipping,
intersection
,difference
andunion
- Generalized barycentric coordinates in polygons (
barycentric_coordinates
) - Projection of geometries between coordinate reference systems using Proj.jl
- Polygonization of raster images by contour detection (
polygonize
) - Segmentization/densification of geometry, both linearly and by geodesic paths (
segmentize
)
See the "API" page in the docs for a more complete list!
GeometryOps' docs are divided into three main sections: tutorials, explanations and source code.
Documentation and examples for many functions can be found in the source code section, since we use literate programming in GeometryOps.
- Tutorials are meant to teach the fundamental concepts behind GeometryOps, and how to perform certain operations.
- Explanations usually contain little code, and explain in more detail how GeometryOps works.
- Source code usually contains explanations and examples at the top of the page, followed by annotated source code from that file.
From the wonderful vector-benchmark,
More benchmarks coming soon!