[mapserver-users] Question on Validation Blocks

Stephen Woodbridge woodbri at swoodbridge.com
Fri Mar 14 13:31:25 PDT 2014


akrherz on IRC gave me the fix:

http://imaptools.com:8080/cgi-bin/mapserv?mode=map&map.projection=init=epsg:900913&map=/u/data/tiger2013-maps/tiger2013-mc.map&layers=all&imagetype=jpeg&MAPSIZE=541+522&map.scalebar=status+embed+units+feet&map.units=meters&SCALEDENOM=3000&MAPXY=-7946835.7326273+5254288.4981293

When you change the projection you ALSO have to change the map.units

I so should have known that. Duh!

-Steve


On 3/14/2014 4:22 PM, Stephen Woodbridge wrote:
> On 3/14/2014 2:08 PM, Humberto Cereser Ibanez wrote:
>> Hi Steve,
>>
>> Em Sex, 2014-03-14 às 11:25 -0400, Stephen Woodbridge escreveu:
>>> Hi all,
>>>
>>> I'm trying to construct a mapserver URL to fetch an image from php. I'm
>>> change some of the mapfile parameters in the url. Do I need validation
>>> blocks for these changes? I assume I do not because I am getting a scale
>>> bar. I'm only getting a blank image.
>>>
>> I think your assumption is right, because I changed the map.projection
>> and MAPXY parameter and the URL worked
>>
>> http://imaptools.com:8080/cgi-bin/mapserv?mode=map&map.projection=init=epsg:4326&map=/u/data/tiger2013-maps/tiger2013-mc.map&layers=all&imagetype=jpeg&MAPSIZE=541+522&map.scalebar=status+embed+units+feet&SCALEDENOM=3000&MAPXY=-71.38764+42.61986
>>
>
> Right I tried that also, and I tried putting in an invalid projections
> and it threw an appropriate error so I think the syntax is correct.
>
>>> http://imaptools.com:8080/cgi-bin/mapserv?mode=map&map.projection=init=epsg:900913&map=/u/data/tiger2013-maps/tiger2013-mc.map&layers=all&imagetype=jpeg&MAPSIZE=541+522&map.scalebar=status+embed+units+feet&SCALEDENOM=3000&MAPXY=-7946835.7326273+5254288.4981293
>>>
>>>
>>> The projection for the map object is epsg:4326 in the mapfile.
>>> I appear to be getting a png image despite the request for a jpeg?
>>>
>>> MapServer version 6.2.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
>>> SUPPORTS=GD SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO
>>> SUPPORTS=SVG_SYMBOLS SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER
>>> SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
>>> SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI
>>> SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR
>>> INPUT=GDAL INPUT=SHAPEFILE
>>>
>>> The MAPXY should be equivalent to -71.38764, 42.61986 if I did the
>>> conversion correctly.
>>>
>>> Any idea what I'm doing wrong here?
>> May be nothing wrong, but the lack of projection in each layer of your
>> WMS mapfile. Just a guess.
>
> It as projection block in all layers. And I can change the projection in
> WMS, so this seems like a bug in CGI. The bug might be in my
> understanding of things :)
>
> Looking more like a bug at this point.
>
> -Steve W
>
>>>
>>> And it works if I don't change the projection:
>>>
>>> http://imaptools.com:8080/cgi-bin/mapserv?mode=map&map=/u/data/tiger2013-maps/tiger2013-mc.map&layers=all&MAP_IMAGETYPE=jpeg&MAPSIZE=541+522&map.scalebar=status+embed+units+feet&SCALEDENOM=3000&MAPXY=-71.38764+42.61986
>>>
>>>
>>> And it works as WMS:
>>>
>>> http://imaptools.com:8080/cgi-bin/mapserv?MAP=%2Fu%2Fdata%2Ftiger2013-maps%2Ftiger2013.map&FORMAT=image%2Fjpeg&MAP_IMAGETYPE=jpeg&LAYERS=Tiger_2013&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-7947363.3342296,5253914.7041195,-7946527.3042538,5254571.5848149&WIDTH=700&HEIGHT=550
>>>
>>>
>>> Thanks,
>>>     -Steve
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>> Best regards,
>>
>> Humberto Cereser Ibanez
>>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list