# Create 3d surface from geojson

**URL:** <https://community.plotly.com/t/create-3d-surface-from-geojson/59341>\
**Category:** plotly.js\
**Created:** [December 16, 2021, 9:06pm UTC](https://community.plotly.com/t/create-3d-surface-from-geojson/59341 "2021-12-16T21:06:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pacsiah](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@pacsiah](https://community.plotly.com/u/pacsiah)\
**Post date:** [December 16, 2021, 9:06pm UTC](https://community.plotly.com/t/create-3d-surface-from-geojson/59341/1 "2021-12-16T21:06:48Z")

</div>

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  
}  
},

 ![3dsf](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/0/a/0a5ade75e774c69b1db5f572d7107cd63d758568.jpeg)

---

<div class="post-metadata">

**Author:** ![pacsiah](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@pacsiah](https://community.plotly.com/u/pacsiah)\
**Post date:** [December 16, 2021, 9:20pm UTC](https://community.plotly.com/t/create-3d-surface-from-geojson/59341/2 "2021-12-16T21:20:00Z")

</div>

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);
```

---

<div class="post-metadata">

**Author:** ![Harold748](https://avatars.discourse-cdn.com/v4/letter/h/65b543/32.png) [@Harold748](https://community.plotly.com/u/Harold748)\
**Post date:** [December 31, 2021, 4:31am UTC](https://community.plotly.com/t/create-3d-surface-from-geojson/59341/3 "2021-12-31T04:31:46Z")

</div>

Thanks for sharing this info this is useful keep it up. found lots of info in this post[.](https://www.rapidfs.biz/)

---

<div class="post-metadata">

**Author:** ![pacsiah](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@pacsiah](https://community.plotly.com/u/pacsiah)\
**Post date:** [January 3, 2022, 9:45pm UTC](https://community.plotly.com/t/create-3d-surface-from-geojson/59341/4 "2022-01-03T21:45:07Z")

</div>

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
