Skip to main content

Converting EPANET Entities to Geospatial 3D Models

EPANET Positioning vs Google Maps/Tiles

Tank T-3 is pretty far off from where it looks like it should be.

In the following image, the tank position according to Google is on the left and circled in green. The tank position according to the INP file is on the right and circled in orange.

Tank T-3 Positioning

The next image shows the 3D representation where you can easily compare the EPANET location vs Google Tiles:

Tank T-3 Positioning in 3D

Using Metadata from Model (gltf) in Cesium

It's not supported by default, but we might be able to hack it.

want-to-see-extra-attributes-on-model

This one is very informative!

best-practices-for-tileset-and-gltf-structure-and-embedding-metadata

They talk about the MetadataGranularities Example.

This guy is highlight-able and clickable

Subsurface Rendering in Cesium

This shows terrain clipping

https://sandcastle.cesium.com/?src=Globe%20Translucency.html

Placing Objects on Globe

https://community.cesium.com/t/correctly-positioning-coordinates-from-imported-gltf-file/32583

https://cesium.com/learn/unity/unity-placing-objects/

Notes

P-363

{"scene": 0, "scenes": [{"nodes": [0]}], "asset": {"version": "2.0", "generator": "https://github.com/mikedh/trimesh"}, "accessors": [{"componentType": 5125, "type": "SCALAR", "bufferView": 0, "count": 384, "max": [65], "min": [0]}, {"componentType": 5126, "type": "VEC3", "byteOffset": 0, "bufferView": 1, "count": 66, "max": [-85.05097961425781, 38.19375991821289, 166.3557586669922], "min": [-85.16287994384766, 38.089717864990234, 163.24940490722656]}, {"componentType": 5126, "count": 66, "type": "VEC3", "byteOffset": 0, "bufferView": 2, "max": [0.7301567792892456, 0.7284263372421265, 0.9999942183494568], "min": [-0.7301567792892456, -0.7284263372421265, -0.9999942183494568]}], "meshes": [{"name": "geometry_0", "extras": {"id": "P-363", "diameter": 4, "length": 3099.239, "roughness": 150, "minorLoss": 0, "kWall": 0, "fromNode": "J-510", "toNode": "J-513", "coordinates": [[-85.6580041, 38.0110893, 162.99646344], [-85.6477072, 38.0135305, 166.10246688]]}, "primitives": [{"attributes": {"POSITION": 1, "NORMAL": 2}, "indices": 0, "mode": 4}]}], "nodes": [{"name": "world", "children": [1]}, {"name": "geometry_0", "mesh": 0}], "buffers": [{"uri": "gltf_buffer_0.bin", "byteLength": 1536}, {"uri": "gltf_buffer_1.bin", "byteLength": 792}, {"uri": "gltf_buffer_2.bin", "byteLength": 792}], "bufferViews": [{"buffer": 0, "byteOffset": 0, "byteLength": 1536}, {"buffer": 1, "byteOffset": 0, "byteLength": 792}, {"buffer": 2, "byteOffset": 0, "byteLength": 792}], "extensionsUsed": ["CESIUM_RTC"], "extensions": {"CESIUM_RTC": {"center": [-85.65285564999999, 38.012309900000005, 164.54946516]}}}

In state plane:

{ "type": "Feature", "properties": { "id": "P-366", "diameter": 4, "length": 531.869, "roughness": 150, "minorLoss": 0, "kWall": 0, "index": 0, "fromNode": "J-406", "toNode": "J-516" }, "geometry": { "type": "LineString", "coordinates": [ [ 1508732.829827583394945, 1187181.029609422665089, 165.25670784 ], [ 1508759.191200410714373, 1187021.614262490533292, 168.02240208 ] ] } },

It looks like the closest match was when I assigned lat/long as the from node and scaling to 0.1. However, the length is WAY off, as is the orientation. Playing with the rotation (heading, pitch, roll) didn't help much...

I'm going to try re-exporting them in EPSG:3088, Kentucky Single Zone. I think this will help with pipe length and layout.

Maybe then we can define the starting point of the whole network as min/max of the KY ref system, i.e. (0,0) in EPSG:3088 should correspond to some lat/long in WGS84?