Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rerun gen/generator.jl for GEOS 3.13 #214

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ LibGEOSMakieExt = "Makie"
Aqua = "0.8"
CEnum = "0.2, 0.3, 0.4, 0.5"
Extents = "0.1.1"
GEOS_jll = "3.12"
GEOS_jll = "3.13"
GeoInterface = "1"
GeoInterfaceMakie = "0.1"
GeoInterfaceRecipes = "1"
Expand Down
156 changes: 142 additions & 14 deletions src/generated/libgeos_api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const GEOSContextHandle_t = Ptr{GEOSContextHandle_HS}

# typedef void ( * GEOSMessageHandler ) ( const char * fmt , ... )
# typedef void ( * GEOSMessageHandler ) ( GEOS_PRINTF_FORMAT const char * fmt , ... )
const GEOSMessageHandler = Ptr{Cvoid}

# typedef void ( * GEOSMessageHandler_r ) ( const char * message , void * userdata )
Expand Down Expand Up @@ -45,6 +45,11 @@
GEOS_MULTILINESTRING = 5
GEOS_MULTIPOLYGON = 6
GEOS_GEOMETRYCOLLECTION = 7
GEOS_CIRCULARSTRING = 8
GEOS_COMPOUNDCURVE = 9
GEOS_CURVEPOLYGON = 10
GEOS_MULTICURVE = 11
GEOS_MULTISURFACE = 12
end

@cenum GEOSWKBByteOrders::UInt32 begin
Expand Down Expand Up @@ -576,6 +581,48 @@
)::Ptr{GEOSGeometry}
end

function GEOSGeom_createCircularString_r(handle, s)
@ccall libgeos.GEOSGeom_createCircularString_r(

Check warning on line 585 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L584-L585

Added lines #L584 - L585 were not covered by tests
handle::GEOSContextHandle_t,
s::Ptr{GEOSCoordSequence},
)::Ptr{GEOSGeometry}
end

function GEOSGeom_createEmptyCircularString_r(handle)
@ccall libgeos.GEOSGeom_createEmptyCircularString_r(

Check warning on line 592 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L591-L592

Added lines #L591 - L592 were not covered by tests
handle::GEOSContextHandle_t,
)::Ptr{GEOSGeometry}
end

function GEOSGeom_createCompoundCurve_r(handle, curves, ncurves)
@ccall libgeos.GEOSGeom_createCompoundCurve_r(

Check warning on line 598 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L597-L598

Added lines #L597 - L598 were not covered by tests
handle::GEOSContextHandle_t,
curves::Ptr{Ptr{GEOSGeometry}},
ncurves::Cuint,
)::Ptr{GEOSGeometry}
end

function GEOSGeom_createEmptyCompoundCurve_r(handle)
@ccall libgeos.GEOSGeom_createEmptyCompoundCurve_r(

Check warning on line 606 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L605-L606

Added lines #L605 - L606 were not covered by tests
handle::GEOSContextHandle_t,
)::Ptr{GEOSGeometry}
end

function GEOSGeom_createCurvePolygon_r(handle, shell, holes, nholes)
@ccall libgeos.GEOSGeom_createCurvePolygon_r(

Check warning on line 612 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L611-L612

Added lines #L611 - L612 were not covered by tests
handle::GEOSContextHandle_t,
shell::Ptr{GEOSGeometry},
holes::Ptr{Ptr{GEOSGeometry}},
nholes::Cuint,
)::Ptr{GEOSGeometry}
end

function GEOSGeom_createEmptyCurvePolygon_r(handle)
@ccall libgeos.GEOSGeom_createEmptyCurvePolygon_r(

Check warning on line 621 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L620-L621

Added lines #L620 - L621 were not covered by tests
handle::GEOSContextHandle_t,
)::Ptr{GEOSGeometry}
end

function GEOSGeom_destroy_r(handle, g)
@ccall libgeos.GEOSGeom_destroy_r(
handle::GEOSContextHandle_t,
Expand Down Expand Up @@ -1227,6 +1274,28 @@
)::Cchar
end

function GEOSPreparedRelate_r(handle, pg1, g2)
string_copy_free(
@ccall(

Check warning on line 1279 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L1277-L1279

Added lines #L1277 - L1279 were not covered by tests
libgeos.GEOSPreparedRelate_r(
handle::GEOSContextHandle_t,
pg1::Ptr{GEOSPreparedGeometry},
g2::Ptr{GEOSGeometry},
)::Cstring
),
handle,
)
end

