@ PostConstruct protected void postConstruct ( ) throws GeomajasException { if ( null != crsDefinitions ) { for ( CrsInfo crsInfo : crsDefinitions . values ( ) ) { try { CoordinateReferenceSystem crs = CRS . parseWKT ( crsInfo . getCrsWkt ( ) ) ; String code = crsInfo . getKey ( ) ; crsCache . put ( code , CrsFactory . getCrs ( code , crs ) ) ; } catch ( FactoryException e ) { throw new GeomajasException ( e , ExceptionCode . CRS_DECODE_FAILURE_FOR_MAP , crsInfo . getKey ( ) ) ; } } } if ( null != crsTransformDefinitions ) { for ( CrsTransformInfo crsTransformInfo : crsTransformDefinitions . values ( ) ) { String key = getTransformKey ( crsTransformInfo ) ; transformCache . put ( key , getCrsTransform ( key , crsTransformInfo ) ) ; } } GeometryFactory factory = new GeometryFactory ( ) ; EMPTY_GEOMETRIES . put ( Point . class , factory . createPoint ( ( Coordinate ) null ) ) ; EMPTY_GEOMETRIES . put ( LineString . class , factory . createLineString ( ( Coordinate [ ] ) null ) ) ; EMPTY_GEOMETRIES . put ( Polygon . class , factory . createPolygon ( null , null ) ) ; EMPTY_GEOMETRIES . put ( MultiPoint . class , factory . createMultiPoint ( ( Coordinate [ ] ) null ) ) ; EMPTY_GEOMETRIES . put ( MultiLineString . class , factory . createMultiLineString ( ( LineString [ ] ) null ) ) ; // cast needed! EMPTY_GEOMETRIES . put ( MultiPolygon . class , factory . createMultiPolygon ( ( Polygon [ ] ) null ) ) ; // cast needed! EMPTY_GEOMETRIES . put ( Geometry . class , factory . createGeometryCollection ( null ) ) ; }
Finish service initialization .