Forma Developer Forum
Welcome to Autodesk Forma Developer Forum. Share your knowledge, ask questions, and explore popular Forma API topics.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Geographic extents of the project

Message 1 of 3
136 Views, 2 Replies

Geographic extents of the project

Hi everyone,


I'd like to retrieve the geographic extents, i.e. north/west/south/east coordinates of a project.


All I've found so far is the latitude-longitude values returned by forma.project.getGeoLocation();


Is there a way to get the length in meters on either side of the project and calculate the extents from that?




Tags (1)
Message 2 of 3


Thanks for your inquiry. What you ask for is not available right now, but today we have worked on extending the Forma SDK so that it exposes the bounding box (the axis-aligned corner coordinates) of a project. The implementation is not yet finalized but it should be available soon.

Best regards,

Message 3 of 3
in reply to: vkokkinidis

@vkokkinidis: You can do this by getting the triangulation of the terrain and then doing a min/max calculation. 


This method is exemplified here:


You do not have to go through threejs to achieve this. The `Forma.geometry.getTriangles` method returns a list of [x,y,z, ...] points. So picking every third point starting at index 0, and 1 will give you all x, and y values respectively. 


These are metric (in meters) offsets from the reference point of the project which is the one you are getting through the `Forma.project.getGeoLocation()` as in the WSG84 coordinate system. 

A quick note here is that the local coordinate system in Forma is the local UTM zone. So if you want to express the bbox in lat long, the best method is to pick each corner in the bounding box and then project them from the local system to WSG84. If you pick only the north east + south west corner and then project, then you will have a skew between the two bounding boxes. 

I think we are still missing exposing an API to get the local coordinate system, but I can add it if you need it now 🙂

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th

Autodesk Design & Make Report