Drawing property boundaries from parcel data

I have the lat/lon values that describe the boundaries of various properties. Any pointers on how I can place them on a map and draw the boundaries? Mostly I’m interested in making sure I’m drawing from the right place, but if anyone has any tips on rendering 3D lines in Unity I won’t complain… :slight_smile:

ok - I’m halfway there. I figured out how to draw the points in Unity space with LineRenderer, and I know the CesiumGeoReference has conversion functions, but now I don’t know where the docs are for the CesiumForUnity objects…

Hi @CloudApartments, welcome to the community!

To check my understanding – it sounds like you want to convert Unity positions to lat/lon coordinates (or vice versa)? First, you can use the following functions to convert between Unity and Earth-Centered, Earth-Fixed (ECEF) coordinates:

Then, you can use these functions to convert between ECEF and lat / lon coordinates:

Our docs are in the form of comments above the Cesium for Unity classes / methods. We’re aware that this isn’t the easiest to find, so if you have any feedback for us, feel free to chime in on this Github issue.

Let us know if that resolves your issue, or if you have any followup questions!

Hi!

Thanks for the reply. I was actually looking for the reverse - converting lat/lon to Unity space. But I figured it out:

        double3 earthPosition = new double3(lat, lon, height);
        double3 ecefPosition = CesiumWgs84Ellipsoid.LongitudeLatitudeHeightToEarthCenteredEarthFixed(earthPosition);
        double3 unityPosition = georeference.TransformEarthCenteredEarthFixedPositionToUnity(ecefPosition);

It was a little weird since the Ellipsoid is static, but the geoReference is not. But it works. :slight_smile: