jumpinjackie / mapguide-rest

REST Extension for MapGuide Open Source
GNU Lesser General Public License v2.1
26 stars 14 forks source link

LINESTRING XYZ in czml ? #189

Open AlenKelemen opened 6 years ago

AlenKelemen commented 6 years ago

As SQLite and sdf files can have LINESTRING XYZ geometries it is tempting to try to show them in Cesium.js. So I changed line 229 in czmlwriter.php: $str .= $coord->GetX().",".$coord->GetY().",".$zval; to $str .= $coord->GetX().",".$coord->GetY().",".$coord->GetZ(); This way one can make mapguide-rest to provide czml for 3D polylines, not only for extruded polygons.

jumpinjackie commented 6 years ago

Interesting! Do you have any sample data with 3D coordinates you can attach here? I want to see how this looks myself before deciding how best to incorporate your suggested change.

AlenKelemen commented 6 years ago

test3D - 1.sqlite in the mapguide/rest/sampleapps/czml example: test3d - 1 More fun: test3d - 2 3D linestring file: test3D - 1.zip And, (//TODO: Include feature properties as specified in the Layer Definition) as czml can be extended with custom properties like in: https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=CZML%20Custom%20Properties.html&label=CZML, it may be possible to add feature properties too. That way those pipes could be in different diameters...