Skip to content

Adding a Cesium.GeoJsonDataSource.readFeature method #5148

Open
@spatialillusions

Description

@spatialillusions

In some cases I would like to process GeoJSON feature by feature and create Cesium entities from them, similar to how readFeature works in Open Layers.
http://openlayers.org/en/latest/apidoc/ol.format.GeoJSON.html#readFeature

Today this is not possible, what you can do is to load GeoJSON data and receive a promise, but that will be hard to handle when you want to loop through all your features and handle them one by one. (What I want to do is to process each feature to an entity and apply a visualization based on a lot of the feature attirbutes.)

If I read the code it would be possible to do this is parts of the load function in the load method for GeoJsonDataSource was broken out as a pure feature parser and added as a method to GeoJsonDataSource. The readFeature method would return a entity or an array of entities based on what kind of feature that was parsed.
https://github.com/AnalyticalGraphicsInc/cesium/blob/1.31/Source/DataSources/GeoJsonDataSource.js#L857

If this was done I would not have to write my own feature parser for creating entities.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions