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

Internal Rework #494

Merged
merged 74 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
8b3a867
begin sgl rework
Maxxen Jan 12, 2025
a2d05c3
begin sgl rework
Maxxen Jan 12, 2025
18bb58b
move xyz functions
Maxxen Jan 12, 2025
416640c
more functions
Maxxen Jan 13, 2025
6cf1c2e
st_extent
Maxxen Jan 14, 2025
7f3d023
wip
Maxxen Jan 22, 2025
17d3903
wip2
Maxxen Jan 24, 2025
bbe086b
wip3
Maxxen Jan 24, 2025
c198021
merge with main
Maxxen Jan 24, 2025
d4a74e4
more functions
Maxxen Jan 24, 2025
9af7a77
more functions
Maxxen Jan 24, 2025
3aa9dc3
add length
Maxxen Jan 24, 2025
ce0149a
fix st_point
Maxxen Jan 24, 2025
5a3ea1a
begin conversion functions + visitor
Maxxen Jan 27, 2025
724167f
implement more functions
Maxxen Jan 28, 2025
511ae28
ST_AsWKB/ST_AsHEXEWKB
Maxxen Jan 28, 2025
e773d52
contains/within
Maxxen Jan 28, 2025
426a3cb
slowly getting there
Maxxen Jan 28, 2025
7281327
intersects
Maxxen Jan 28, 2025
eb55c2d
st_geomfromwkb
Maxxen Jan 29, 2025
8a98800
add wkt parser
Maxxen Jan 29, 2025
a4342d3
actually make it compile
Maxxen Jan 29, 2025
8f690b0
reenable wkb parser
Maxxen Jan 29, 2025
62fa173
misc
Maxxen Jan 29, 2025
f96edff
wkt cleanup
Maxxen Jan 30, 2025
4b32880
fix wkt
Maxxen Jan 30, 2025
7cb2b1c
fix serde
Maxxen Jan 30, 2025
970ee4d
start with geojson
Maxxen Jan 30, 2025
d5a6fbe
implement st_geomfromgeojson
Maxxen Jan 31, 2025
7cadd3f
more functions
Maxxen Jan 31, 2025
cc608b7
add st_pointn
Maxxen Jan 31, 2025
7961ce3
only one left
Maxxen Jan 31, 2025
7c0a864
add collection extract
Maxxen Jan 31, 2025
3d8f47e
Fix edge cases in st_collect and st_collectionextract
Maxxen Feb 1, 2025
0658e61
fix wkb parser
Maxxen Feb 1, 2025
1e17876
format
Maxxen Feb 1, 2025
082c1c1
also pass srid lol
Maxxen Feb 1, 2025
8ab7b9b
fix st_collect
Maxxen Feb 1, 2025
40cf32d
more test fixes
Maxxen Feb 1, 2025
f1be70d
fix st_makeline
Maxxen Feb 1, 2025
a74e387
fix st_dump
Maxxen Feb 1, 2025
1eac120
fix st_assvg
Maxxen Feb 2, 2025
27b1ac0
all geometry tests pass
Maxxen Feb 4, 2025
7f086d9
wip new structure
Maxxen Feb 5, 2025
ed21729
implement geodesic functions in proj module
Maxxen Feb 5, 2025
534258c
we dont even need geographiclib anymore yo
Maxxen Feb 5, 2025
3eb11bc
add remaining cast functions
Maxxen Feb 8, 2025
2b7781e
format
Maxxen Feb 8, 2025
c45a2a8
add missing table function
Maxxen Feb 8, 2025
6c707f6
add osm table func back
Maxxen Feb 8, 2025
0de0f7d
add back experimental shapefile reader
Maxxen Feb 8, 2025
a774ebb
add todolist
Maxxen Feb 8, 2025
e3b22eb
add back optimizer rules
Maxxen Feb 8, 2025
2a45b45
move back rtree index
Maxxen Feb 9, 2025
d50e640
move serde into geometry
Maxxen Feb 9, 2025
4abf742
format
Maxxen Feb 9, 2025
4d01dd2
all tests pass
Maxxen Feb 9, 2025
0542db4
dont create arena for GEOS functions
Maxxen Feb 9, 2025
06edd25
slight reformat
Maxxen Feb 9, 2025
5b40987
Merge branch 'main' of https://github.com/duckdb/duckdb_spatial into …
Maxxen Feb 9, 2025
de0b5eb
add geoarrow
Maxxen Feb 9, 2025
0cb7c16
use approx bounding box in spatial_optimizers
Maxxen Feb 9, 2025
903ad3f
add st_extent for wkb
Maxxen Feb 10, 2025
ab03f2b
improve wkb error messages
Maxxen Feb 10, 2025
7029656
add docs for table functions
Maxxen Feb 10, 2025
1cae1de
document aggregates
Maxxen Feb 10, 2025
9685f71
add missing overloads
Maxxen Feb 10, 2025
c2b6f23
add missing docs
Maxxen Feb 10, 2025
8012e83
add another missing overload
Maxxen Feb 10, 2025
c2180b6
remove old source tree
Maxxen Feb 10, 2025
54f2342
add missing includes
Maxxen Feb 10, 2025
06c5804
more headers
Maxxen Feb 10, 2025
31e0411
misc fixes
Maxxen Feb 11, 2025
8622162
clear proj cache before destroying context
Maxxen Feb 11, 2025
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
25 changes: 10 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@
set(SPATIAL_USE_NETWORK OFF)
endif()

