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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Margit Bomholt

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:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Afgrening.sld (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Ian Turton
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

On 29 January 2018 at 12:50, Margit Bomholt <[hidden email]> 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:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users




--
Ian Turton

------------------------------------------------------------------------------
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:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users