Zooming on images

Doug Nebert ddnebert at usgs.gov
Tue Sep 21 07:14:55 PDT 1999


Stephen Lime wrote:
> 
> Um, er... Scale calculations with DD data are broken. That is, since
> x cellsize (no straight DD/in conversion) varies I didn't add the s
> upport to calculate some average scale even though it's just an
> approximation. I got some equations  from the guys at Space Imaging
> and have added scale calculation support for DD units to the new
> version. With that version you'll be able to do exactly what you propose
> with the layer descriptions below.
> 
> ** Note **
> 

It is after all alCartesian coordinate system, and should be treated 
as such.  You don't want special rules for some but not all data!  
In this vein, I expect that zoom or scale would be the same across 
the map.  Remember that all projections are approximations and 
unless you are using a real equal area projection, area will vary 
across a map. I really need to be able to determine the linear 
transform of the window to coordinates so that the java map applet 
can calculate lat-long coordinates from clicks in the frame. This 
should apply to all coord ref systems, shouldn't it?

> The scale problem only effect the minscale/maxscale piece but
> you should be able to zoom in and out. (you'll have to pick an image
> to use). You might try commenting out the minscale/maxscale stuff
> and turning all rasters off except for 1 and see if that helps.
> 
> Got a "get" URL I can play with?

http://130.11.52.178/cgi-bin/mapserv?mode=map&layer=elevation&mapext=-180+-90+180+90&map=/var/mapserver/global/global.map&mapsize=500+250

If I change the mapext, nothing changes.  I need that.  Zoom 
won't cut it for the query interface I need. Should be able to 
enter any window that is preferably 2x wide by 1x tall in degrees.
Just shows the full image.

Also, I am still unable to show a vector coverage on top of 
the image.  Is there a special call for order?  It is layer named 
boundary but it won't display.  I can also not zoom on it whereas 
the country layer (polygon) I can! So the problem seems to be 
with both raster and line data. Puzzled.

check:
http://130.11.52.178/cgi-bin/mapserv?mode=map&layer=country&mapext=-126+47+-122+45&map=/var/mapserver/global/global.map&mapsize=500+250

http://130.11.52.178/cgi-bin/mapserv?mode=map&layer=boundary&mapext=-180+-90+180+90&map=/var/mapserver/global/global.map&mapsize=500+250

http://130.11.52.178/cgi-bin/mapserv?mode=map&layer=boundary&mapext=-126+47+-122+45&map=/var/mapserver/global/global.map&mapsize=500+250



> 
> Steve
> 
> Stephen Lime
> Internet Applications Analyst
> MIS Bureau - MN DNR
> 
> (651) 297-2937
> steve.lime at dnr.state.mn.us
> 
> >>> ddnebert <ddnebert at usgs.gov> 09/20 2:45 PM >>>
> I have now four nice TIF images that I would like to use as backdrop to
> other
> data. The files are as follows with wld files that let them render fine
> individually
> at full extent.  If I try to set another extent in the GET request, I
> still see the
> whole world, rather than a zoomed in region.
> 
> shdrela.tif 640 x 320 TIF
> shdrelb 2160 x 1080 TIF
> shdrelc 4800 x 2400 TIF
> shdreld 10800 x 5400 TIF
> 
> So I have two problems:
> 
> 1. How do I make the registration correct?  I calculated the TFW files
> as attached.
> 
> 2. Once I can view one of the files, I'd like to set them up as a
> cascade
> of a single theme, broken by MINSCALE and MAXSCALE values.
> Should the following work?
> 
> LAYER
>   NAME shdrelief
>   TYPE RASTER
>   STATUS ON
>   DATA shdrela.tif
>   MINSCALE 5000000
>   OFFSITE 0
> END
> 
> LAYER
>   NAME shdrelief
>   TYPE RASTER
>   STATUS ON
>   DATA shdrelb.tif
>   MINSCALE 3000000
>   MAXSCALE 5000000
>   OFFSITE 0
> END
> 
> LAYER
>   NAME shdrelief
>   TYPE RASTER
>   STATUS ON
>   DATA shdrelc.tif
>   MINSCALE 1000000
>   MAXSCALE 3000000
>   OFFSITE 0
> END
> 
> LAYER
>   NAME shdrelief
>   TYPE RASTER
>   STATUS ON
>   DATA shdreld.tif
>   MAXSCALE 1000000
>   OFFSITE 0
> END

-- 
Douglas D. Nebert
Clearinghouse Coordinator 
FGDC Secretariat	Phone: +1 703 648 4151	Fax: +1 703 648-5755	
Pager Messaging: 	http://fgdclearhs.er.usgs.gov/dougmsg.html



More information about the MapServer-users mailing list