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

2011-11-09 Thread Kevin Ward
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.fawc...@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-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of kablukiw
 Sent: Wednesday, November 09, 2011 1:33 PM
 To: mapserver-users@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.mapmode=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@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2011-11-09 Thread Kevin Ward
Thank you Jukaa -- the wms_extent did the trick for dealing with a
projection-less file. I was able to use a geotiff without the
wms_extent and it worked, of course.

Thank you all for your comments, that got me out of this initial mud
hole. On to more exciting things...

Kevin

Kevin Ward
NASA's Earth Observatory
Sigma Space Corporation
ke...@eyeonclimate.com

http://earthobservatory.nasa.gov/
http://neo.sci.gsfc.nasa.gov/

Twitter http://twitter.com/NASA_EO/
Facebook http://www.facebook.com/NASAEarthObservatory



On Wed, Nov 9, 2011 at 12:06 PM, Rahkonen Jukka
jukka.rahko...@mmmtike.fi wrote:
 Hi,

 Nowadays it is also possible to use the layers wms_extent metadata, see 
 http://mapserver.org/ogc/wms_server.html. So Kevin was actually rather close 
 with his assumption and
 wms_extent -180 -90 180 90 should make the image to behave correctly.

 However, I would absolutely add also map level and layer level PROJECTION 
 blocks.

 -Jukka Rahkonen-

  Fawcett, David wrote:

 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.03
          0.00
          0.00
          -0.03
          -179.98
          89.98


 David.


 -Original Message-
 From: Kevin Ward [mailto:kablu...@gmail.com]
 Sent: Wednesday, November 09, 2011 1:47 PM
 To: Fawcett, David (MPCA)
 Cc: mapserver-users@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.fawc...@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-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of kablukiw
 Sent: Wednesday, November 09, 2011 1:33 PM
 To: mapserver-users@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.mapmode=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@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users





 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users