GeoLatte / geolatte-geom

A geometry model that conforms to the OGC Simple Features for SQL specification.
Other
134 stars 63 forks source link

Unable to define additional CoordinateReferenceSystems in the CrsRegistry #39

Closed sayresVT closed 8 years ago

sayresVT commented 8 years ago

Currently there doesn't seem to be any extension point for defining additional CoordinateReferenceSystems to be used by the CrsRegistry. As a workaround, you currently need to:

It would be nice to have the ability to more easily specify additional coordinate reference systems to be used by the CrsRegistry.

obozek commented 8 years ago

To me it seems easier to use reflections to add custom CRS.

matthias24 commented 8 years ago

This is exactly my problem. The simplest solution would be to set the method addDefinition at line 84 in the class CrsRegistry from private to public. Reflection is a nice workarround for this. But the best solution in my opinion would be, to add a method to the class CrsRegistry, to add a factory, which can supply the registry with CRS-Systems. This factory could maybe load a CRS-System lazy, when it is ordered via the EPSG-Code.

maesenka commented 8 years ago

I provided a public method registerCoordinateReferenceSystem() to solve this issue.

I also updated the embedded spatial ref. systems definition file.