Opened 21 years ago

Closed 20 years ago

#446 closed defect (fixed)

Incorrect Display of WMS retrieved Layers

Reported by: dlowther@… Owned by: dmorissette
Priority: high Milestone:
Component: WMS Client Version: 4.0
Severity: major Keywords:
Cc:

Description

I've been able to grag a series of images that better 
 highlight what is going on with this situation.
 
 13.jpg: This is the result of the following WMS request 
 (grabber by sniffing traffic) by Mapserver in a browser saved to disk.
 	
 http://gisdata.usgs.net/servlet/com.esri.wms.Esrimap?SERVICENA
 ME=133urban&REASPECT=true&REQUEST=map&SERVICE=WMS&WMTVER=1.0.0
 &LAYERS=UA%5FORTHO%5F302%5F01&FORMAT=png&TRANSPARENT=TRUE&STYL
 ES=&REQUEST=map&WIDTH=500&HEIGHT=500&SRS=EPSG:4326&BBOX=-97.45
 9393,35.545685,-97.455491,35.548877&EXCEPTIONS=INIMAGE%20HTTP/1.1
 
 12.jpg: This is mapserver's output that generated the above 
 request. The mapfile Gayathri already attached.
 
 14.jpg: This is mapserver's output for the same extent from 
 our Alber's projected DOQQs.
 
 
 
 It seems as though Mapserver is expanding the BBOX in order 
 to get enough result to cover the view extent after 
 reprojection - because there is a larger area covered by 
 13.jpgthen by 14.jpg. But, it seems like after reprojection, 
 mapserver is not taking into account that it got more then it 
 needed when it compiles the final output. Does this sound right?
 
 What more information could we provide so people that really 
 know what is going on here can help?
 
 Thanks,
 
 Dave Lowther
 
 
 
 
> 
> > -----Original Message-----
> > From: Swaminathan, Gayathri [mailto:gayathri@ou.edu]
> > Sent: Monday, September 29, 2003 8:59 AM
> > To: 'Ed McNierney'
> > Cc: Mapserver List (mapserver-users@lists.gis.umn.edu)
> > Subject: RE: [Mapserver-users] Max image size
> > 
> > 
> > Ed,
> > 
> > Is there a way to log the WMS requests?
> > 
> > Also I missed to include the site address this is happening in my 
> > last mail.
> > 
> > It is http://129.15.172.20/okstatedemo40.htm
> > 
> > If you zoom into Oklahoma city area( the center of the state) and 
> > keep zooming in., you will see the white line behavior after a 
> > certain scale.
> > 
> > Thanks for all your help and time on this.
> > ~Gayathri
> > 
> > -----Original Message-----
> > From: Ed McNierney [mailto:ed@topozone.com]
> > Sent: Friday, September 26, 2003 4:40 PM
> > To: Swaminathan, Gayathri
> > Subject: RE: [Mapserver-users] Max image size
> > 
> > 
> > Gayathri -
> > 
> > I'm always a little worried when the Metadata document describes the 
> > imagery as UTM NAD83 and the Capabilities document declares it to be 
> > geographic!
> > 
> > Have you tried simply pulling up some images in a Web browser with 
> > hand-coded WMS requests?  That ought to give you a better sense of 
> > what the data's really doing.
> > 
> > 	- Ed
> > 
> > Ed McNierney
> > President and Chief Mapmaker
> > TopoZone.com / Maps a la carte, Inc.
> > 73 Princeton Street, Suite 305
> > North Chelmsford, MA  01863
> > ed@topozone.com
> > (978) 251-4242
> > 
> > -----Original Message-----
> > From: Swaminathan, Gayathri [mailto:gayathri@ou.edu]
> > Sent: Friday, September 26, 2003 5:02 PM
> > To: 'Frank Warmerdam'; mapserver-users@lists.gis.umn.edu
> > Subject: RE: [Mapserver-users] Max image size
> > 
> > 
> > Hi:
> > 
> > I am trying to project the USGS urban orthos at 
> > http://gisdata.usgs.net/mapservices.asp?CategoryName=Orthoimag
> > ery using mapserver version 4.
> > 
> > My map projection is in America Albers Equal Area Conic
> > 
> > And the WMS layer request is in WGS 84.
> > 
> > The initial hurdle of the map image getting squished was overcome 
> > with the help of Brian's advice to do REASPECT=false at the end of 
> > the request string.
> > 
> > But there is a white band that still appears after zooming in over a 
> > certain scale.
> > 
> > We are not sure if this is a WGS84->Albers problem or else.
> > 
> > Has anyone else come across this problem? We really love albers 
> > projection for the map.
> > 
> > Thanks,
> > Gayathri
> > 
> > 
> > The map file looks like below:
> > 
> > #
> > # Start of map file
> > #
> > MAP
> > NAME OKSTATE40
> > STATUS ON
> > SIZE 500 400
> > EXTENT -633771.227805 1060738.573036 152927.340425 1689379.870746 
> > #EXTENT -665000 -707000 163000 -227000 UNITS METERS
> > #EXTENT -102 33 -94 37
> > #UNITS DD
> > SHAPEPATH "../data"
> > FONTSET fonts.list
> > #IMAGECOLOR 255 255 255
> > IMAGECOLOR 206 208 214
> > INTERLACE ON
> > SYMBOLSET "symbolset.list"
> > 
> > OUTPUTFORMAT
> >    NAME png
> >    DRIVER "GD/PNG"
> >    MIMETYPE "image/png"
> >    IMAGEMODE RGB
> >    EXTENSION "png"
> >  END
> > 
> > 
> > 
> > PROJECTION # ALBERS OK -all drg's and doqq's on geo site
> are OK ALBERS
> > 	proj=aea
> > 	lat_1=29.500000000 #SP1
> > 	lat_2=45.500000000 #SP2
> > 	lat_0=23.000000000 #REF LAT
> > 	lon_0=-96.000000000 #CENTRAL MERIDIAN
> > 	x_0=0.000 #FALSE EAST
> > 	y_0=0.000 # FALSE NORTH
> > 	datum=NAD83
> > 	ellps=GRS80
> > 	no_defs
> > END
> > 
> > WEB
> > 	EMPTY 
> > "http://129.15.172.20/geomap/OKSTATE40/mapOKSTATE40norecords.h
> tm"
> 
> ...... And so on....
> 
> ### OKC 2002 Ortho USGS-WMS ###
> LAYER
> 	NAME Urban133
> 	GROUP Imagery
> 	TYPE RASTER
> 	STATUS ON
> 	MAXSCALE 500000
> 	OFFSITE 255 255 255
> 	CONNECTIONTYPE WMS
> 	CONNECTION
> "http://gisdata.usgs.net:80/servlet/com.esri.wms.Esrimap?SERVI
CENAME=133urba
n&REASPECT=true&REQUEST=map"
	#MINSCALE 500
	PROJECTION
		"init=epsg:4326" #WGS 84
	END
	TRANSPARENCY 20
	METADATA
		"NoID" "T"
		"wms_name" "UA_ORTHO_302_01"
		"wms_server_version" "1.0.0"
		"wms_format" "png"
		"wms_title" "USGS Urban Color Ortho 2002"
		"wms_group_title" "Imagery"
		"wms_style" ""
		"wms_extent" "-123.12987 45.241726 -122.3584 45.75648"
	END

