Spatial query & performance

How do I make a spatial query in Jmix? All objects in a bounded rectangle… plus other normal Jmix conditions

I’ve got maps with lots of objects.
But I’d like better performance.

I’m thinking of using a geoserver to display the map as a WMS stream and using Jmix to display the WMS.
If the zoom is low, there will be a maximum number of objects, in which case I’ll only use the WMS streams.
But if the zoom is high, there will be few objects, and I’d like to display the objects in the normal Jmix way with normal interactions.

But I need to add a spatial query to have only the objects in the map…
I can’t find a JPQL way to do this with ecpliselink/jmix.

Hello!

If I understand correctly, you want to load objects from the database within the visible view area? If so, you can explore database extensions or modules that handle spatial data. The choice depends on the DBMS you’re using:

  • PostGIS is an extension for PostgreSQL.
  • Oracle Spatial
  • SQL Server Spatial

We haven’t investigated integrating with these systems, so it’s difficult to say what might be required.

We mainly use PostgreSQL for production, hsqldb for development.
But on other software, we have a few customers with Oracle or SQL Server, so in the futur we will be interested by other DBMS…

Right now, we’d be happy to use PostGIS, but for now Jmix creates geometry in text datatype with WKT data, not as a PostGIS datatype.

there is maybe a solution with geolatte or geotools