[Geoserver-users] DPI not working

I’m running the latest nightly build and I can’t get the format_options=DPI working. No matter what I input, I always get the same image size…
i.e. requests
http://localhost/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=somelayer&bbox=468463,5069913,468563,5070013&width=100&height=100&srs=EPSG:3765&format=image%2Fgif&format_options=dpi:300
and
http://localhost/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=somelayer&bbox=468463,5069913,468563,5070013&width=100&height=100&srs=EPSG:3765&format=image%2Fgif&format_options=dpi:150

return the same images…What am I doing wrong?

Regards!

Hi,

DPI is a hint for the printing software to print the image with a certain resolution.
http://docs.geoserver.org/latest/en/user/services/wms/vendor.html

In your case for doupling the resotution you must first request more pixels by using the same BBOX but &width=200&height=200. Now without using the DPI setting printing softwares would print a bigger image for you and keep the default resolotion. By doubling the DPI setting a DPI aware program will print the image in the original size but with double resolution.

-Jukka Rahkonen-

krwoloq

I'm running the latest nightly build and I can't get the format_options=DPI working. No matter what I input, I always get the same image size...

| i.e. requests
http://localhost/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=somelayer&bbox=468463,5069913,468563,5070013&width=100&height=100&srs=EPSG:3765&format=image%2Fgif&format_options=dpi:300
and
http://localhost/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=somelayer&bbox=468463,5069913,468563,5070013&width=100&height=100&srs=EPSG:3765&format=image%2Fgif&format_options=dpi:150

return the same images...What am I doing wrong?

Regards!

Yeah I totally missinterpreted the meaning. I though if I use a bigger DPI, the image would automatically be resized. But the DPI is actually used, as far as I can see - for styling, labeling, etc…To keep them coherent with the image size. So I have to increase the image size manually through a request. My mistake…

On Fri, Nov 23, 2012 at 7:30 PM, Rahkonen Jukka <Jukka.Rahkonen@anonymised.com> wrote:

Hi,

DPI is a hint for the printing software to print the image with a certain resolution.
http://docs.geoserver.org/latest/en/user/services/wms/vendor.html

In your case for doupling the resotution you must first request more pixels by using the same BBOX but &width=200&height=200. Now without using the DPI setting printing softwares would print a bigger image for you and keep the default resolotion. By doubling the DPI setting a DPI aware program will print the image in the original size but with double resolution.

-Jukka Rahkonen-

krwoloq

I’m running the latest nightly build and I can’t get the format_options=DPI working. No matter what I input, I always get the same image size…
| i.e. requests
http://localhost/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=somelayer&bbox=468463,5069913,468563,5070013&width=100&height=100&srs=EPSG:3765&format=image%2Fgif&format_options=dpi:300
and
http://localhost/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=somelayer&bbox=468463,5069913,468563,5070013&width=100&height=100&srs=EPSG:3765&format=image%2Fgif&format_options=dpi:150

return the same images…What am I doing wrong?

Regards!