END
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu 
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users

_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu 
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users

Attachments (3)

12.jpg (25.2 KB ) - added by dlowther@… 21 years ago.
12.jpg
13.jpg (25.8 KB ) - added by dlowther@… 21 years ago.
13.jpg
14.jpg (22.0 KB ) - added by dlowther@… 21 years ago.
14.jpg

Download all attachments as: .zip

Change History (6)

by dlowther@…, 21 years ago

Attachment: 12.jpg added

12.jpg

by dlowther@…, 21 years ago

Attachment: 13.jpg added

13.jpg

by dlowther@…, 21 years ago

Attachment: 14.jpg added

14.jpg

comment:1 by dlowther@…, 21 years ago

bug_file_loc: http://129.15.172.20/okstatedemo40.htm
notes:
- in URL given, you must zoom in to the central (Oklahoma City) area on the map 
for the USGS Urban Color Ortho 2002 top be available. occasioanlly you must 
zoom to house level for the problem to occur.
- reaspect=false on the WMS request...

I can be reached at (405) 325-3131 X 238 if necessary.

comment:2 by dmorissette, 20 years ago

Status: newassigned
David found the source of the problem.  I'll apply his patch as soon as I have a
minute.

Lowther, David W wrote:
> 
> The problem was too little precision in the wld file created for the 
> incoming PNG when the layer projection is Lat Long. I changed the 
> following lines from mapwmslayer.c (msDrawWMSLayerLow) as shown here to 
> increase the precision:
> 
> OLD:
>             fprintf(fp, "%f\n", MS_CELLSIZE(pasReqInfo[iReq].bbox.minx,
>                                             pasReqInfo[iReq].bbox.maxx,
>                                             map->width));
>             fprintf(fp, "0\n");
>             fprintf(fp, "0\n");
>             fprintf(fp, "%f\n", MS_CELLSIZE(pasReqInfo[iReq].bbox.maxy,
>                                             pasReqInfo[iReq].bbox.miny,
>                                             map->height));
>             fprintf(fp, "%f\n", pasReqInfo[iReq].bbox.minx);
>             fprintf(fp, "%f\n", pasReqInfo[iReq].bbox.maxy);
>   
> NEW:
>             fprintf(fp, "%.10f\n", MS_CELLSIZE(pasReqInfo[iReq].bbox.minx,
>                                             pasReqInfo[iReq].bbox.maxx,
>                                             map->width));
>             fprintf(fp, "0\n");
>             fprintf(fp, "0\n");
>             fprintf(fp, "%.10f\n", MS_CELLSIZE(pasReqInfo[iReq].bbox.maxy,
>                                             pasReqInfo[iReq].bbox.miny,
>                                             map->height));
>             fprintf(fp, "%.10f\n", pasReqInfo[iReq].bbox.minx);
>             fprintf(fp, "%.10f\n", pasReqInfo[iReq].bbox.maxy);
>   
> 
> This definitely does solve the problem in my situation.

comment:3 by dmorissette, 20 years ago

Resolution: fixed
Status: assignedclosed
Fixed.  I have applied the patch in 4.1 (CVS)... sorry for the delay.
Note: See TracTickets for help on using tickets.