Skip to content

Added Oracle adapters#72

Draft
hgspatial wants to merge 7 commits intomainfrom
feature-oracle-support
Draft

Added Oracle adapters#72
hgspatial wants to merge 7 commits intomainfrom
feature-oracle-support

Conversation

@hgspatial
Copy link
Copy Markdown

Added Oracle adapters.

@hgspatial hgspatial requested a review from clausnagel December 4, 2025 10:27
public BooleanExpression crosses(ScalarExpression leftOperand, ScalarExpression rightOperand) {
// Oracle Database does not have a direct equivalent to PostgreSQL's st_crosses function.
// You may need to create a custom function or use a different approach.
throw new UnsupportedOperationException("crosses is not supported in Oracle Database.");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use MDSYS.sdo_relate combined with the 'mask=OVERLAPBDYINTERSECT'?

protected Column getGeometryType(Table geometryData) {
// Oracle Database does not have a direct equivalent to PostgreSQL's geometry_properties column.
// You may need to create a custom function or use a different approach.
throw new UnsupportedOperationException("getGeometryType is not supported in Oracle Database.");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The equivalent expression in Oracle looks like JSON_VALUE(geometry_properties, '$.type') ) . This is a Function expression rather than Column. We may need to change the API here.

@yaozhihang
Copy link
Copy Markdown
Member

I think it would be helpful for testing to add the CLI parameter databaseType in this PR.

@yaozhihang
Copy link
Copy Markdown
Member

CityGML import/export work fine, but the import performance could be better. In my tests, importing untextured LOD2 buildings takes approx. 20s per 1000 buildings (with indexes disabled). The PostgreSQL version only needs 2 seconds.


@Override
public Function extent(ScalarExpression operand) {
return Function.of("sdo_mbr", operand);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to use sdo_aggr_mbr here, because the extent is calculated over a column (envelpe).

# Conflicts:
#	citydb-operation/src/main/java/org/citydb/operation/deleter/feature/FeatureDeleter.java
#	citydb-operation/src/main/java/org/citydb/operation/importer/address/AddressImporter.java
#	citydb-operation/src/main/java/org/citydb/operation/importer/appearance/GeoreferencedTextureImporter.java
#	citydb-operation/src/main/java/org/citydb/operation/importer/appearance/SurfaceDataMappingImporter.java
#	citydb-operation/src/main/java/org/citydb/operation/importer/geometry/GeometryImporter.java
#	citydb-operation/src/main/java/org/citydb/operation/importer/geometry/ImplicitGeometryImporter.java
#	citydb-operation/src/main/java/org/citydb/operation/importer/property/AttributeImporter.java
#	citydb-operation/src/main/java/org/citydb/operation/importer/property/ImplicitGeometryPropertyImporter.java
@BWibo BWibo added the priority: critical Blocks releases, breaks core functionality, or causes data loss - immediate attention label Feb 24, 2026
@BWibo BWibo added type: feature Requests for new capabilities, enhancements, or additions to existing functionality domain: oracle Oracle database backend specific functionality and compatibility status: in-progress Actively being worked on by a team member with implementation underway and removed priority: critical Blocks releases, breaks core functionality, or causes data loss - immediate attention labels Feb 24, 2026
@clausnagel clausnagel marked this pull request as draft March 10, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: oracle Oracle database backend specific functionality and compatibility status: in-progress Actively being worked on by a team member with implementation underway type: feature Requests for new capabilities, enhancements, or additions to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants