ogr2ogr.exe -f "ESRI Shapefile" Byggnad_area_3D_WGS84.shp Byggnad_area_3D.shp -t_srs EPSG:4326var viewer = new Cesium.Viewer('cesiumContainer');var scene = viewer.scene;
function createModel(url) { var model = scene.primitives.add(Cesium.Model.fromGltf({ url : url, modelMatrix : Cesium.Matrix4.IDENTITY }));
model.readyPromise.then(function(model) { var camera = viewer.camera; var r = 2.0 * Math.max(model.boundingSphere.radius, camera.frustum.near); var center = Cesium.Matrix4.multiplyByPoint(model.modelMatrix, model.boundingSphere.center, new Cesium.Cartesian3()); var heading = Cesium.Math.toRadians(230.0); var pitch = Cesium.Math.toRadians(-20.0); camera.lookAt(center, new Cesium.HeadingPitchRange(heading, pitch, r * 2.0)); }).otherwise(function(error){ window.alert(error); });}
createModel('../../SampleData/test/Byggnad_area_3D_surface.gltf');--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
var viewer = new Cesium.Viewer('cesiumContainer');
function createModel(url) { var entity = viewer.entities.add({ name : url, position : Cesium.Cartesian3.ZERO, orientation : Cesium.Quaternion.IDENTITY, model : { uri : url } }); viewer.trackedEntity = entity;}
createModel('../../SampleData/test/Byggnad_area_3D_surface.gltf');To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
From your post, I could see you have used ESRI Shapefile to create a COLLADA Model and then yo gITF. Do you have any write up on how to convert from ESRI Shapefile to gITF?
Also the shapefile you have used, is 3D shapefile I suppose?
Details on the conversion steps would be very helpful. I need to create a 3D Models from 2D buildings data in shapefile format.
Thanks
Rohit
And if you are considering to use 2D polygons and extrude them, you can convert from Shapefile to GeoJson using GDAL easily.
On Tuesday, January 24, 2017 at 5:37:04 PM UTC+1, Left Gully wrote:
Rohit,Iman is getting great results using FME, but I do not have access to that software, and its not cheap (unless you are a student, or can complete your project before a 30-day trial times-out).