private void writeFeature ( JsonGenerator jsonGenerator , ResultSet rs , int geoFieldIndex ) throws IOException , SQLException { // feature header jsonGenerator . writeStartObject ( ) ; jsonGenerator . writeStringField ( "type" , "Feature" ) ; //Write the first geometry writeGeometry ( ( Geometry ) rs . getObject ( geoFieldIndex ) , jsonGenerator ) ; //Write the properties writeProperties ( jsonGenerator , rs ) ; // feature footer jsonGenerator . writeEndObject ( ) ; }
Write a GeoJSON feature .