geoscript / geoscript-groovy

A Groovy implementation of GeoScript.
https://geoscript.net/groovy
MIT License
46 stars 22 forks source link

Viewer.plot issues #53

Open moovida opened 5 years ago

moovida commented 5 years ago

Given the following testcode:

import geoscript.geom.*
import geoscript.viewer.*

def multiLineCoordinates = [
    [[10,10],[20,20],[10,40]],
    [[40,40],[30,30],[40,20],[30,10]]
]
def geom = new MultiLineString(multiLineCoordinates)

Viewer.plot([size: [800,800]],[geom])

I get the following:

image

You can see the points being shifted against the lines they are part of.

The same result can be obtained by avoiding to set the size:

Viewer.plot([geom])

and then enlarging the plot window.

jericks commented 5 years ago

Confirmed. After looking at the code, this is probably an issue with org.geotools.renderer.chart.GeometryRenderer or org.geotools.renderer.chart.GeometryDataset.