Skip to content

Allow SRID args in ST_Transform#60

Closed
jesspav wants to merge 2 commits intoapache:mainfrom
jesspav:transform_srid
Closed

Allow SRID args in ST_Transform#60
jesspav wants to merge 2 commits intoapache:mainfrom
jesspav:transform_srid

Conversation

@jesspav
Copy link
Collaborator

@jesspav jesspav commented Sep 11, 2025

Currently, ST_Transform is only accepting utf8 args.
This change allows for SRIDs to be passed in as ints. It also adds some better argument checks.

Testing

Unit tests and manual tests.

Examples

> SELECT ST_Transform(ST_SetSrid(ST_GeomFromText('POINT (1 1)'), 4326), 3857) as geom;
┌─────────────────────────────────────────────┐
│                     geom                    │
│                   geometry                  │
╞═════════════════════════════════════════════╡
│ POINT(111319.49079327357 111325.1428663851) │
└─────────────────────────────────────────────┘

> SELECT ST_Transform(ST_SetSrid(ST_GeomFromText('POINT (1 1)'), 4326), 'EPSG:3857') as geom;
┌─────────────────────────────────────────────┐
│                     geom                    │
│                   geometry                  │
╞═════════════════════════════════════════════╡
│ POINT(111319.49079327357 111325.1428663851) │
└─────────────────────────────────────────────┘

@jesspav jesspav closed this Sep 11, 2025
@jesspav jesspav deleted the transform_srid branch November 14, 2025 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant