[Mapserver-users] set zoom level to 1:1?
Ed McNierney
ed at topozone.com
Thu Dec 12 09:27:03 PST 2002
Twan -
Since your pixels are reported to be 1.5 units in each dimension, you should simply ask MapServer for a map whose spatial EXTENT (i.e. the mapfile EXTENT statement) is 1.5 times the number of pixels in the requested image size. If you ask for an image that's 400 pixels by 400 pixels, and you ask for geographic extents that are 600 units by 600 units, you'll get exactly one output pixel for each input pixel.
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
ed at topozone.com
(978) 251-4242
-----Original Message-----
From: Twan Kogels [mailto:twan at twansoft.com]
Sent: Thursday, December 12, 2002 10:01 AM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] set zoom level to 1:1?
Hello list,
Here comes a quick question:
When i open my raster layer in paint shop pro or photoshop, the raster
(tiff) file is displayed at zoom level 1. You see the streets and parks the
way it should be.
When i view the raster layer with mapserver the first view is a resized
raster layer, so it does fit into the boundries of the map extent.
How can i calculate the zoom/scale level which is needed to get the same
viewing result in mapserver as viewing the raster layer in paint shop pro?
With other words, how can i zoom into a map so the zoom level is 1:1.
The following informatie may be usefull:
==================
linux:/usr/local/apache/htdocs/haarlem/data/layer1 #
/usr/local/bin/gdalinfo 1008060.TIF
Driver: GTiff/GeoTIFF
Size is 8000, 5333
Coordinate System is `'
Origin = (95999.250000,488000.750000)
Pixel Size = (1.500000,-1.500000)
Metadata:
TIFFTAG_SOFTWARE=Handmade Software, Inc. Image Alchemy v1.7.7
Corner Coordinates:
Upper Left ( 95999.250, 488000.750)
Lower Left ( 95999.250, 480001.250)
Upper Right ( 107999.250, 488000.750)
Lower Right ( 107999.250, 480001.250)
Center ( 101999.250, 484001.000)
Band 1 Block=8000x2 Type=Byte, ColorInterp=Red
Min=0.000/0, Max=255.000/0
Band 2 Block=8000x2 Type=Byte, ColorInterp=Green
Min=0.000/0, Max=255.000/0
Band 3 Block=8000x2 Type=Byte, ColorInterp=Blue
Min=0.000/0, Max=255.000/0
Band 4 Block=8000x2 Type=Byte, ColorInterp=Alpha
Min=0.000/0, Max=255.000/0
=====================
=====================
linux:/usr/src/packages/SOURCES/mapserver-3.6.3 # ./mapserv -v
MapServer version 3.6.3 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=PROJ
SUPPORTS=TTF SUPPORTS=WMS_SERVER INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
=====================
Best regards,
Twan Kogels
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list