all geojson data is not diplaying

248 views
Skip to first unread message

mka...@tamimicg.com

unread,
Mar 14, 2020, 6:44:40 AM3/14/20
to cesium-dev

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

image.png


Thank you

Mohammed Kabeer




Omar Shehata

unread,
Mar 16, 2020, 3:43:56 PM3/16/20
to cesium-dev
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.

Mohammad Kabeer

unread,
Mar 17, 2020, 2:50:22 AM3/17/20
to cesiu...@googlegroups.com, Faisal Al-Tamimi, Mohammad Kabeer
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

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/5A2mfG1dq60/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cesium-dev/3539bbbb-418d-4562-9693-7e3d0e1d8dd2%40googlegroups.com.
adu_governorate..geojson
ksa_parcels_3d.geojson

Mohammad Kabeer

unread,
Mar 17, 2020, 9:31:21 AM3/17/20
to cesiu...@googlegroups.com, Faisal Al-Tamimi, Mohammad Kabeer
Dear Mr.Omar

here I uploaded in ion server also, please look at it

image.png

image.png

Thank you
Mohammed Kabeer
On Mon, Mar 16, 2020 at 10:44 PM Omar Shehata <omar.same...@gmail.com> wrote:

Scott Reynolds

unread,
Mar 17, 2020, 9:05:10 PM3/17/20
to cesium-dev
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

Mohammad Kabeer

unread,
Mar 19, 2020, 6:55:31 AM3/19/20
to cesiu...@googlegroups.com, Mohammad Kabeer, Faisal Al-Tamimi
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
image.png

Thank You
Mohammed Kabeer

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/5A2mfG1dq60/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
adu_governorate_qgis.rar

Mohammad Kabeer

unread,
Mar 19, 2020, 6:58:59 AM3/19/20
to cesiu...@googlegroups.com, Mohammad Kabeer, Faisal Al-Tamimi
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

image.png

when I zoom more disappears

image.png

here I am attaching snapshots and exported geojson file please try this file your side

Thank you
Mohammed Kabeer

On Wed, Mar 18, 2020 at 4:05 AM Scott Reynolds <sc...@stk.com> wrote:
--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/5A2mfG1dq60/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
ryd_parcel_3d_qgis.rar

Scott Reynolds

unread,
Mar 19, 2020, 8:43:11 PM3/19/20
to cesium-dev
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 

Mohammad Kabeer

unread,
Mar 22, 2020, 4:53:46 AM3/22/20
to cesiu...@googlegroups.com, Mohammad Kabeer, Faisal Al-Tamimi
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

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/5A2mfG1dq60/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Scott Reynolds

unread,
Mar 22, 2020, 8:33:54 PM3/22/20
to cesium-dev
The ryd_parcel_3d file looks good also.

Scott

Mohammad Kabeer

unread,
Mar 23, 2020, 4:27:32 AM3/23/20
to cesiu...@googlegroups.com, Faisal Al-Tamimi, Mohammad Kabeer
Dear Scott,

I tried the following GEODESIC converting function but still, it is missing tiles

image.png

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


On Mon, Mar 23, 2020 at 3:34 AM Scott Reynolds <sc...@stk.com> wrote:
The ryd_parcel_3d file looks good also.

Scott

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/5A2mfG1dq60/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Omar Shehata

unread,
Mar 23, 2020, 9:28:58 PM3/23/20
to cesium-dev
I think this is the following shadow volume bug: 

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

Mohammad Kabeer

unread,
Mar 24, 2020, 5:50:37 AM3/24/20
to cesiu...@googlegroups.com, Faisal Al-Tamimi, Mohammad Kabeer
Dear Mr.Omar,

I simplified geometry in qgis with tolerance 0.000005 and tried also still the same problem

image.png

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

To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/5A2mfG1dq60/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cesium-dev/7f56125a-0175-42ec-aaed-0087434da6a5%40googlegroups.com.

Mohammad Kabeer

unread,
Mar 24, 2020, 5:58:19 AM3/24/20
to cesiu...@googlegroups.com, Faisal Al-Tamimi, Mohammad Kabeer
wow much more better 

I did simplify with less tolerance like 0.005 now it is better

image.png

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

On Tue, Mar 24, 2020 at 4:29 AM Omar Shehata <omar.same...@gmail.com> wrote:
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/5A2mfG1dq60/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cesium-dev/7f56125a-0175-42ec-aaed-0087434da6a5%40googlegroups.com.
ryd_parcel_3d_qgis.rar

Mohammad Kabeer

unread,
Apr 1, 2020, 10:56:56 AM4/1/20
to cesiu...@googlegroups.com, Faisal Al-Tamimi, Mohammad Kabeer
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 (1).rar

Mohammad Kabeer

unread,
Apr 1, 2020, 11:05:46 AM4/1/20
to cesiu...@googlegroups.com, Faisal Al-Tamimi, Mohammad Kabeer
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

image.png

image.png

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 Shehata

unread,
Apr 1, 2020, 8:45:14 PM4/1/20
to cesium-dev
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.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/5A2mfG1dq60/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

Mohammad Kabeer

unread,
Apr 2, 2020, 5:50:57 AM4/2/20
to cesiu...@googlegroups.com, Faisal Al-Tamimi, Mohammad Kabeer
Dear Sir,

I understand what you say is check the code from the ion server displaying.  but I am not displaying from ion server I am displaying from geojson file directly

so there is totally different code to display geojson file ( i am using API's, not ION server)

here is ION complete code

// Grant CesiumJS access to your ion assets
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhNTExZGQ3MS1kZWE2LTQzNmQtYWExZi0zYjhjZmY2OTIxMWQiLCJpZCI6MTE2MjQsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NTk0NjI4MDd9.xkynncLcguozXT75EwWsWaGmkgZPn-mTxYloLWggb6c';


var viewer = new Cesium.Viewer('cesiumContainer');

var promise = Cesium.IonResource.fromAssetId(87418)
    .then(function (resource) {
        return Cesium.GeoJsonDataSource.load(resource);
    })
    .then(function (dataSource) {
        return viewer.dataSources.add(dataSource);
    })
    .then(function (dataSource) {
        return viewer.zoomTo(dataSource);
    })
    .otherwise(function (error) {
        console.log(error);
    });


here is the API's code
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);
});

finally, the conclusion is we need to check this file from Cesium.GeoJsonDataSource.load function

Thank you
Mohammed Kabee


To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/5A2mfG1dq60/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/5A2mfG1dq60/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cesium-dev/4c631ef3-f1b4-4df3-96bc-3d1534505426%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages