@Test(expected = MalformedJsonException.class) public void parseIncorrectCoordinatesArray1() throws Exception { double[] coords = (new GeoJSONParser( new ByteArrayInputStream( "[[102.0, 0.0], [103.0, 1.0], [104.0, 0.0 [104.5, 0.5]], [105.0, 1.0]]" .getBytes()), this.fType, null)) .parseCoordinateArray(); }
public double[] parseCoordinateArray() throws JsonSyntaxException, IOException, IllegalStateException { List<Double> coords = new ArrayList<Double>(); this.reader.beginArray(); while (this.reader.hasNext()) { this.parsePointCoordinates(coords); } this.reader.endArray(); return GeoJSONParser.listToArray(coords); }
GeoJSONParser implements SimpleFeatureIterator { public double[] parseCoordinateArray() throws JsonSyntaxException, IOException, IllegalStateException { List<Double> coords = new ArrayList<Double>(); this.reader.beginArray(); while (this.reader.hasNext()) { this.parsePointCoordinates(coords); } this.reader.endArray(); return GeoJSONParser.listToArray(coords); } }
GeoJSONParser implements SimpleFeatureIterator { public double[] parseCoordinateArray() throws JsonSyntaxException, IOException, IllegalStateException { List<Double> coords = new ArrayList<Double>(); this.reader.beginArray(); while (this.reader.hasNext()) { this.parsePointCoordinates(coords); } this.reader.endArray(); return GeoJSONParser.listToArray(coords); } GeoJSONParser(InputStream iStream, SimpleFeatureType featureTypeIn, Logger loggerIn); }
GeoJSONParser implements SimpleFeatureIterator { public double[] parseCoordinateArray() throws JsonSyntaxException, IOException, IllegalStateException { List<Double> coords = new ArrayList<Double>(); this.reader.beginArray(); while (this.reader.hasNext()) { this.parsePointCoordinates(coords); } this.reader.endArray(); return GeoJSONParser.listToArray(coords); } GeoJSONParser(InputStream iStream, SimpleFeatureType featureTypeIn, Logger loggerIn); @Override void close(); @Override boolean hasNext(); @Override SimpleFeature next(); void parseFeatureCollection(); static double[] listToArray(List<Double> coords); double[] parseCoordinateArray(); double[] parsePointCoordinates(); List<double[]> parseMultiPointCoordinates(); double[] parseLineStringCoordinates(); List<double[]> parseMultiLineStringCoordinates(); List<double[]> parsePolygonCoordinates(); List<List<double[]>> parseMultiPolygonCoordinates(); Geometry parseGeometry(); Map<String, Object> parseProperties(); SimpleFeature parseFeature(); IOException parseError(); }
GeoJSONParser implements SimpleFeatureIterator { public double[] parseCoordinateArray() throws JsonSyntaxException, IOException, IllegalStateException { List<Double> coords = new ArrayList<Double>(); this.reader.beginArray(); while (this.reader.hasNext()) { this.parsePointCoordinates(coords); } this.reader.endArray(); return GeoJSONParser.listToArray(coords); } GeoJSONParser(InputStream iStream, SimpleFeatureType featureTypeIn, Logger loggerIn); @Override void close(); @Override boolean hasNext(); @Override SimpleFeature next(); void parseFeatureCollection(); static double[] listToArray(List<Double> coords); double[] parseCoordinateArray(); double[] parsePointCoordinates(); List<double[]> parseMultiPointCoordinates(); double[] parseLineStringCoordinates(); List<double[]> parseMultiLineStringCoordinates(); List<double[]> parsePolygonCoordinates(); List<List<double[]>> parseMultiPolygonCoordinates(); Geometry parseGeometry(); Map<String, Object> parseProperties(); SimpleFeature parseFeature(); IOException parseError(); static final String ENCODING; static final String DATETIME_FORMAT; static final String ERROR; static final String ERROR_CODE; static final String ERROR_MESSAGE; static final String ERROR_DETAILS; static final String GEOJSON_TYPE; static final String GEOJSON_TYPE_VALUE_FC; static final String GEOJSON_PROPERTIES; static final String GEOJSON_TOTALFEATURES; static final String FEATURES; static final String CRS; static final String CRS_TYPE; static final String CRS_TYPE_VALUE; static final String CRS_PROPERTIES; static final String CRS_PROPERTIES_NAME; static final String FEATURE_TYPE; static final String FEATURE_ID; static final String FEATURE_GEOMETRY; static final String FEATURE_GEOMETRY_TYPE; static final String FEATURE_TYPE_VALUE; static final String FEATURE_GEOMETRY_COORDINATES; static final String FEATURE_PROPERTIES; static final String GEOMETRY_POINT; static final String GEOMETRY_MULTIPOINT; static final String GEOMETRY_LINE; static final String GEOMETRY_MULTILINE; static final String GEOMETRY_POLYGON; static final String GEOMETRY_MULTIPOLYGON; }