Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
database-lib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Global Dynamic Exposure
Libraries
database-lib
Merge requests
!24
Draft: Resolve "[Epic] Changes to database-lib for the 25.01 release"
Code
Änderungen prüfen
Branch auschecken
Herunterladen
Patches
Unformatierter Diff
Menüleiste ausklappen
Open
Draft: Resolve "[Epic] Changes to database-lib for the 25.01 release"
v25.01
into
main
Overview
0
Commits
9
Pipelines
14
Changes
5
Open
Draft: Resolve "[Epic] Changes to database-lib for the 25.01 release"
Danijel Schorlemmer
requested to merge
v25.01
into
main
8 months ago
Overview
0
Commits
9
Pipelines
14
Changes
5
Closes
#25
\approve
@laurens
@gislars
@chengzhi
@pdlmora
\fyi
@tara
0
0
Merge request reports
Viewing commit
200b648f
Prev
Next
Show latest version
5 files
+
109
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
200b648f
Add bounding box intersection call
· 200b648f
Laurens Oostwegel
authored
1 month ago
databaselib/abstract.py
+
25
−
0
View file @ 200b648f
Edit in single-file editor
Open in Web IDE
Show full file
@@ -84,6 +84,31 @@ class AbstractDatabase(abc.ABC):
field.
"""
@staticmethod
@abc.abstractmethod
def
bbox_intersect_call
(
table_1
:
str
,
geometry_column_1
:
str
,
table_2
:
str
,
geometry_column_2
:
str
):
"""
Abstract function to create the SQL query part for intersecting the bounding boxes of
two tables.
Args:
table_1 (str):
The name of the first table.
geometry_column_1 (str):
The geometry column name of the first table.
table_2 (str):
The name of the second table.
geometry_column_2 (str):
The geometry column name of the second table.
Returns:
str:
Part of an SQL query to be used to clip bounding boxes of two tables, usually
to decrease the query time.
"""
@abc.abstractmethod
def
order_by_latitude
(
self
,
table_name
:
str
)
->
str
:
"""
Loading