bjornharrtell / jts2geojson

JTS from/to GeoJSON converter for Java
MIT License
141 stars 57 forks source link

Typo in readme #36

Closed roryodonnell closed 2 years ago

roryodonnell commented 5 years ago
// create and serialize a FeatureCollection
  List<Features> features = new ArrayList<Features>();
  Map<String, Object> properties = new HashMap<String, Object>();
  features.add(new Feature(geometry, properties);
  GeoJSONWriter writer = new GeoJSONWriter();
  GeoJSON json = writer.write(features);

Feature should be singular

// create and serialize a FeatureCollection
  List<Feature> features = new ArrayList<Feature>();
  Map<String, Object> properties = new HashMap<String, Object>();
  features.add(new Feature(geometry, properties));             <-- extra parenthesis
  GeoJSONWriter writer = new GeoJSONWriter();
  GeoJSON json = writer.write(features);