jesspav opened a new pull request, #37:
URL: https://github.com/apache/sedona-db/pull/37

   ## Summary
   Currently, `ST_SetSRID` is out of line with other databases as it expects 
and accepts a string to allow for CRS codes and proj json.  This change splits 
it into `ST_SetSrid` (which complies with standard expectations for that 
function) and the new `ST_SetCRS` which allows our users to provide more 
interesting and complex CRS definitions.
   
   ## Testing
   
   Added unit tests and ran with `cargo run`.  Integration and benchmark tests 
will be provided in another PR.
   
   
   ## Example
   
   Examples correctly identifying setting the CRS:
   
   ```
   > select ST_SRID(ST_SetSrid(ST_GeomFromText('POINT (1 1)'), 4837)) as srid;
   ┌────────┐
   │  srid  │
   │ uint32 │
   ╞════════╡
   │   4837 │
   └────────┘
   
   > select st_srid(ST_SetCrs(ST_GeomFromText('POINT (1 1)'), 'EPSG:4837')) as 
geo;
   ┌────────┐
   │   geo  │
   │ uint32 │
   ╞════════╡
   │   4837 │
   └────────┘
   ```
   
   Examples not accepting the other's arguments:
   ```
   > select ST_SetSrid(ST_GeomFromText('POINT (1 1)'), 'EPSG:4837') as geo;
   This feature is not implemented: st_setsrid([Wkb(Planar, None), 
Arrow(Utf8)]): No kernel matching arguments
   
   > select ST_SetCrs(ST_GeomFromText('POINT (1 1)'), 4837) as geo;
   This feature is not implemented: st_setcrs([Wkb(Planar, None), 
Arrow(Int64)]): No kernel matching arguments
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to