Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: Hana SPS07 and spatial data

$
0
0

Hi gentlemen, I hope you don't mind me reviving the old thread (it was quite informative, thank you!)

 

The problem I'm trying to solve here is: how to move X and Y meters (by long and lat, respectively) from a given point? So far I found only the methods related to distance measuring between two geometries, but what about the reverse task?

 

So far I've been able to come with the following:

1. Buffer the given point with X meters.

2. Intersect it with a horisontal line beginning in the given point and ending somewhere far enough (+-180).

3. Get the endpoint of the resulting intersection line.

4. Repeat steps 1-3 for that endpoint using Y meters buffer and vertical line.

 

This kinda works, but it obviously does hell of an unneeded extra work.

 

An alternative might be:

0. Use a local projection that has (0,0) meters point bound to, say, (151, -31) geodegrees.

1. Transform the given point from degrees to meters of that local projection.

2. Calculate the new (+X, +Y) point in meters.

3. Transform the new point back to degrees.

 

In the second option I could actually do a lot more in the "local" projection and then transform the end result into degrees. Yet the spatial reference mentions the existence of ST_Transform method, but doesn't give any details at all.

 

Can anyone comment on these points? Did I miss any other solution?

 

P.S. Here's a third option which I may implement for the lack of anything better:

1. For the given point (x0, y0), find the distance between it and (x0+1, y0) -> gets the linear value of 1 longitude degree in the given locality

2. Do the same for the latitude degree.

3. Use those values as multipliers in local calculations.


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>