Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ https://geodan.github.io/i3dm.export/samples/traffic_lights/cesium/

Input database table contains following columns:

. geom - geometry with Point or PointZ (for example epsg:4326) for i3dm positions;
. geom - geometry with Point or PointZ for instance positions;

. scale - double with instance scale (all directions);

Expand Down Expand Up @@ -103,7 +103,23 @@ Tool parameters:

```

# Docker
## Projection support

The input table can defined in

1] Global coordinates

WGS84 longitude, latitude in degrees + height in meters with ellipsoid as reference (EPSG:4979)

2] Local coordinates (for release 2.12.0 and higher)

Any projected coordinate system height in meters with geoid as reference

For example in the Netherlands use composite EPSG:7415 (Amersfoort / RD New (EPSG:28992) + NAP height in meters (EPSG:5709)).

On runtime the tool will reproject the instance positions to EPSG:4978 (ECEF coordinates) for creating the 3D tiles.

## Docker

See https://hub.docker.com/r/geodan/i3dm.export

Expand Down
2 changes: 1 addition & 1 deletion src/InstancesRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static (BoundingBox bbox, double zmin, double zmax) GetBoundingBoxForTabl
conn.Open();
var q = string.IsNullOrEmpty(query) ? "" : $"where {query}";

var sql = $"SELECT st_xmin(box), ST_Ymin(box), ST_Xmax(box), ST_Ymax(box), ST_Zmin(box), ST_Zmax(box) FROM (select st_3dextent({geometry_column}) AS box from {geometry_table} {q}) as total";
var sql = $"SELECT st_xmin(box), ST_Ymin(box), ST_Xmax(box), ST_Ymax(box), ST_Zmin(box), ST_Zmax(box) FROM (select st_transform(st_3dextent({geometry_column}),4979) AS box from {geometry_table} {q}) as total";

var cmd = new NpgsqlCommand(sql, conn);

Expand Down