Skip to content

Commit

Permalink
migrate map server from quantile to percentile_disc
Browse files Browse the repository at this point in the history
  • Loading branch information
cproof committed Sep 23, 2024
1 parent 50f95c0 commit ba524e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RMBTMapServer/src/at/rtr/rmbt/mapServer/HeatmapTiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected byte[] generateTile(final HeatmapTileParameters params, final int tile
whereSQL.append(" AND ").append(sf.where);

final String sql = String.format("SELECT count(\"%1$s\") count,"
+ " quantile(\"%1$s\",?) val,"
+ " percentile_disc(?) WITHIN GROUP (ORDER BY \"%1$s\") AS val,"
+ " ST_X(ST_SnapToGrid(location, ?,?,?,?)) gx,"
+ " ST_Y(ST_SnapToGrid(location, ?,?,?,?)) gy"
+ " FROM v_test2 t"
Expand Down
2 changes: 1 addition & 1 deletion RMBTMapServer/src/at/rtr/rmbt/mapServer/ShapeTiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected byte[] generateTile(final ShapeTileParameters params, final int tileSi
//output has to be transformed to EPSG:3857 for Browsers
+ " ST_SnapToGrid(ST_Transform(ST_intersection(p.geom, box.box), 3857), ?,?,?,?) AS geom,"
+ " count(\"%1$s\") count,"
+ " quantile(\"%1$s\",?) val"
+ " percentile_disc(?) WITHIN GROUP (ORDER BY \"%1$s\") AS val"
+ " FROM box, bev_vgd p"
+ " JOIN test_location tl ON tl.kg_nr_bev=p.kg_nr_int"
+ " JOIN v_test2 t ON t.open_test_uuid = tl.open_test_uuid"
Expand Down

0 comments on commit ba524e5

Please sign in to comment.