[Geoserver-users] mapimage that contains point symbols with anchor-pont semms to be rendered wrong when using request option : "format_options=dpi:96"

Hi

We have the following setup:

Geoserver 2.10.0

Java : jdk1.8.0_72

PostGreSQL/postGIS : 9.5

Server : Windows 2012 R2

We are having a layer using truetype font for symbol. to get the right placement an anchor point is made, and it works fine when the map is shown using OpenLayers 3.

When we try to create a map image for use in a pdf, we add the format option to the requesst for geoserver : “format_options=dpi:96”

When the format option is added to the request the rendering of the symbols does not seem to take care of the anchorpoints.

Does anyone have an idea of what we are doing wrong?

I have attached the style content and below is shown an example on the request:

http://localhost:8100/Videnfor/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=True&LAYERS=Forsyning%3AFJV_Praeroer%2CForsyning%3AFJV_Afgrening%2CForsyning%3AFJV_PraeroerLinie_Stik%2CForsyning%3Afjvpunkter_afgrening&SRS=EPSG:25832&WIDTH=719&HEIGHT=875&STYLES=&BBOX=477067,6215831,477115,6215889&format_options=dpi:96&

Best regards

Margit Kjær Bomholt
Udvikler

logo

info

Afgrening.sld (1.68 KB)

A quick look would make it seem that RescaleStyleVisitor doesn’t handle AnchorPoints in visit(TextSymbolizer) - I expect it needs something like

AnchorPoint ap = pointPlacement.getAnchorPoint();
if(ap != null) {
ap.setAnchorPointX(rescale(ap.getAnchorPointX()));
ap.setAnchorPointY(rescale(ap.getAnchorPointY()));
}

Feel free to raise an enhancement request

Ian

image003.png

image004.png

···

On 29 January 2018 at 12:50, Margit Bomholt <mkb@anonymised.com> wrote:

Hi

We have the following setup:

Geoserver 2.10.0

Java : jdk1.8.0_72

PostGreSQL/postGIS : 9.5

Server : Windows 2012 R2

We are having a layer using truetype font for symbol. to get the right placement an anchor point is made, and it works fine when the map is shown using OpenLayers 3.

When we try to create a map image for use in a pdf, we add the format option to the requesst for geoserver : “format_options=dpi:96”

When the format option is added to the request the rendering of the symbols does not seem to take care of the anchorpoints.

Does anyone have an idea of what we are doing wrong?

I have attached the style content and below is shown an example on the request:

http://localhost:8100/Videnfor/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=True&LAYERS=Forsyning%3aFJV_Praeroer%2cForsyning%3aFJV_Afgrening%2cForsyning%3aFJV_PraeroerLinie_Stik%2cForsyning%3afjvpunkter_afgrening&SRS=EPSG:25832&WIDTH=719&HEIGHT=875&STYLES=&BBOX=477067,6215831,477115,6215889&format_options=dpi:96&

Best regards

Margit Kjær Bomholt
Udvikler

logo

info


Check out the vibrant tech community on one of the world’s most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@anonymised.com.382…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Ian Turton