Anyone know how to get latitude and longitude, from the GridMaterialProperty lines

164 views
Skip to first unread message

eru....@gmail.com

unread,
Aug 6, 2019, 12:47:33 PM8/6/19
to cesium-dev
Basically I want to get the longitude and latitude of the lines that are generated, maybe I don't explain myself well but I want to get the data of the following lines that are generated inside a polygon:
Captura de pantalla 2019-08-06 a la(s) 11.45.13.png

Omar Shehata

unread,
Aug 8, 2019, 1:15:23 PM8/8/19
to cesium-dev
I'm not sure if there's a straightforward way do this programmatically, since these grid lines are computed based on a distance in world space, and aren't necessarily at specific lon/lat intervals. You can see how this grid is computed in the shader here:


So perhaps a solution, depending on what you're trying to do, would be to use the pick function, to click out a few spots on the grid, figure out the spacing in cartesian space, and programmatically create the rest. Does that work for you?

Erubey Martinez

unread,
Aug 8, 2019, 1:25:27 PM8/8/19
to cesiu...@googlegroups.com

I think it does not explain me well, but here my question is better explained


--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/SbXp8dk1c4Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cesium-dev/19553ff3-6f27-4837-aa39-ca16ee5638c6%40googlegroups.com.

Omar Shehata

unread,
Aug 12, 2019, 12:54:48 PM8/12/19
to cesium-dev
My answer there would be the same, there isn't an easy way to do this right now in CesiumJS, but you might be able to capture the gap manually and then compute the positions based on that.


On Thursday, August 8, 2019 at 1:25:27 PM UTC-4, Erubey Martinez wrote:

I think it does not explain me well, but here my question is better explained


El jue., 8 ago. 2019 a las 12:15, Omar Shehata (<omar.same...@gmail.com>) escribió:
I'm not sure if there's a straightforward way do this programmatically, since these grid lines are computed based on a distance in world space, and aren't necessarily at specific lon/lat intervals. You can see how this grid is computed in the shader here:


So perhaps a solution, depending on what you're trying to do, would be to use the pick function, to click out a few spots on the grid, figure out the spacing in cartesian space, and programmatically create the rest. Does that work for you?

On Tuesday, August 6, 2019 at 12:47:33 PM UTC-4, eru....@gmail.com wrote:
Basically I want to get the longitude and latitude of the lines that are generated, maybe I don't explain myself well but I want to get the data of the following lines that are generated inside a polygon:

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/SbXp8dk1c4Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages