Opened 21 years ago

Closed 16 years ago

#319 closed defect (fixed)

coordinate issue

Reported by: wegner@… Owned by: sdlime
Priority: high Milestone: 5.2 release
Component: MapServer CGI Version: 4.0
Severity: normal Keywords:
Cc:

Description (last modified by sdlime)

I am sending in the W,S,E,N coordinates to mapserv and the red rubber banding 
does not appear to always draw correctly.  You can view the error using the 
following url and coords: 

 http://130.11.52.184/scripts/mapserv.exe?mode=reference&mapext=-90+-90+90+90
 http://130.11.52.184/scripts/mapserv.exe?mode=reference&mapext=-90+-10+90+10
 http://130.11.52.184/scripts/mapserv.exe?mode=reference&mapext=-180+-10+180+10
 http://130.11.52.184/scripts/mapserv.exe?mode=reference&mapext=-180+-50+180+50
 http://130.11.52.184/scripts/mapserv.exe?mode=reference&mapext=-10+-50+10+50

Change History (3)

comment:2 by tomkralidis, 16 years ago

The second URL seems to shrink the extent. The 3rd/4th URL seems to "box out" the y values.

comment:3 by sdlime, 16 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

MapServer always assumes the extent passed in for mode=reference is associated with a map. That is, a reference map is paired with a primary map. So the mapext passed in is used with the SIZE parameter in the main map to compute the box to be drawn over the reference image. The mapext is not drawn "as is". So, depending on on the SIZE in the mapfile you certainly could see boxes with edges off the map. These type of URLs are almost always accompanied with the mapsize parameter. That helps preserve the original extent. There would likely be some adjustment but it wouldn't be apparent visually (e.g. less than a pixel).

If one wants to draw a rectangle unadjusted on a map then they could use a normal set of layers. Here's an example (syntax is 4.x but this works in 5.x with some small changes):

Example mapfile -

http://maps.dnr.state.mn.us/tomo/reference.map

Example image - http://noah.dnr.state.mn.us/cgi-bin/mapserv46?map=/usr/local/www/docs_maps/tomo/reference.map&mode=map&layer=box&map_box_feature=new&map_box_feature_points=478480+4963680+478480+4986540+508960+4986540+508960+4963680+478480+4963680

So, the reference mode works as intended (which is probably why I didn't jump on this way back). Marking as invalid, but please let me know if there are questions or concerns.

Steve

Note: See TracTickets for help on using tickets.