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

Geolocation #412

Open
Eneroth3 opened this issue Jan 9, 2020 · 1 comment
Open

Geolocation #412

Eneroth3 opened this issue Jan 9, 2020 · 1 comment

Comments

@Eneroth3
Copy link

Eneroth3 commented Jan 9, 2020

Not really sure how to scope this issue.

Right now I am interesting in getting the model geo location height, but there are other things that are useful in the long run.

When you geo-locate a model in SketchUp, the model origin isn't at sea level but intersects the terrain and gives you a reasonable 0 level for the project. However I can't find any official API for reading the model (origin) height over sea level. My use case now is to draw iso curves from a terrain mesh at even multiples above see level, not the project zero level, but this can be useful for determining flooding risks, maybe be useful for Sefaria's energy analysis, be used to position geo-localized point clouds and so much more. I'm quite surprised LatLogn and UTM conversion ignores the Z coordinate.

I've found two values representing the geo location height in "GeoReference" attribute directory, ModelTranslationZ and ZValueCentered. The former appears to be the one used when adding more imagery.

However, reading these values is of course a hack as it isn't documented API, and there is no guarantee whatsoever it will be the same in the future. An official method, e.g. on the Model class, would be useful for this.

When looking at the bigger picture I also think there should be setter methods for the model location (including height). If you for instance import a geo-located point cloud or import a DWG with a known exact location for its origin, I think SketchUp should allow for geo-locating the model to it. For already geo-located models such imports could be automatically positioned in its precise location.

Perhaps it is best to not add a height attribute to the Model class, but add a GeoLocation class that can wrap this as well as future functionality. On the other hand the Model class already has a lot of geo-location related methods that can't be moved for compatibility reasons.

@DanRathbun
Copy link

I've found two values representing the geo location height in "GeoReference" attribute directory, ModelTranslationZ and ZValueCentered. The former appears to be the one used when adding more imagery.

However, reading these values is of course a hack as it isn't documented API, and there is no guarantee whatsoever it will be the same in the future.

AFAIK, this dictionary is compliant with the Google Maps API.
So I'd suggest checking there for documentation.

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