function GEOSPreparedRelatePattern_r(handle, pg1, g2, im)
@ccall libgeos.GEOSPreparedRelatePattern_r(

Check warning on line 1291 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L1290-L1291

Added lines #L1290 - L1291 were not covered by tests
handle::GEOSContextHandle_t,
pg1::Ptr{GEOSPreparedGeometry},
g2::Ptr{GEOSGeometry},
im::Cstring,
)::Cchar
end

function GEOSPreparedNearestPoints_r(handle, pg1, g2)
@ccall libgeos.GEOSPreparedNearestPoints_r(
handle::GEOSContextHandle_t,
Expand Down Expand Up @@ -1369,12 +1438,12 @@
GEOSRELATE_BNR_MONOVALENT_ENDPOINT = 4
end

function GEOSRelatePattern_r(handle, g1, g2, pat)
function GEOSRelatePattern_r(handle, g1, g2, imPattern)

Check warning on line 1441 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L1441

Added line #L1441 was not covered by tests
@ccall libgeos.GEOSRelatePattern_r(
handle::GEOSContextHandle_t,
g1::Ptr{GEOSGeometry},
g2::Ptr{GEOSGeometry},
pat::Cstring,
imPattern::Cstring,
)::Cchar
end

Expand All @@ -1391,11 +1460,11 @@
)
end

function GEOSRelatePatternMatch_r(handle, mat, pat)
function GEOSRelatePatternMatch_r(handle, intMatrix, imPattern)

Check warning on line 1463 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L1463

Added line #L1463 was not covered by tests
@ccall libgeos.GEOSRelatePatternMatch_r(
handle::GEOSContextHandle_t,
mat::Cstring,
pat::Cstring,
intMatrix::Cstring,
imPattern::Cstring,
)::Cchar
end

Expand Down Expand Up @@ -1988,6 +2057,10 @@
)::Cvoid
end

function GEOS_printDouble(d, precision, result)
@ccall libgeos.GEOS_printDouble(d::Cdouble, precision::Cuint, result::Cstring)::Cint

Check warning on line 2061 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L2060-L2061

Added lines #L2060 - L2061 were not covered by tests
end

function GEOSWKBReader_create_r(handle)
@ccall libgeos.GEOSWKBReader_create_r(handle::GEOSContextHandle_t)::Ptr{GEOSWKBReader}
end
Expand Down Expand Up @@ -2390,6 +2463,42 @@
)::Ptr{GEOSGeometry}
end

function GEOSGeom_createCircularString(s)
@ccall libgeos.GEOSGeom_createCircularString(

Check warning on line 2467 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L2466-L2467

Added lines #L2466 - L2467 were not covered by tests
s::Ptr{GEOSCoordSequence},
)::Ptr{GEOSGeometry}
end

# no prototype is found for this function at geos_c.h:2519:31, please use with caution
function GEOSGeom_createEmptyCircularString()
@ccall libgeos.GEOSGeom_createEmptyCircularString()::Ptr{GEOSGeometry}

Check warning on line 2474 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L2473-L2474

Added lines #L2473 - L2474 were not covered by tests
end

function GEOSGeom_createCompoundCurve(curves, ncurves)
@ccall libgeos.GEOSGeom_createCompoundCurve(

Check warning on line 2478 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L2477-L2478

Added lines #L2477 - L2478 were not covered by tests
curves::Ptr{Ptr{GEOSGeometry}},
ncurves::Cuint,
)::Ptr{GEOSGeometry}
end

# no prototype is found for this function at geos_c.h:2538:31, please use with caution
function GEOSGeom_createEmptyCompoundCurve()
@ccall libgeos.GEOSGeom_createEmptyCompoundCurve()::Ptr{GEOSGeometry}

Check warning on line 2486 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L2485-L2486

Added lines #L2485 - L2486 were not covered by tests
end

function GEOSGeom_createCurvePolygon(shell, holes, nholes)
@ccall libgeos.GEOSGeom_createCurvePolygon(

Check warning on line 2490 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L2489-L2490

Added lines #L2489 - L2490 were not covered by tests
shell::Ptr{GEOSGeometry},
holes::Ptr{Ptr{GEOSGeometry}},
nholes::Cuint,
)::Ptr{GEOSGeometry}
end

# no prototype is found for this function at geos_c.h:2564:31, please use with caution
function GEOSGeom_createEmptyCurvePolygon()
@ccall libgeos.GEOSGeom_createEmptyCurvePolygon()::Ptr{GEOSGeometry}

Check warning on line 2499 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L2498-L2499

Added lines #L2498 - L2499 were not covered by tests
end

function GEOSGeom_createCollection(type, geoms, ngeoms)
@ccall libgeos.GEOSGeom_createCollection(
type::Cint,
Expand Down Expand Up @@ -3224,11 +3333,11 @@
@ccall libgeos.GEOSEqualsIdentical(g1::Ptr{GEOSGeometry}, g2::Ptr{GEOSGeometry})::Cchar
end

function GEOSRelatePattern(g1, g2, pat)
function GEOSRelatePattern(g1, g2, imPattern)

Check warning on line 3336 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L3336

Added line #L3336 was not covered by tests
@ccall libgeos.GEOSRelatePattern(
g1::Ptr{GEOSGeometry},
g2::Ptr{GEOSGeometry},
pat::Cstring,
imPattern::Cstring,
)::Cchar
end

Expand All @@ -3238,8 +3347,8 @@
)
end

function GEOSRelatePatternMatch(mat, pat)
@ccall libgeos.GEOSRelatePatternMatch(mat::Cstring, pat::Cstring)::Cchar
function GEOSRelatePatternMatch(intMatrix, imPattern)
@ccall libgeos.GEOSRelatePatternMatch(intMatrix::Cstring, imPattern::Cstring)::Cchar

Check warning on line 3351 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L3350-L3351

Added lines #L3350 - L3351 were not covered by tests
end

function GEOSRelateBoundaryNodeRule(g1, g2, bnr)
Expand Down Expand Up @@ -3348,6 +3457,25 @@
)::Cchar
end

function GEOSPreparedRelate(pg1, g2)
string_copy_free(
@ccall(

Check warning on line 3462 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L3460-L3462

Added lines #L3460 - L3462 were not covered by tests
libgeos.GEOSPreparedRelate(
pg1::Ptr{GEOSPreparedGeometry},
g2::Ptr{GEOSGeometry},
)::Cstring
)
)
end

function GEOSPreparedRelatePattern(pg1, g2, imPattern)
@ccall libgeos.GEOSPreparedRelatePattern(

Check warning on line 3472 in src/generated/libgeos_api.jl

View check run for this annotation

Codecov / codecov/patch

src/generated/libgeos_api.jl#L3471-L3472

Added lines #L3471 - L3472 were not covered by tests
pg1::Ptr{GEOSPreparedGeometry},
g2::Ptr{GEOSGeometry},
imPattern::Cstring,
)::Cchar
end

function GEOSPreparedNearestPoints(pg1, g2)
@ccall libgeos.GEOSPreparedNearestPoints(
pg1::Ptr{GEOSPreparedGeometry},
Expand Down Expand Up @@ -3822,21 +3950,21 @@

const GEOS_VERSION_MAJOR = 3

const GEOS_VERSION_MINOR = 12
const GEOS_VERSION_MINOR = 13

const GEOS_VERSION_PATCH = 0

const GEOS_VERSION = "3.12.0"
const GEOS_VERSION = "3.13.0"

const GEOS_JTS_PORT = "1.18.0"

const GEOS_CAPI_VERSION_MAJOR = 1

const GEOS_CAPI_VERSION_MINOR = 18
const GEOS_CAPI_VERSION_MINOR = 19

const GEOS_CAPI_VERSION_PATCH = 0

const GEOS_CAPI_VERSION = "3.12.0-CAPI-1.18.0"
const GEOS_CAPI_VERSION = "3.13.0-CAPI-1.19.0"

const GEOS_CAPI_FIRST_INTERFACE = GEOS_CAPI_VERSION_MAJOR

Expand Down
2 changes: 1 addition & 1 deletion test/test_geos_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using Extents
outputdim = 3,
roundingprecision = 2,
)
@test writegeom(p, writer) == "POINT (0.12 2)"
@test_broken writegeom(p, writer) == "POINT (0.12 2)" # Broken in GEOS 3.13.0 https://github.com/libgeos/geos/issues/1198

# round to 2 decimals and don't trim trailing zeros
writer = LibGEOS.WKTWriter(
Expand Down
Loading