gtt-project / redmine_gtt_print

Plugin to add printing (with maps) to GTT
GNU General Public License v3.0
1 stars 2 forks source link

print does not include POI icon #8

Closed iosefa closed 3 years ago

iosefa commented 3 years ago

Problem The POI icon (marker) of an issue is not included in the printed map.

To Reproduce Print an issue.

Expectation The map should include the POI icon (marker)

Screenshots The issue has a marker:

Screen Shot 2021-03-11 at 16 52 13

However, the printed issue does not:

Screen Shot 2021-03-11 at 16 52 36

Platform/smartphone:

sanak commented 3 years ago

@iosefa Okay, I will fix that. Thanks for your report.

sanak commented 3 years ago

@iosefa, @dkastl
Well, this issue's cause seems to be in redmine_gtt side, because:

  1. Docker mapfish-print container log reports the following null pointer error.
    mapfish-print_1  | 17-Mar-2021 13:11:32.094 SEVERE [ForkJoinPool-1-worker-145] org.geotools.renderer.lite.StreamingRenderer.fireErrorEvent null
    mapfish-print_1  |  java.lang.NullPointerException
    mapfish-print_1  |      at org.geotools.renderer.lite.StreamingRenderer.getDeclaredSRS(StreamingRenderer.java:2498)
    mapfish-print_1  |      at org.geotools.renderer.lite.StreamingRenderer.reprojectSpatialFilters(StreamingRenderer.java:2487)
    mapfish-print_1  |      at org.geotools.renderer.lite.StreamingRenderer.createLiteFeatureTypeStyles(StreamingRenderer.java:2041)
    mapfish-print_1  |      at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:2214)
    mapfish-print_1  |      at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:900)
    mapfish-print_1  |      at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:623)
    mapfish-print_1  |      at org.mapfish.print.map.geotools.AbstractGeotoolsLayer.render(AbstractGeotoolsLayer.java:128)
    mapfish-print_1  |      at org.mapfish.print.processor.map.CreateMapProcessor.createLayerGraphics(CreateMapProcessor.java:448)
    mapfish-print_1  |      at org.mapfish.print.processor.map.CreateMapProcessor.execute(CreateMapProcessor.java:239)
    mapfish-print_1  |      at org.mapfish.print.processor.map.CreateMapProcessor.execute(CreateMapProcessor.java:100)
    mapfish-print_1  |      at org.mapfish.print.processor.ProcessorGraphNode$ProcessorNodeForkJoinTask.lambda$compute$0(ProcessorGraphNode.java:203)
    mapfish-print_1  |      at org.mapfish.print.processor.AbstractProcessor$Context.mdcContext(AbstractProcessor.java:240)
    mapfish-print_1  |      at org.mapfish.print.processor.ProcessorGraphNode$ProcessorNodeForkJoinTask.compute(ProcessorGraphNode.java:188)
    mapfish-print_1  |      at org.mapfish.print.processor.ProcessorDependencyGraph.tryExecuteNodes(ProcessorDependencyGraph.java:58)
    mapfish-print_1  |      at org.mapfish.print.processor.ProcessorGraphNode$ProcessorNodeForkJoinTask.lambda$compute$0(ProcessorGraphNode.java:225)
    mapfish-print_1  |      at org.mapfish.print.processor.AbstractProcessor$Context.mdcContext(AbstractProcessor.java:240)
    mapfish-print_1  |      at org.mapfish.print.processor.ProcessorGraphNode$ProcessorNodeForkJoinTask.compute(ProcessorGraphNode.java:188)
    mapfish-print_1  |      at org.mapfish.print.processor.ProcessorGraphNode$ProcessorNodeForkJoinTask.compute(ProcessorGraphNode.java:176)
    mapfish-print_1  |      at java.base/java.util.concurrent.RecursiveTask.exec(RecursiveTask.java:94)
    mapfish-print_1  |      at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    mapfish-print_1  |      at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    mapfish-print_1  |      at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    mapfish-print_1  |      at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    mapfish-print_1  |      at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
  2. Posted JSON has the following unnecessary crs property in the geometry.
    "geometry": {
    "type": "Point",
    "crs": {
        "type": "name",
        "properties": {
            "name": "EPSG:3857"
        }
    },
    "coordinates": [
        xxxxxxx,
        xxxxxxx
    ]
    },
  3. PostGIS 3 ST_AsGeoJSON last argument's default value seems to be changed to include crs.

Currently, the function is inside redmine_gtt plugin, so I will fix redmine_gtt side.