Dear Sir,
I am displaying geojson which has around 897 records it displays data but not all. out of 897, it displays around 100 records
is there any limitations or license I don’t understand because all is the same data from a single geojson file
I am using Windows operating system. chrome as browser and reactJS for development
here is my code
var dataSource = this.state.Viewer.dataSources.add(this.state.Cesium.GeoJsonDataSource.load(‘data/adu_governorate…geojson’, {
stroke: this.state.Cesium.Color.HOTPINK,
fill: this.state.Cesium.Color.PINK.withAlpha(0.5),
strokeWidth: 3,
clampToGround: true
}));
this.state.Viewer.dataSources.add(dataSource);
here is how it displays
Thank you
Mohammed Kabeer
omar
March 16, 2020, 7:43pm
2
There shouldn’t be any limitations here. Would you be able to share this GeoJSON with me so I can take a look?
You can upload it on Cesium ion and post a link to your Sandcastle example here.
sure here I am attaching 2 files one for 2D data (145) records.
adu_governorate…geojson
the other one is 3D data (891) records
ksa_parcels_3d.geojson
Thank you
Mohammed Kabeer
adu_governorate…geojson (4.14 MB)
ksa_parcels_3d.geojson (407 KB)
Dear Mr.Omar
here I uploaded in ion server also, please look at it
Thank you
Mohammed Kabeer
I loaded both of the supplied into QGIS. QGIS reported that both files contain 50 features. I had no problem displaying the adu_governorate data in Sandcastle. One of the features, Farasan, consists of 61 or 62 islands.
Cesium fails to load the ksa_parcels_3d data because of the CRS being urn:ogc:def:crs:EPSG::4327. The EPSG website identifies it as being deprecated and 3D. That CRS is not supported by Cesium and results in a runtime error “Unknown crs name: urn:ogc:def:crs:EPSG::4327”.
Scott
yes I did export the file using QGIS and displaying all records but still, there is one problem why tiny part of tiles are missing
please see the picture
Thank You
Mohammed Kabeer
adu_governorate_qgis.rar (1.99 MB)
Dear Sir,
another 3D file (ryd_parcel_3d) exported from QGIS with “urn:ogc:def:crs:OGC:1.3:CRS84” referencing system
it shows data for zoom levels but when I zoom more the data disappears
when I zoom more disappears
here I am attaching snapshots and exported geojson file please try this file your side
Thank you
Mohammed Kabeer
ryd_parcel_3d_qgis.rar (363 KB)
This looks like the problem described here . Modifying the polygons to use the geodesic arc type looks like it fixes the problem.
var viewer = new Cesium.Viewer(‘cesiumContainer’);
var dataSource = Cesium.GeoJsonDataSource.load(’…/…/SampleData/adu_governorate_qgis_SOME.geojson’, {
clampToGround: true,
stroke: Cesium.Color.HOTPINK,
fill: Cesium.Color.PINK.withAlpha(0.5),
strokeWidth: 3
});
dataSource.then(function(data) {
// Change the arcType to GEODESIC, which is what it was in CesiumJS 1.53.
for (var i = 0; i < data.entities.values.length; i++) {
var entity = data.entities.values[i];
if (Cesium.defined(entity.polygon)) {
entity.polygon.arcType = Cesium.ArcType.GEODESIC;
}
}
viewer.dataSources.add(dataSource);
});
``
Please see if that works for you.
Scott
Dear Sir,
I will check this function and will let you know
this is for missing tiles or 3D data display. because in the function I saw
adu_governorate_qgis_SOME.geojson which has missing tiling problem
how about the 3D file can you please check that (ryd_parcel_3d)
Thank you
Mohammed Kabeer
The ryd_parcel_3d file looks good also.
Scott
Dear Scott,
I tried the following GEODESIC converting function but still, it is missing tiles
and I tried the 3D file also with
GEODESIC function and without but still, it’s not appearing when I zoom more
please check the 3D file
here is the function what I am using
var dataSource2 = this.state.Viewer.dataSources.add(this.state.Cesium.GeoJsonDataSource.load(‘data/adu_governorate_qgis.geojson’, {
stroke: this.state.Cesium.Color.RED,
fill: this.state.Cesium.Color.RED.withAlpha(0.5),
strokeWidth: 10,
clampToGround: true
}));
dataSource2.then(function(data) {
// Change the arcType to GEODESIC, which is what it was in CesiumJS 1.53.
for (var i = 0; i < data.entities.values.length; i++) {
var entity = data.entities.values[i];
if (this.state.Cesium.defined(entity.polygon)) {
entity.polygon.arcType = this.state.Cesium.ArcType.GEODESIC;
}
}
this.state.Viewer.dataSources.add(dataSource2);
});
Thank you
Mohammed Kabeer
omar
March 24, 2020, 1:28am
12
I think this is the following shadow volume bug:
https://github.com/CesiumGS/cesium/issues/8049
Dear Mr.Omar,
I simplified geometry in qgis with tolerance 0.000005 and tried also still the same problem
so how to fix this bug
another thing please can you check my 3D file (ryd_parcel_3d_qgis.geojson) why it’s disappearing when I zoom more like zoom level 10 please check that file your side
Thank you once again
Mohammed Kabeer
wow much more better
I did simplify with less tolerance like 0.005 now it is better
still, I have 3D file issue (ryd_parcel_3d_qgis.geojson) so please check this out
please see the attached file
Thank you
Mohammed Kabeer
ryd_parcel_3d_qgis.rar (363 KB)
Dear Mr.Omar,
can you please check the following 3D geojson file. because I prepared this file and displaying in cesium but in certain zoom level the data is disappearing
can you please this file
Thank you once again
Mohammed Kabeer
ryd_parcel_3d_qgis.rar (363 KB)
Dear Sir,
the same file I uploaded into ion server and displaying in cesium viewer there is no any problem
it is displaying in all zoom levels
this is 3D data what I prepared
here is my code to display through cesium APIs
var dataSource2 = this.state.Viewer.dataSources.add(this.state.Cesium.GeoJsonDataSource.load(‘data/ryd_parcel_3d_qgis.geojson’, {
// var dataSource2 = this.state.Viewer.dataSources.add(this.state.Cesium.GeoJsonDataSource.load(‘data/adu_governorate_qgis_simplify.geojson’, {
stroke: this.state.Cesium.Color.RED,
fill: this.state.Cesium.Color.RED.withAlpha(0.5),
strokeWidth: 10,
clampToGround: true
}));
dataSource2.then(function(data) {
// Change the arcType to GEODESIC, which is what it was in CesiumJS 1.53.
for (var i = 0; i < data.entities.values.length; i++) {
var entity = data.entities.values[i];
if (this.state.Cesium.defined(entity.polygon)) {
entity.polygon.arcType = this.state.Cesium.ArcType.GEODESIC;
}
}
this.state.Viewer.dataSources.add(dataSource2);
});
Thank you
Mohammed Kabeer
omar
April 2, 2020, 12:45am
17
You can click on “open complete code example” under the Cesium ion asset preview window to see the full code. If that example works you can compare that with your code. Cesium ion doesn’t change anything about the uploaded GeoJSON to my knowledge.