Skip to content

Commit

Permalink
Merge branch 'main' into paper
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 authored Sep 23, 2024
2 parents 0886e54 + 17151d9 commit ae51f44
Show file tree
Hide file tree
Showing 84 changed files with 2,369 additions and 967 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ jobs:
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
with:
directories: src,ext
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
slug: JuliaGeo/GeometryOps.jl
docs:
name: Documentation
runs-on: ubuntu-latest
Expand All @@ -48,10 +57,14 @@ jobs:
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: julia-actions/julia-buildpkg@v1
- name: Build and add versions
run: julia --project=docs -e 'using Pkg; Pkg.add([PackageSpec(path = "."), PackageSpec(name = "GeoMakie", rev = "master")])'
- uses: julia-actions/julia-docdeploy@v1
with:
install-package: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
- run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
Expand Down
17 changes: 14 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
name = "GeometryOps"
uuid = "3251bfac-6a57-4b6d-aa61-ac1fef2975ab"
authors = ["Anshul Singhvi <[email protected]> and contributors"]
version = "0.1.6"
version = "0.1.12"

[deps]
CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
DataAPI = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
DelaunayTriangulation = "927a84f5-c5f4-47a5-9785-b46e178433df"
ExactPredicates = "429591f6-91af-11e9-00e2-59fbe8cec110"
GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SortTileRecursiveTree = "746ee33f-1797-42c2-866d-db2fce69d14d"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"

[weakdeps]
FlexiJoins = "e37f2e79-19fa-4eb7-8510-b63b51fe0a37"
LibGEOS = "a90b1aa1-3769-5649-ba7e-abc5a9d163eb"
Proj = "c94c279d-25a6-4763-9509-64d165bea63e"

[extensions]
GeometryOpsFlexiJoinsExt = "FlexiJoins"
GeometryOpsLibGEOSExt = "LibGEOS"
GeometryOpsProjExt = "Proj"

[compat]
CoordinateTransformations = "0.5, 0.6"
DataAPI = "1"
DelaunayTriangulation = "1.0.4"
ExactPredicates = "2.2.8"
FlexiJoins = "0.1.30"
GeoInterface = "1.2"
GeometryBasics = "0.4.7"
LibGEOS = "0.9.2"
LinearAlgebra = "1"
Proj = "1"
SortTileRecursiveTree = "0.1"
Expand All @@ -40,17 +48,20 @@ CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
FlexiJoins = "e37f2e79-19fa-4eb7-8510-b63b51fe0a37"
GeoFormatTypes = "68eda718-8dee-11e9-39e7-89f7f65f511f"
GeoJSON = "61d90e0f-e114-555e-ac52-39dfb47a3ef9"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
LibGEOS = "a90b1aa1-3769-5649-ba7e-abc5a9d163eb"
Rasters = "a3a2b9e3-a471-40c9-b274-f788e487c689"
NaturalEarth = "436b0209-26ab-4e65-94a9-6526d86fea76"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
Proj = "c94c279d-25a6-4763-9509-64d165bea63e"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Rasters = "a3a2b9e3-a471-40c9-b274-f788e487c689"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Shapefile = "8e980c4a-a4fe-5da2-b3a7-4b4b0353a2f4"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["ArchGDAL", "CoordinateTransformations", "DataFrames", "Distributions", "DimensionalData", "FlexiJoins", "GeoFormatTypes", "GeoJSON", "Proj", "JLD2", "LibGEOS", "Random", "Rasters", "OffsetArrays", "Shapefile", "Test"]
test = ["ArchGDAL", "CoordinateTransformations", "DataFrames", "Distributions", "DimensionalData", "Downloads", "FlexiJoins", "GeoFormatTypes", "GeoJSON", "Proj", "JLD2", "LibGEOS", "Random", "Rasters", "NaturalEarth", "OffsetArrays", "SafeTestsets", "Shapefile", "Test"]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ GeometryOps tries to offer most of the basic geometry operations you'd need, imp

See the "API" page in the docs for a more complete list!

## How to navigate the docs

GeometryOps' [docs](https://juliageo.org/GeometryOps.jl/stable) 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.

## Performance comparison to other packages

