locationtech / proj4j

Java port of the Proj.4 library for coordinate reprojection
Other
184 stars 73 forks source link

Making CRS instances case classes #48

Closed metasim closed 5 years ago

metasim commented 5 years ago

Make for a bit more natural serialization, easier debugging, etc.

Originally posted by @metasim in https://github.com/locationtech/geotrellis/pull/3039

metasim commented 5 years ago

Strawdog architecture (I only put about 5 min of thought into this, so can likely be improved):

image

When fromWKT or fromProj4String or getEpsgCode you'd get an instance of one of the intermediate classes. Common singletons are implemented as case objects.

pomadchin commented 5 years ago

Hey @metasim is not it a GeoTrellis issue? Since it looks like you are talking here about GeoTrellis wrapper types.

metasim commented 5 years ago

🤦‍♂