private void writeCRS ( JsonGenerator jsonGenerator , String [ ] authorityAndSRID ) throws IOException { if ( authorityAndSRID [ 1 ] != null ) { jsonGenerator . writeObjectFieldStart ( "crs" ) ; jsonGenerator . writeStringField ( "type" , "name" ) ; jsonGenerator . writeObjectFieldStart ( "properties" ) ; StringBuilder sb = new StringBuilder ( "urn:ogc:def:crs:" ) ; sb . append ( authorityAndSRID [ 0 ] ) . append ( "::" ) . append ( authorityAndSRID [ 1 ] ) ; jsonGenerator . writeStringField ( "name" , sb . toString ( ) ) ; jsonGenerator . writeEndObject ( ) ; jsonGenerator . writeEndObject ( ) ; } }
Write the CRS in the geojson