Repository navigation
Define print for GeoFormat types - #55
Merged
Merged
Conversation
string and print now return the wrapped value ("EPSG:4326" for EPSG)
instead of the constructor form. repr is unchanged.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Member
|
ProjJSON should be jsonified somehow? But otherwise makes sense. |
asinghvi17
approved these changes
Sep 17, 2026
Member
Author
Yeah that would require a JSON ext? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
stringandprinton GeoFormat types fell back to the two-argumentshow, giving the constructor form, e.g.string(EPSG(4326)) == "EPSG{1}((4326,))". This leaked into files written by GeoArrow.jl (JuliaGeo/GeoArrow.jl#10).printon anyGeoFormatprintsval(x), so WKT, PROJ strings, GML, KML etc. give their contents.printonEPSGprintsconvert(String, x):string(EPSG(4326, 3855)) == "EPSG:4326+3855", whichEPSG(::String)parses back.printon aWellKnownBinaryholdingAbstractVector{UInt8}prints hex (bytes2hex), readable withhex2bytes. Other value types fall back toval.reprand thetext/plaindisplay are unchanged.Round trips are tested with real WKT, WKT2 and WKB. The mode (
Geom/CRS) is not part of the string, so it has to be passed again when reconstructing.ProjJSON/GeoJSONholding aDictprint theDict, as there is no JSON dependency.This changes string interpolation of these types, e.g. in error messages (
"CRS $crs").🤖 Generated with Claude Code