Skip to content

to-geojson fail on a simple polygon #74

@0xbase12

Description

@0xbase12
(require '[geo.io :as gio])
=> nil

; read-wkt is ok 
(gio/read-wkt "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))")
=> #object[org.locationtech.jts.geom.Polygon 0x223e81a9 "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))"]

; issue and exception thrown
(gio/to-geojson (gio/read-wkt "POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))"))
Execution error (NoSuchMethodError) at org.wololo.jts2geojson.GeoJSONWriter/convert (GeoJSONWriter.java:79).
'org.locationtech.jts.geom.LineString org.locationtech.jts.geom.Polygon.getExteriorRing()'

Simple fix is perhaps by updating libraries:
locationtech/spatial4j#192

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions