JMEOS 1.3#9
Conversation
…o run them & added .idea personal config files in the .gitignore
…n of temporal_to_tsequence (temporal.c) which was still given a string as the interpolation type instead of an integer & added TestLogger in order to trace the lifecycle of each test and the parameters used
…le & testShiftScale
…tInst has no interpolation but it used to be tested as a LINEAR one
… functions t(int,float)box_expand
…y geom_in, pgis_geography_in by geog_in, adapted ConversionUtils & TPoint files accordingly
…point_as_text now tspatial_as_text, tpoint_to_stbox now tspatial_to_stbox, tpoint_srid now tspatial_srid: tpoint_round, tpoint_start_value, tpoint_end_value left
… with a single instance or a discret sequence set of TGeogPoint/TGeomPoint, fixed assertion using a STEP print verification (Interp=Step
- Replace meos.h with v1.3 and add meos_geo.h - Update FunctionsExtractor and Generator to support new headers and types - Fix existing tests to match MEOS
…t values and output them in MF-JSON format
… such as csv and sql files
…into java + the resulting generated csv files
…tyDB, orchestrated with docker and jdbc
…nd how to run/troubleshoot them
…jmeos-core for the core code, deleted example programs/notebooks to move them in a new repository
estebanzimanyi
left a comment
There was a problem hiding this comment.
Thank you for this substantial contribution, @JashanReel. The multi-module Maven layout (jmeos-core/) is the right architectural direction — it unblocks Windows and macOS builds of MobilitySpark by allowing the native library to be packaged separately.
Before this can be merged, there are a few clean-up items to address:
Files to remove
IDE configuration (should be in .gitignore, not committed):
.idea/checkstyle-idea.xml.idea/compiler.xml.idea/encodings.xml.idea/jarRepositories.xml.idea/misc.xml.idea/modules.xml.idea/vcs.xml
Binary blobs (must not be committed):
jar/JMEOS.jar— generated artifact; belongs in the Maven build output, not source controljmeos-core/src/libmeos.so— stray copy at wrong path (note:jmeos-core/src/main/resources/lib/libmeos.soIS intentional as a bundled resource)
Compiled Java class files (generated, not source):
jmeos-core/src/main/java/utils/BuilderUtils.classjmeos-core/src/main/java/utils/Pair.class
Debug/scratch files:
jmeos-core/src/main/java/types/collections/output/intspanset_output.txtjmeos-core/src/main/java/types/collections/time/test.java
.gitignore update needed
Please extend .gitignore to cover:
.idea/
*.class
*.jar
/jmeos-core/src/libmeos.so
Commit history
The branch currently has 78 commits. For review and bisect purposes, please squash into a small number of logical commits, for example:
build: restructure as multi-module Maven project (jmeos-core/)feat: update to MEOS 1.3 APItest: update test suite for new APIfix: miscellaneous bug fixes
Interface split (separate follow-up)
The single flat MeosLibrary interface will hit a JVM MethodTooLargeException on ARM64 / Windows / macOS once all MEOS functions are included. A follow-up PR will split it into public static sub-interfaces (PartA–PartD) to fix this. No action needed here — just flagging so the reviewer is aware.
Once the file clean-up and squash are done this PR should be straightforward to review.
…atedFunctions & corrected unit tests accordingly
There was a problem hiding this comment.
Rename to FunctionsGenerator rather than new, similar remark for Test file.
| @@ -0,0 +1,17 @@ | |||
| package types.enums; | |||
|
|
|||
| public enum RTreeSearchOp { | |||
There was a problem hiding this comment.
Should we not include this directly in RTree defintion rather that one folder for enum?
| # Readme to generate the jar file and integrate it in an other directory - IntelliJ IDE 2023.1 | ||
| ## A. Generation | ||
|
|
||
| ### 1. JAR (already done for you) |
There was a problem hiding this comment.
Keep this toplevel. Rename upper case.
There was a problem hiding this comment.
and link main README.md file to it.
…nge for the test file
JMEOS update: MEOS 1.3 compatibility, unit tests, examples, exception system
Overview
This PR brings JMEOS up to date with MEOS 1.3, fixes the entire unit test suite, adds a comprehensive set of usage examples and Jupyter notebooks, and introduces a structured Java exception system modelled after PyMEOS-CFFI.
1. MEOS 1.3 compatibility
FunctionsExtractor&FunctionsGeneratormeos.h+meos_geo.h), making it possible to include additional headers in the future (e.g.meos_cbuffer.h)functions.javafrom the updated headersNewFunctionsGeneratorFunctionsExtractor&FunctionsGeneratorfunctions.javafrom meos-idl.jsonRenamed / removed functions
tpoint_*→tgeo_*patternDockerfile
2. Unit test suite
TFloatTest,TIntTest,TTextTest,TBoolTest,STBoxTest,TBoxTest,FloatSetTest,FloatSpanTest,FloatSpanSetTest,IntSetTest,IntSpanTest,IntSpanSetTest,TextSetTest,DateSetTest,DateSpanTest,DateSpanSetTest,TsTzSetTest,TsTzSpanTest,TsTzSpanSetTest,TGeomPointTest,TGeogPointTestTestLogger, a JUnit 5 extension implementingBeforeEachCallback/AfterEachCallbackthat logs each test's name, input parameters to better trace the source error3. Usage examples & Jupyter notebooks
20+ example programs ported from the MEOS C examples:
N01_Hello_World.java01_hello_world.cN01_Hello_World_Geodetic.java01_hello_world_geodetic.cN02_AIS_Read.java02_ais_read.cN03_AIS_Assemble.java03_ais_assemble.cN03_BerlinMOD_Assemble.java03_berlinmod_assemble.cN04_AIS_Store.java04_ais_store.cN04_AIS_Stream_DB.java04_ais_stream_db.cN04_AIS_Stream_File.java04_ais_stream_file.cN05_BerlinMOD_Disassemble.java05_berlinmod_disassemble.cN06_BerlinMOD_Clip.java06_berlinmod_clip.cN07_BerlinMOD_Tile.java07_berlinmod_tile.cN08_BerlinMOD_Simplify.java08_berlinmod_simplify.cN09_BerlinMOD_Aggregate.java09_berlinmod_aggregate.cN10_AIS_Assemble_Full.javaais_assemble_full.cN11_AIS_Expand_Full.javaais_expand_full.cN12_AIS_Transform_Full.javaais_transform_full.cN13_Aggregation_Demo.java*_agg.cfilesN14_RTree_Index.javartree_example.cN15_TPoint_MakeCoords.javatpointseq_make_coords.cN16_Clustering_KMeans.javapopplaces_kmeans.cN17_Clustering_Regions_Intersecting.javaregions_intersecting.cN18_Clustering_DBSCAN.javageonames_dbscan.cTwo interactive Jupyter notebooks using the IJava kernel, allowing in-notebook execution of JMEOS code with inline results:
Jupyter_AIS.ipynb: exercices exploring AIS dataJupyter_BerlinMod_Brussels.ipynb: RTree vs Brute Force on the Brussels communes dataset4. Java exception system
Previously, errors raised by the native MEOS library were printed to the console only and there was no way to intercept them in Java via
try-catch, making robust error handling impossible in any application built on JMEOS.The new system, modelled after PyMEOS-CFFI, consists of three components:
Exception hierarchy
20 classes organised into 4 branches:
MeosInternalErrorMeosArgumentErrorMeosIoErrorMeosFeatureNotSupportedMeosErrorHandlerRegisters a C callback via the
error_handler_fninterface. On each native call, it captures the error code and message.checkError()maps the code to the appropriate Java exception and throws it.Integration in
functions.javaEvery generated wrapper function now calls
MeosErrorHandler.checkError()immediately after the native call to ensure no MEOS error can remain silent.