This PR should be reviewed before merging. Spatio temporal features for vitrivr-engine and Type System changes.#141
Conversation
Introduced `CaptureTime` and `Coordinates` modules to analyze image metadata and extract capture timestamp and GPS coordinates from EXIF metadata, respectively. These implementations include necessary extractors, analysers and utilities.
…s specifically for geography queries, since > and < dont really have ignificant meaning. there is a fallback implementation for these operators, but its not really thought to be used. Further embed new geography type in vitrivr-engines persistance model as well as create a new Extractor and Analyzer for PostGISCoordinates. Also adds default values for normal coordinates (lat = 0, lon = 0) and for timestamps (1 jan 1970) because there were errors when trying to write empty descriptors to db
…es, and data across modules. Major changes include: - Deletion of `LocalDateTimeSerializer` and `DateTimeInputData`. - Removal of `LocalDateTimeValue` usage in core and plugins. - Addition of LSCTimestamp module targeting LSC dataset timestamp extraction. - CaptureTimeExtractor.kt now just handles the happy case where we have a timestamp directly in the EXIF metadata. - Adaptation of Documentation around the project - Some rewriting of code in the Extractor and Analyser classes after comments from Ralph - Adds TODOS which are not yet handled regarding code review feedback
…ime instead of java.util.date with the Value.DateTime and Type.DateTime instances. Also adjusts the Timestamp extractors to use LocalDateTime now. This should overall be the better choice compared to java.util.date, since when working with PostgreSQL and PGvector this matches the expected column types more closely.
…deletes work in progress changes for code review. No Unit Test as of now.
… spatial query support with geography type integration, and add Boolean AND API."
Fix IntersectionAggregator.kt to properly log crucial info during runtime and fix its functionality to correctly detect an intersection.
…nates, LSCTimestamp, and CaptureTime - Added `IntersectionAggregatorTest` to verify intersection functionality. - Implemented integration-style tests for `Coordinates`, `PostGISCoordinates`, `LSCTimestamp`, and `CaptureTime` to validate metadata extraction. - Updated build.gradle to include `vitrivr-engine-module-features` dependency. - Included sample resources for testing EXIF metadata, GPS coordinates, and timestamp extraction.
|
This PR now also contains unit tests for the added features. Changes regarding the Geography type are not final but changes will follow over the course of my Bachelor Project. |
…ography type is compared with primitive operators. Removes some TODOS.
- Made `latAttribute` and `lonAttribute` optional in SpatialBooleanQuery. - This allows better flexibility when using operators like `DWITHIN` that don't require explicit column names. - Added `kotlin-test` dependency for improved testing support. - Refactored QueryParser to simplify spatial operator evaluation. - StructDescriptor: • Adjusted representation of spatial fields for better alignment with flexible query models. • Ensures correct type declarations and compatibility with retrievers. - Changed the Analysers for all coordinate related features to perform a proximity query instead of an exact coordinate match. This makes more sense for most use cases.
ppanopticon
left a comment
There was a problem hiding this comment.
Generally the PR looks fine. I have left some minor comments. The greatest issue I currently see is placement of things:
- Tests should be in the same module like the classes being tested.
- I would not put too much into the
vitrivr-engine-coremodule. For example, theExtractorsandRetrievers belong to thevitrivr-engine-module-featuresor a dedicated module (e.g., for LSC-only features).
| /* Test Fixtures. */ | ||
| testFixturesImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: version_junit | ||
| testFixturesImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: version_junit | ||
| testImplementation "org.jetbrains.kotlin:kotlin-test:2.1.10" |
There was a problem hiding this comment.
You could reference version_kotlin variable here instead writing-out the version.
| private val layout = listOf(Attribute("timestamp", Type.Datetime)) | ||
|
|
||
| // we need file access (and ContentType.BITMAP_IMAGE) | ||
| override fun matches(r: Retrievable): Boolean = r.content.any { it.type == ContentType.BITMAP_IMAGE } && r.filteredAttribute(SourceAttribute::class.java)?.source is FileSource |
There was a problem hiding this comment.
Do we need a FileSource? Couldn't we use an arbitrary InputStream to extract metadata from.
| * @author henrikluemkemann | ||
| * @version 1.0.0 | ||
| */ | ||
| data class CompoundBooleanQuery( |
There was a problem hiding this comment.
How would you call the 'OR' version of this query (since they are both compound)?
| * This type is intended to represent PostGIS `geography(POINT,4326)` types. | ||
| */ | ||
| @Serializable | ||
| data object Geography : Type { |
There was a problem hiding this comment.
Again a naming issue: Since 'Geography' is effectively a point, wouldn't it make sense to call it that? In my understanding (and maybe I'm wrong) a geography could also be a rectangle, for example.
| /* vitrivr core dependency. */ | ||
| api project(':vitrivr-engine-core') | ||
| api project(':vitrivr-engine-module-m3d') | ||
| api project(':vitrivr-engine-module-features') |
There was a problem hiding this comment.
Why is this dependency needed?
…LSC dataset instead of just thumbnails. - Added `logger` to `StructDescriptorTable` and handled multi-parameter constructors dynamically because it had many issues with the new endpoint. - Implemented metadata API endpoint for LSC content, including handling of WKT/WKB coordinate parsing. - Updated `build.gradle` to dynamically use Kotlin version for test dependencies. - Added `metadata` configuration in `ApiConfig` and integrated metadata route in `Routes`.
…tioTemporalFeatures # Conflicts: # vitrivr-engine-core/build.gradle
…` to avoid PostgreSQL parameter limits. - Introduced `MultiFieldLookup` transformer and its factory for efficient retrieval and lookup of multiple fields (I didn't get FieldLookup query syntax to work) - Registered `MultiFieldLookupFactory` in transformer services.
This PR contains commits that introduce: