Announcing Dash Bio 1.0.0 🎉 : a one-stop-shop for bioinformatics and drug development visualizations.

Create 3d surface from geojson

Hello all! I live mostly in the GIS world, and would love to read a geojson file(x,y,z) into a 3d ‘type: surface’.

I have been able to do this with a mix of ESRI geoprocessing services and some python pieces taken from an existing project, But, it seems to me, that plotly JS could read a standard geojson file directly and create the correctly formatted Array(x, y, z or lat, long, elevation), then render the surface? then I should be able to Import ANY geojson file into Plotly 3d/Surface?

here is a piece of my simple geojson…and a screenshot of a working viewer using a larger json file…

{
“type” : “FeatureCollection”,
“crs” : {
“type” : “name”,
“properties” : {
“name” : “ESRI:102039”
}
},
“features” : [
{
“type” : “Feature”,
“id” : 0,
“geometry” : {
“type” : “Point”,
“coordinates” : [
-668630.59791888855,
1920274.5068389177
]
},
“properties” : {
“FID” : 0,
“x” : -668630.59791899996,
“y” : 1920274.5068399999,
“z” : 25
}
},
{
“type” : “Feature”,
“id” : 1,
“geometry” : {
“type” : “Point”,
“coordinates” : [
-689835.53765746206,
1846210.0462958068
]
},
“properties” : {
“FID” : 1,
“x” : -689835.53765700001,
“y” : 1846210.0463,
“z” : 200
}
},

also, I also found these simple tools for reading json files, and ‘creating array from object’. and the Console is definitely showing the values I need. should there be a way to read that information and place them in a correctly formatted array for “type: surface”?

    d3.json("../plotly_pnts_geo_form.json", function (json) {
console.log("json", json);

    var array = Object.values(json);  //keys,values,entries
console.log("array", array);

Thanks for sharing this info this is useful keep it up. found lots of info in this post.

that’s great. Can you share some of what you’ve been working on? my post was a query about x,y,z(latitude, longitude, elevation) and using GIS data(in geojson format) to create any surface in plotly. any similar experiences?
cheers