private Point parsePoint ( JsonParser jp ) throws IOException , SQLException { jp . nextToken ( ) ; // FIELD_NAME coordinates String coordinatesField = jp . getText ( ) ; if ( coordinatesField . equalsIgnoreCase ( GeoJsonField . COORDINATES ) ) { jp . nextToken ( ) ; // START_ARRAY [ to parse the coordinate Point point = GF . createPoint ( parseCoordinate ( jp ) ) ; jp . nextToken ( ) ; return point ; } else { throw new SQLException ( "Malformed GeoJSON file. Expected 'coordinates', found '" + coordinatesField + "'" ) ; } }
Parses one position