# latitude/longitude coordinates to svg coordinates

**URL:** <https://talk.observablehq.com/t/latitude-longitude-coordinates-to-svg-coordinates/6398>\
**Category:** Help\
**Created:** [March 25, 2022, 5:03pm UTC](https://talk.observablehq.com/t/latitude-longitude-coordinates-to-svg-coordinates/6398 "2022-03-25T17:03:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![neocarto](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/neocarto/32/6554_2.png) [@neocarto](https://talk.observablehq.com/u/neocarto)\
**Post date:** [March 25, 2022, 5:03pm UTC](https://talk.observablehq.com/t/latitude-longitude-coordinates-to-svg-coordinates/6398/1 "2022-03-25T17:03:51Z")

</div>

Hello all,  
With d3js, it’s easy use d3.geopath(projection) to switch from a geojson file to a path svg. It’s very usefull. But is it possible to simply project the coordinates to have a json file with the same structure but with the projected coordinates ? Or, is it possible to go from a path svg to a json file with the coordinates of the polygons ? What I’m trying to find out is if it is possible to switch from a json file with polygons defined by latitude and longitude coordinates to a json file with the same structure, but with coordinates that match the svg document? Any help is welcome.

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [March 25, 2022, 5:32pm UTC](https://talk.observablehq.com/t/latitude-longitude-coordinates-to-svg-coordinates/6398/2 "2022-03-25T17:32:30Z")

</div>

I think [d3.geoProject](https://github.com/d3/d3-geo-projection/blob/main/README.md#geoProject) is what you’re looking for?

---

<div class="post-metadata">

**Author:** ![neocarto](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/neocarto/32/6554_2.png) [@neocarto](https://talk.observablehq.com/u/neocarto)\
**Post date:** [March 25, 2022, 6:10pm UTC](https://talk.observablehq.com/t/latitude-longitude-coordinates-to-svg-coordinates/6398/3 "2022-03-25T18:10:14Z")

</div>

Thank you Fil, This is exactly what I was looking for.