include_directories(spatial/include)
add_subdirectory(spatial/src)
add_subdirectory(src/spatial)
add_subdirectory(src/sgl)
include_directories(src)

include_directories(spatial/third_party/yyjson/include)
add_subdirectory(spatial/third_party/yyjson)
include_directories(src/third_party/yyjson/include)
add_subdirectory(src/third_party/yyjson)

include_directories(spatial/third_party/protozero/include)
include_directories(src/third_party/protozero/include)

include_directories(spatial/third_party/shapelib)
add_subdirectory(spatial/third_party/shapelib)
include_directories(src/third_party/shapelib)
add_subdirectory(src/third_party/shapelib)

add_library(${EXTENSION_NAME} STATIC ${EXTENSION_SOURCES})

Expand All @@ -47,8 +48,7 @@
COMMAND
${CMAKE_COMMAND} -G ${CMAKE_GENERATOR}
-DCMAKE_CXX_COMPILER='${CMAKE_CXX_COMPILER}'
-DCMAKE_C_COMPILER='${CMAKE_C_COMPILER}'
-DDUCKDB_ENABLE_DEPRECATED_API=1
-DCMAKE_C_COMPILER='${CMAKE_C_COMPILER}' -DDUCKDB_ENABLE_DEPRECATED_API=1
-DWASM_LOADABLE_EXTENSIONS=1 -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DOSX_BUILD_ARCH=${OSX_BUILD_ARCH}
-DSPATIAL_USE_NETWORK=${SPATIAL_USE_NETWORK}
Expand Down Expand Up @@ -96,7 +96,6 @@
find_package(GEOS REQUIRED)
find_package(GDAL REQUIRED)
find_package(EXPAT REQUIRED)
find_package(GeographicLib REQUIRED)

# Important: The link order matters, its the reverse order of dependency
set(EXTENSION_DEPENDENCIES
Expand All @@ -106,8 +105,7 @@
EXPAT::EXPAT
SQLite::SQLite3
ZLIB::ZLIB
${SQLITE3_MEMVFS}
${GeographicLib_LIBRARIES})
${SQLITE3_MEMVFS})

if(SPATIAL_USE_NETWORK)
message(STATUS "Building with network functionality")
Expand All @@ -130,9 +128,6 @@
endif()
endif()

# Geographiclib is special
include_directories(${GeographicLib_INCLUDE_DIRS})

# Add dependencies to extension
target_link_libraries(${EXTENSION_NAME} PUBLIC ${EXTENSION_DEPENDENCIES})

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ PROJ_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
EXT_NAME=excel
EXT_CONFIG=${PROJ_DIR}extension_config.cmake

CORE_EXTENSIONS='httpfs'

# Include the Makefile from extension-ci-tools
include extension-ci-tools/makefiles/duckdb_extension.Makefile

#### Override the included format target because we have different source tree layout
format:
find spatial/src -iname *.hpp -o -iname *.cpp | xargs clang-format --sort-includes=0 -style=file -i
find spatial/include -iname *.hpp -o -iname *.cpp | xargs clang-format --sort-includes=0 -style=file -i
find src/spatial -iname *.hpp -o -iname *.cpp | xargs clang-format --sort-includes=0 -style=file -i
cmake-format -i CMakeLists.txt
2 changes: 1 addition & 1 deletion duckdb
Submodule duckdb updated 290 files
2 changes: 1 addition & 1 deletion extension_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()

duckdb_extension_load(spatial
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}
INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/spatial/include
INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/src/spatial
${DO_TESTS}
LINKED_LIBS "../../deps/local/lib/*.a"
)
1 change: 0 additions & 1 deletion spatial/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions spatial/include/spatial/common.hpp

This file was deleted.

20 changes: 0 additions & 20 deletions spatial/include/spatial/core/functions/aggregate.hpp

This file was deleted.

37 changes: 0 additions & 37 deletions spatial/include/spatial/core/functions/cast.hpp

This file was deleted.

23 changes: 0 additions & 23 deletions spatial/include/spatial/core/functions/common.hpp

This file was deleted.

16 changes: 0 additions & 16 deletions spatial/include/spatial/core/functions/macros.hpp

This file was deleted.

Loading
Loading