Skip to content
Snippets Groups Projects
Unverified Commit 148de59c authored by User expired's avatar User expired
Browse files

fixed problem with mineT and its index operation ~ when using geography datasets

parent aa9d814e
No related branches found
No related tags found
No related merge requests found
Upcoming version: Upcoming version:
----------------- -----------------
- fixed problem with mineT and its index operation ~ when using geography datasets (Nikolaus Krismer)
- finishing open todo task (Nikolaus Krismer) - finishing open todo task (Nikolaus Krismer)
- moved some packages (Nikolaus Krismer) - moved some packages (Nikolaus Krismer)
- fixed invalid config for vienna (Nikolaus Krismer) - fixed invalid config for vienna (Nikolaus Krismer)
......
...@@ -23,6 +23,7 @@ class DbQueryPostgres extends AbstractDbQuery { ...@@ -23,6 +23,7 @@ class DbQueryPostgres extends AbstractDbQuery {
final String configNodeTileInformation = config.getTableNodesTileInformation(); final String configNodeTileInformation = config.getTableNodesTileInformation();
final String joinedNetwork = getJoinedNetwork(config, isIncoming); final String joinedNetwork = getJoinedNetwork(config, isIncoming);
final boolean usesGeographyType = config.hasGeoTypeGeography(); final boolean usesGeographyType = config.hasGeoTypeGeography();
final String tileIndexOperation = usesGeographyType ? "&&" : "~";
final int serverSRID = config.getServerSRID(); final int serverSRID = config.getServerSRID();
final String allEdges = "SELECT source, target, source_outdegree AS outdegree, target_indegree AS indegree" final String allEdges = "SELECT source, target, source_outdegree AS outdegree, target_indegree AS indegree"
...@@ -84,7 +85,7 @@ class DbQueryPostgres extends AbstractDbQuery { ...@@ -84,7 +85,7 @@ class DbQueryPostgres extends AbstractDbQuery {
+ " SELECT " + DbUtils.getGeometry("getTileEnvelope(geo, ?)", DbUtils.SRID_BBOX_MINET, serverSRID) + " AS bbox" + " SELECT " + DbUtils.getGeometry("getTileEnvelope(geo, ?)", DbUtils.SRID_BBOX_MINET, serverSRID) + " AS bbox"
+ " FROM " + configNode + " WHERE id = ?" + " FROM " + configNode + " WHERE id = ?"
+ " ) AS tile, " + joinedNetwork + " ) AS tile, " + joinedNetwork
+ " WHERE tile.bbox ~ " + (config.hasNetwork() ? "node_" : "n.") + "geo"; + " WHERE tile.bbox " + tileIndexOperation + " " + (config.hasNetwork() ? "node_" : "n.") + "geo";
// note that when using edgesInTileInformation a joinedNetwork (usually a materialized view) will not be used // note that when using edgesInTileInformation a joinedNetwork (usually a materialized view) will not be used
final String edgesInTileInformation = edgeAttributeSelection final String edgesInTileInformation = edgeAttributeSelection
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment