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 Aron,

 

OK I started getting strange SRID=0 results, but perhaps due to long day and user error.

 

Starting from scratch, I can confirm the exact following SQL:

 


Example 1

 

drop table SpatialLocations;

CREATE COLUMN TABLE SpatialLocations(id integer, location ST_POINT(4326));

INSERT INTO SpatialLocations VALUES(1, new ST_POINT('POINT(58.641759 -3.068672)',4326));

INSERT INTO SpatialLocations VALUES(2, new ST_POINT('POINT(50.05935 -5.708054)',4326));

SELECT location.ST_AsEWKT() FROM SpatialLocations;

 

 

Gives:

 

srid5.PNG

 

 

 

 

Example 2

 

Note change to exclude SRID 4326 from INSERT of points:

 

drop table SpatialLocations;

CREATE COLUMN TABLE SpatialLocations(id integer, location ST_POINT(4326));

INSERT INTO SpatialLocations VALUES(1, new ST_POINT(58.641759, -3.068672));

INSERT INTO SpatialLocations VALUES(2, new ST_POINT(50.05935, -5.708054));

SELECT location.ST_AsEWKT() FROM SpatialLocations;

 

 

Gives:

 

srid6.PNG

 

Which indicates that provided the column is created with associated SRID this "sticks".


Viewing all articles
Browse latest Browse all 9165

Trending Articles



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