Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

altitude option in featureToPolygon #Feature2Mesh #997

Open
Oncledjoe opened this issue Jan 17, 2019 · 3 comments
Open

altitude option in featureToPolygon #Feature2Mesh #997

Oncledjoe opened this issue Jan 17, 2019 · 3 comments

Comments

@Oncledjoe
Copy link

Hello,
This issue is about the projection of a polygon, which came from a wfs stream, with no Z, on the elevation layer. As we can see in example/globe_wfs_extruded.html it works for LineString( function altitudeLine(properties, contour)).
The idea is to implement a similar function for polygon. But in Feature2Mesh if we follow the same process than linestring it doesn't work.
It is the fault of getProperty called in featureToPolygon, it always returns 0 (it is because it tries to execute the function: property(...args) equivalent to options.altitude(geometry.properties) when i need options.altitude(feature.vertices)).
Furthermore getProperty is not used in featureToLine for the same operation, hence its success.
In resume: Can you fix featureToPolygon to make it look like at featureToLine with sames functionality.
I hope to be clear. Thanks a lot.
Best Regards,
Oncledjoe

@gchoqueux
Copy link
Contributor

It's a regularly requested feature. It would be great to clamp object to terrain with feature2Mesh.

@Oncledjoe
Copy link
Author

I agree, I develop a scientist web platform for cnrs and most of spatial data are polygon 2D. Without this feature, Itwons becomes less interesting. A quick modification of featureToPolygon give that:
polygononelevationlayer
It wills not work for very sharply terrain I thinks, but it's a beginning.

@gchoqueux
Copy link
Contributor

if you won't project 2D polygons from WFS on the terrain you could use ColorLayer, see this example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants