Skip to content

Add optional source CRS argument to getWKT - #9

Draft
yarox-1 wants to merge 6 commits into
ad-freiburg:masterfrom
yarox-1:getWKT
Draft

Add optional source CRS argument to getWKT#9
yarox-1 wants to merge 6 commits into
ad-freiburg:masterfrom
yarox-1:getWKT

Conversation

@yarox-1

@yarox-1 yarox-1 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Optionally a sourceCRS can be specified for getWKT. This will have two effects on the output:

  • The CRS IRI is prefixed to the WKT literal.
  • The geometry is reprojected to the given sourceCRS.

For the current default (CRS84) no IRI will be prefixed and therefore nothing changes.

Examples:
getWKT(POINT(2, 3), util::geo::CRSType::CRS84) -> "POINT(2 3)")
getWKT(POINT(2, 3), util::geo::CRSType::WGS84) -> "<http://www.opengis.net/def/crs/EPSG/0/4326> POINT(3 2)"
getWKT(POINT(2, 3), util::geo::CRSType::WEB_MERCATOR) -> "<http://www.opengis.net/def/crs/EPSG/0/3857> POINT(222638.981587 334111.171402)"

@ullingerc ullingerc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A first look at this

Comment thread geo/Geo.cpp Outdated
Comment thread geo/Geo.h Outdated
Comment thread geo/Geo.cpp Outdated
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.

2 participants