[mapserver-users] Mapserver and raster layers

Christopher Dedels cdedels at gmail.com
Sun Apr 17 18:04:41 EDT 2011


Steve,

This resolved the issue.  I ran `gdalwarp /tmp/image.tiff
/tmp/image_inverted.tiff` and it inverted the y axis coordinates again.

Chris


On Sun, Apr 17, 2011 at 9:09 AM, Christopher Dedels <cdedels at gmail.com>wrote:

> I'll look into the N-S coordinates.  I am using gdal_grid to create a grid
> from a point layer and then using gdal_contour to create a line layer from
> the grid.  The input point layer and output line layer seem to have the
> right N-S coordinates and display on my map just fine.
>
> Thanks,
>
> Chris
>
>
>
> On Sun, Apr 17, 2011 at 12:11 AM, Stephen Woodbridge <
> woodbri at swoodbridge.com> wrote:
>
>> Sorry, you had posted the gdalinfo, I was rushing out the door and missed
>> that. But looking at it the image extents looks strange, it seems that the
>> north-south coordinates are inverted.
>>
>>
>> Upper Left  (-123.8600311,  38.0116386) (123d51'36.11"W, 38d 0'41.90"N)
>> Lower Left  (-123.8600311,  53.7055626) (123d51'36.11"W, 53d42'20.03"N)
>> Upper Right ( -97.1885986,  38.0116386) ( 97d11'18.96"W, 38d 0'41.90"N)
>> Lower Right ( -97.1885986,  53.7055626) ( 97d11'18.96"W, 53d42'20.03"N)
>>
>> lower left should be the xmin, ymin and upper right should be the xmax,
>> ymax values and so that looks weird.
>>
>> Otherwise I'm not seeing a problem. You might need to specify an image
>> mode that you want mapserver to render you image in:
>>
>> IMAGETYPE jpeg
>>
>>
>> -Steve W
>>
>> On 4/16/2011 5:52 PM, Christopher Dedels wrote:
>>
>>> gdalinfo output for my raster file is:
>>>
>>> Driver: GTiff/GeoTIFF
>>> Files: /tmp/image.tiff
>>> Size is 800, 600
>>> Coordinate System is:
>>> GEOGCS["WGS 84",
>>>     DATUM["WGS_1984",
>>>         SPHEROID["WGS 84",6378137,298.257223563,
>>>             AUTHORITY["EPSG","7030"]],
>>>         AUTHORITY["EPSG","6326"]],
>>>     PRIMEM["Greenwich",0],
>>>     UNIT["degree",0.0174532925199433],
>>>     AUTHORITY["EPSG","4326"]]
>>> Origin = (-123.860031127930000,38.011638641357401)
>>> Pixel Size = (0.033339290618897,0.026156539916992)
>>> Metadata:
>>>   AREA_OR_POINT=Area
>>> Image Structure Metadata:
>>>   INTERLEAVE=BAND
>>> Corner Coordinates:
>>> Upper Left  (-123.8600311,  38.0116386) (123d51'36.11"W, 38d 0'41.90"N)
>>> Lower Left  (-123.8600311,  53.7055626) (123d51'36.11"W, 53d42'20.03"N)
>>> Upper Right ( -97.1885986,  38.0116386) ( 97d11'18.96"W, 38d 0'41.90"N)
>>> Lower Right ( -97.1885986,  53.7055626) ( 97d11'18.96"W, 53d42'20.03"N)
>>> Center      (-110.5243149,  45.8586006) (110d31'27.53"W, 45d51'30.96"N)
>>> Band 1 Block=800x2 Type=Float32, ColorInterp=Gray
>>>
>>> Regards,
>>>
>>> Chris
>>>
>>> On Sat, Apr 16, 2011 at 5:47 PM, Stephen Woodbridge
>>> <woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.com>> wrote:
>>>
>>>    What does:
>>>
>>>    gdalinfo /tmp/image.tif
>>>
>>>    report?
>>>
>>>    -Steve W
>>>
>>>
>>>
>>>    On 4/16/2011 4:52 PM, Christopher Dedels wrote:
>>>
>>>        Hmmm...missed that one.  But changing the units to dd still
>>>        doesn't have
>>>        any effect.
>>>
>>>        I am using mapserver 4.8.1.  DEBUG is not an option in this
>>> version.
>>>        mapserv -v produces the following output:
>>>
>>>        MapServer version 4.8.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
>>>        OUTPUT=WBMP
>>>        OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
>>>        SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE
>>>
>>>        My request uri is:
>>>
>>> http://localhost/cgi-bin/mapserv?MAP=/tmp/mapNl7O7H.map&LAYERS=ALL&MODE=MAP
>>>        <
>>> http://localhost/cgi-bin/mapserv?MAP=/tmp/mapNl7O7H.map&LAYERS=ALL&MODE=MAP
>>> >
>>>        <
>>> http://localhost/cgi-bin/mapserv?MAP=/tmp/mapNl7O7H.map&LAYERS=ALL&MODE=MAP
>>>        <
>>> http://localhost/cgi-bin/mapserv?MAP=/tmp/mapNl7O7H.map&LAYERS=ALL&MODE=MAP
>>> >>
>>>
>>>        gdalinfo output for my raster file is:
>>>
>>>        Driver: GTiff/GeoTIFF
>>>        Files: /tmp/image.tiff
>>>        Size is 800, 600
>>>        Coordinate System is:
>>>        GEOGCS["WGS 84",
>>>             DATUM["WGS_1984",
>>>                 SPHEROID["WGS 84",6378137,298.257223563,
>>>                     AUTHORITY["EPSG","7030"]],
>>>                 AUTHORITY["EPSG","6326"]],
>>>             PRIMEM["Greenwich",0],
>>>             UNIT["degree",0.0174532925199433],
>>>             AUTHORITY["EPSG","4326"]]
>>>        Origin = (-123.860031127930000,38.011638641357401)
>>>        Pixel Size = (0.033339290618897,0.026156539916992)
>>>        Metadata:
>>>           AREA_OR_POINT=Area
>>>        Image Structure Metadata:
>>>           INTERLEAVE=BAND
>>>        Corner Coordinates:
>>>        Upper Left  (-123.8600311,  38.0116386) (123d51'36.11"W, 38d
>>>        0'41.90"N)
>>>        Lower Left  (-123.8600311,  53.7055626) (123d51'36.11"W,
>>>        53d42'20.03"N)
>>>        Upper Right ( -97.1885986,  38.0116386) ( 97d11'18.96"W, 38d
>>>        0'41.90"N)
>>>        Lower Right ( -97.1885986,  53.7055626) ( 97d11'18.96"W,
>>>        53d42'20.03"N)
>>>        Center      (-110.5243149,  45.8586006) (110d31'27.53"W,
>>>        45d51'30.96"N)
>>>        Band 1 Block=800x2 Type=Float32, ColorInterp=Gray
>>>
>>>        Regards,
>>>
>>>        Chris
>>>
>>>
>>>        On Sat, Apr 16, 2011 at 4:34 PM, Stephen Woodbridge
>>>        <woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.com>
>>>         <mailto:woodbri at swoodbridge.com
>>>        <mailto:woodbri at swoodbridge.com>>> wrote:
>>>
>>>            On 4/16/2011 4:33 PM, Christopher Dedels wrote:
>>>
>>>                Thanks for the suggestion.   I have tried it and it
>>>        appears to
>>>                have no
>>>                effect.
>>>
>>>                Chris
>>>
>>>
>>>                On Sat, Apr 16, 2011 at 4:26 PM, Stephen Woodbridge
>>>        <woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.com>
>>>        <mailto:woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.com>>
>>>        <mailto:woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.com>
>>>
>>>        <mailto:woodbri at swoodbridge.com
>>>        <mailto:woodbri at swoodbridge.com>>>> wrote:
>>>
>>>                    Try changing the layer status to default, ie:
>>>
>>>                      STATUS DEFAULT
>>>
>>>                    -Steve W
>>>
>>>
>>>                    On 4/16/2011 2:22 PM, Christopher Dedels wrote:
>>>
>>>                        I am having some problems adding a raster layer
>>>        to my
>>>                map.  The
>>>                        image
>>>                        produced by mapserver is blank.  My mapfile is
>>>        as follows:
>>>
>>>                        MAP
>>>                                 SIZE 800 600
>>>                                 UNITS meters
>>>
>>>
>>>            This is a problem, Your UNITs are meters, but your extents and
>>>            projection are DD!
>>>
>>>
>>>                                 EXTENT -123.8600311 38.0116386
>>> -97.1885986
>>>                53.7055626
>>>
>>>                                 PROJECTION
>>>        "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
>>>                                 END
>>>
>>>                                 LAYER
>>>                                         NAME "grid"
>>>                                         TYPE RASTER
>>>                                         DATA "/tmp/image.tiff"
>>>                                         STATUS ON
>>>                                         PROJECTION
>>>        "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
>>>                                         END
>>>                                 END
>>>                        END
>>>
>>>                        I have also noticed that changing the DATA path to
>>> a
>>>                file which
>>>                        does not
>>>                        exist in the filesystem (or is not a
>>>        GDAL-supported file
>>>                format)
>>>                        has no
>>>                        effect on the rendered output and does not
>>>        produce an
>>>                error message.
>>>
>>>                        Can somebody help me where I am going wrong?
>>>
>>>                        Thanks
>>>
>>>
>>>
>>>                        _______________________________________________
>>>                        mapserver-users mailing list
>>>        mapserver-users at lists.osgeo.org
>>>        <mailto:mapserver-users at lists.osgeo.org>
>>>        <mailto:mapserver-users at lists.osgeo.org
>>>        <mailto:mapserver-users at lists.osgeo.org>>
>>>        <mailto:mapserver-users at lists.osgeo.org
>>>        <mailto:mapserver-users at lists.osgeo.org>
>>>        <mailto:mapserver-users at lists.osgeo.org
>>>        <mailto:mapserver-users at lists.osgeo.org>>>
>>>
>>>        http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>>
>>>
>>>
>>>                _______________________________________________
>>>                mapserver-users mailing list
>>>        mapserver-users at lists.osgeo.org
>>>        <mailto:mapserver-users at lists.osgeo.org>
>>>        <mailto:mapserver-users at lists.osgeo.org
>>>        <mailto:mapserver-users at lists.osgeo.org>>
>>>        http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>>            _______________________________________________
>>>            mapserver-users mailing list
>>>        mapserver-users at lists.osgeo.org
>>>        <mailto:mapserver-users at lists.osgeo.org>
>>>        <mailto:mapserver-users at lists.osgeo.org
>>>        <mailto:mapserver-users at lists.osgeo.org>>
>>>
>>>        http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>>
>>>
>>>        _______________________________________________
>>>        mapserver-users mailing list
>>>        mapserver-users at lists.osgeo.org
>>>        <mailto:mapserver-users at lists.osgeo.org>
>>>        http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>>    _______________________________________________
>>>    mapserver-users mailing list
>>>    mapserver-users at lists.osgeo.org <mailto:
>>> mapserver-users at lists.osgeo.org>
>>>    http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110417/bfc96be1/attachment-0001.html


More information about the mapserver-users mailing list