Skip to content

Change CoordinateArraySequence to check consistency of array Coordinates rather than fixing#374

Closed
dr-jts wants to merge 2 commits into
locationtech:masterfrom
dr-jts:fix-coordarrayseq-check
Closed

Change CoordinateArraySequence to check consistency of array Coordinates rather than fixing#374
dr-jts wants to merge 2 commits into
locationtech:masterfrom
dr-jts:fix-coordarrayseq-check

Conversation

@dr-jts

@dr-jts dr-jts commented Feb 15, 2019

Copy link
Copy Markdown
Contributor

Signed-off-by: Martin Davis mtnclimb@gmail.com

Signed-off-by: Martin Davis <mtnclimb@gmail.com>

@jodygarnett jodygarnett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor feedback, while waiting for tests to run.

Signed-off-by: Martin Davis <mtnclimb@gmail.com>
@jodygarnett

jodygarnett commented Feb 15, 2019

Copy link
Copy Markdown
Contributor

testing:

  • jts 1.16-SNAPSHOT
  • geotools master changing jts.version to 1.16-SNAPSHOT

Initially have an odd failure (actually the build hangs) in gt-coverage:

Exception in thread "SunTileScheduler0Standard1" java.lang.NoSuchMethodError: org.locationtech.jts.geom.Polygon.getExteriorRing()Lorg/locationtech/jts/geom/LineString;
	at it.geosolutions.jaiext.utilities.shape.PolygonIterator.<init>(PolygonIterator.java:61)
	at it.geosolutions.jaiext.utilities.shape.GeomCollectionIterator.getIterator(GeomCollectionIterator.java:92)
	at it.geosolutions.jaiext.utilities.shape.GeomCollectionIterator.init(GeomCollectionIterator.java:65)
	at it.geosolutions.jaiext.utilities.shape.GeomCollectionIterator.<init>(GeomCollectionIterator.java:75)
	at it.geosolutions.jaiext.utilities.shape.LiteShape.getPathIterator(LiteShape.java:245)

Looking at this line I do not see anything amiss:

    public PolygonIterator(Polygon p, AffineTransform at) {
        int numInteriorRings = p.getNumInteriorRing();
        rings = new LineString[numInteriorRings + 1];
        rings[0] = p.getExteriorRing();

@dr-jts indicates the above may be due to #290

@jodygarnett

jodygarnett commented Feb 17, 2019

Copy link
Copy Markdown
Contributor

Backing out the #290 change I can see failures in downstream projects:

org.geotools.data.DataSourceException: Unable to create this mosaic
    at org.geotools.gce.imagemosaic.ImageMosaicFootprintsTest.testMultipleSidecars(ImageMosaicFootprintsTest.java:276)
    at org.geotools.gce.imagemosaic.ImageMosaicFootprintsTest.testWkbMultipleSidecars(ImageMosaicFootprintsTest.java:220)
Caused by: java.lang.IllegalStateException: Coordinates in array have different types
    at org.geotools.gce.imagemosaic.ImageMosaicFootprintsTest.testMultipleSidecars(ImageMosaicFootprintsTest.java:276)
    at org.geotools.gce.imagemosaic.ImageMosaicFootprintsTest.testWkbMulti

Think a sensible approach would be to:

a) move the method checkCoordainteArray to CoordianteArrays utility class (for reuse)
b) provide a CoordianteArray fix the problem (so client code has an easy fix)

@dr-jts

dr-jts commented Feb 25, 2019

Copy link
Copy Markdown
Contributor Author

This is taken care of by #376

@dr-jts dr-jts closed this Feb 25, 2019
@dr-jts dr-jts deleted the fix-coordarrayseq-check branch February 25, 2019 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants