Kristin Cowalcijk created SEDONA-626:
----------------------------------------
Summary: SRID of geometries returned by many ST functions are
incorrect
Key: SEDONA-626
URL: https://issues.apache.org/jira/browse/SEDONA-626
Project: Apache Sedona
Issue Type: Bug
Affects Versions: 1.6.0
Reporter: Kristin Cowalcijk
Fix For: 1.6.1
Some ST functions that transform geometry to geometry do not preserve the SRID
of the input geometry. For instance:
{code:sql}
SELECT ST_SRID(ST_Collect(ST_GeomFromText('POINT (10 20)', 1000)))
+---------------------------------------------------------+
|st_srid(st_collect(st_geomfromtext(POINT (10 20), 1000)))|
+---------------------------------------------------------+
| 0|
+---------------------------------------------------------+
{code}
While some other functions do preserve the SRID of the input geometry:
{code:sql}
SELECT ST_SRID(ST_Buffer(ST_GeomFromText('POINT (10 20)', 1000), 1))
+-----------------------------------------------------------+
|st_srid(st_buffer(st_geomfromtext(POINT (10 20), 1000), 1))|
+-----------------------------------------------------------+
| 1000|
+-----------------------------------------------------------+
{code}
Additionally, {{ST_Transform}} should alter the SRID of the output geometry,
but it preserves the SRID of the input geometry:
{code:sql}
sedona.sql("SELECT ST_SRID(ST_Transform(ST_GeomFromText('POINT (10 20)', 3857),
'EPSG:4326'))").show()
+----------------------------------------------------------------------+
|st_srid(st_transform(st_geomfromtext(POINT (10 20), 3857), EPSG:4326))|
+----------------------------------------------------------------------+
| 3857|
+----------------------------------------------------------------------+
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)