From the wonderful [vector-benchmark](https://www.github.com/kadyb/vector-benchmark),
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmark_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ end
function plot_trials(
gp::Makie.GridPosition,
results;
theme = merge(deepcopy(Makie.CURRENT_DEFAULT_THEME), MakieThemes.bbc()),
theme = MakieThemes.bbc(),
legend_position = Makie.automatic, #(1, 1, TopRight()),
legend_orientation = :horizontal,
legend_halign = 1.0,
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/benchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import GeometryOps as GO,
GeoInterface as GI,
GeometryBasics as GB,
LibGEOS as LG
import GeoJSON
import GeoJSON, NaturalEarth
# In order to benchmark, we'll actually use the new [Chairmarks.jl](https://github.com/lilithhafner/Chairmarks.jl),
# since it's significantly faster than BenchmarkTools. To keep benchmarks organized, though, we'll still use BenchmarkTools'
# `BenchmarkGroup` structure.
Expand Down Expand Up @@ -184,7 +184,7 @@ usa_difference_suite = usa_poly_suite["difference"] = BenchmarkGroup(["title:USA
usa_intersection_suite = usa_poly_suite["intersection"] = BenchmarkGroup(["title:USA intersection", "subtitle:Tested on CONUS"])
usa_union_suite = usa_poly_suite["union"] = BenchmarkGroup(["title:USA union", "subtitle:Tested on CONUS"])

fc = GeoJSON.read(read(download("https://rawcdn.githack.com/nvkelso/natural-earth-vector/ca96624a56bd078437bca8184e78163e5039ad19/geojson/ne_10m_admin_0_countries.geojson")))
fc = NaturalEarth.naturalearth("admin_0_countries", 10)
usa_multipoly = fc.geometry[findfirst(==("United States of America"), fc.NAME)] |> x -> GI.convert(LG, x) |> LG.makeValid |> GO.tuples

usa_poly = GI.getgeom(usa_multipoly, findmax(GO.area.(GI.getgeom(usa_multipoly)))[2]) # isolate the poly with the most area
Expand All @@ -194,7 +194,7 @@ f, a, p = plot(usa_poly; label = "Original", axis = (; aspect = DataAspect()));
axislegend(a)
f

# Now, we get to benchmarking:
# Now, we get to benchmarking:


usa_o_lg, usa_o_go = lg_and_go(usa_poly)
Expand Down
9 changes: 8 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,23 @@ CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
DisplayAs = "0b91fe84-8a4c-11e9-3e1d-67c38462b6d6"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterVitepress = "4710194d-e776-4893-9690-8d956a29c365"
DoubleFloats = "497a8b3b-efae-58df-a0af-a86822472b78"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
ExactPredicates = "429591f6-91af-11e9-00e2-59fbe8cec110"
FlexiJoins = "e37f2e79-19fa-4eb7-8510-b63b51fe0a37"
GADM = "a8dd9ffe-31dc-4cf5-a379-ea69100a8233"
ExactPredicates = "429591f6-91af-11e9-00e2-59fbe8cec110"
GeoDataFrames = "62cb38b5-d8d2-4862-a48e-6a340996859f"
GeoDatasets = "ddc7317b-88db-5cb5-a849-8449e5df04f9"
GeoFormatTypes = "68eda718-8dee-11e9-39e7-89f7f65f511f"
GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
GeoInterfaceMakie = "0edc0954-3250-4c18-859d-ec71c1660c08"
GeoJSON = "61d90e0f-e114-555e-ac52-39dfb47a3ef9"
GeoMakie = "db073c08-6b98-4ee5-b6a4-5efafb3259c6"
GeoParquet = "e99870d8-ce00-4fdd-aeee-e09192881159"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
GeometryOps = "3251bfac-6a57-4b6d-aa61-ac1fef2975ab"
LibGEOS = "a90b1aa1-3769-5649-ba7e-abc5a9d163eb"
Expand All @@ -34,3 +40,4 @@ Proj = "c94c279d-25a6-4763-9509-64d165bea63e"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Shapefile = "8e980c4a-a4fe-5da2-b3a7-4b4b0353a2f4"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Weave = "44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9"
5 changes: 3 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ makedocs(;
"Introduction" => "introduction.md",
"API Reference" => "api.md",
"Tutorials" => [
"Creating Geometry" => "tutorials/creating_geometry.md",
"Spatial Joins" => "tutorials/spatial_joins.md",
],
"Explanations" => [
"Paradigms" => "paradigms.md",
"Peculiarities" => "peculiarities.md",
"Paradigms" => "explanations/paradigms.md",
"Peculiarities" => "explanations/peculiarities.md",
],
"Source code" => literate_pages,
"Paper" => "paper.md",
Expand Down
Empty file added docs/src/explanations/crs.md
Empty file.
File renamed without changes.
File renamed without changes.
Empty file.
12 changes: 11 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ features:
<div class="vp-doc" style="width:80%; margin:auto">
<h1> What is GeometryOps.jl? </h1>
# What is GeometryOps.jl?
GeometryOps.jl is a package for geometric calculations on (primarily 2D) geometries.
Expand All @@ -51,6 +51,16 @@ Most of the usecases are driven by GIS and similar Earth data workflows, so this
We welcome contributions, either as pull requests or discussion on issues!
# How to navigate the docs
GeometryOps' [docs](https://juliageo.org/GeometryOps.jl/stable) 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.
</div>
Expand Down
Loading

0 comments on commit ae51f44

Please sign in to comment.