[mapserver-users] subsetted output, but I don't want that

Fawcett, David (MPCA) David.Fawcett at state.mn.us
Wed Nov 9 14:57:51 EST 2011


Kevin, 

You could create a world file.  Here is a reference for the world file format:  http://www.gdal.org/frmt_various.html#WLD


According to the gdal docs, a world file with an extension of .pgw, .pngw, or .wld will be read. http://www.gdal.org/frmt_various.html#PNG


As an example, the world file associated with this global raster from Natural Earth II http://www.naturalearthdata.com/downloads/50m-natural-earth-2/50m-natural-earth-ii-with-shaded-relief-and-water/


Contains the below text:
          0.03333333333333
          0.00000000000000 
          0.00000000000000 
          -0.03333333333333 
          -179.98333333333333 
          89.98333333333333


David.


-----Original Message-----
From: Kevin Ward [mailto:kablukiw at gmail.com] 
Sent: Wednesday, November 09, 2011 1:47 PM
To: Fawcett, David (MPCA)
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] subsetted output, but I don't want that

No, it's just a plain PNG. I was operating under the assumption that
the EXTENT and UNITS parameters in the mapfile would define the
coordinates of the source image but perhaps that is only constraining
the output?

If that is the case, how can I go about providing georeference for an
image such as that?

Kevin

On Wed, Nov 9, 2011 at 11:35 AM, Fawcett, David (MPCA)
<David.Fawcett at state.mn.us> wrote:
> Is the raster georeferenced?  It kind of sounds like it is using pixel coordinates instead of coordinates from a spatial reference system.
>
> What do you get if you run gdalinfo on the image file?
>
> David.
>
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of kablukiw
> Sent: Wednesday, November 09, 2011 1:33 PM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] subsetted output, but I don't want that
>
> I am new to mapserver and am experiencing difficulty with the output being
> generated by mapserv.exe (using OSGeo4W). The output I am getting is showing
> a subset of the original image even though I am not specifying any extents
> that would indicate I want anything other than the full image.
>
> The source file is a global image 1440x720 and the output I get is also
> 1440x720 but is showing only the bottom left 180x90 pixels of the source
> image resized to 720x360 and placed in the upper right of the output image.
>
> http://osgeo-org.1803224.n2.nabble.com/file/n6979235/test.png example output
>
> It seems as if the EXTENT is affecting the extent of the output but I'm not
> sure how. I am currently testing this from the cmd line with the following
> (I have seen the same issue when testing this mapfile with OpenLayers):
>
> mapserv.exe -nh
> "QUERY_STRING=map=c:/OSGeo4W/apache/htdocs/kevin/lst.map&mode=map" >
> test.png
>
> My map file:
>
> MAP
>    NAME "LST"
>    SIZE 1440 720
>    EXTENT -180 -90 180 90
>    UNITS DD
>    SHAPEPATH "c:/OSGeo4W/apache/htdocs/kevin/"
>    IMAGECOLOR 255 255 255
>    IMAGETYPE PNG
>    STATUS ON
>    DEBUG ON
>
>    LAYER
>        NAME "LST"
>        TYPE RASTER
>        STATUS DEFAULT
>        DATA "lst_1440.png"
>        OFFSITE 0 0 0
>    END # LAYER
> END # MAP
>
> Any suggestions would be greatly appreciated. Thanks,
>
> Kevin
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/subsetted-output-but-I-don-t-want-that-tp6979235p6979235.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> 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