Image location inside its corner coordinates

Bruno Patini Furtado bpfurtado at GMAIL.COM
Wed Aug 9 13:47:04 EDT 2006


Hi Ed,

On 8/9/06, Ed McNierney <ed at topozone.com> wrote:
>
>  Bruno -
>
> Could you post the EXTENT statement you're using?  Two things to check -
> UNITS DD should be there (should not affect this problem, however) and your
> EXTENT needs to be in the order MINX MINY MAXX MAXY, so it should be:
> EXTENT -48.0004159 -25.0004164 -46.5004159 -24.0004163
>
My extent is indeed like you said it should be:
    EXTENT -48.0004159 -25.0004164 -46.5004159 -24.0004163

It was because of the line below that you state that the units should be
Decimal Degrees?
    UNIT["degree",0.0174532925199433],

Your image is 1.5 degrees wide (X dimension) and 1 degree tall (Y dimension)
> so your output image size should also be that shape (600 pixels wide by 400
> pixels high, for example) or you will see the map shrunk to fit the shape of
> the image.
>

Your example shows the right proportion as gdalinfo tells the image is
[1800, 1200] but I would like to set the layer metadata ows_extent with the
actual image coordinates, not size, in order to show the image a bit better
in the MapServer demo. Below goes my mapinfo layer element as I'm trying to
configure it.

    LAYER
        NAME "my DEM Image"
        STATUS OFF
        TYPE RASTER
        DUMP TRUE
        DATA "SG-23-V-A.tif"
        PROJECTION
            "init=epsg:4326"
        END
        METADATA
            wcs_label "Some label"
            ows_extent "-48.000416 -24.000416 -48.001816 -24.001816"
            wcs_resolution "0.00083 -0.00083"
            ows_srs "EPSG:4326"
            wcs_formats "GEOTIFFINT16"
            wcs_nativeformat "geotiff"
        END
    END



    - Ed
>
> Ed McNierney
> President and Chief Mapmaker
> TopoZone.com / Maps a la carte, Inc.
> 73 Princeton Street, Suite 305
> North Chelmsford, MA  01863
> Phone: +1 (978) 251-4242
> Fax: +1 (978) 251-1396
> ed at topozone.com
>
>  ------------------------------
> *From:* UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] *On
> Behalf Of *Bruno Patini Furtado
> *Sent:* Wednesday, August 09, 2006 10:59 AM
> *To:* MAPSERVER-USERS at LISTS.UMN.EDU
> *Subject:* [UMN_MAPSERVER-USERS] Image location inside its corner
> coordinates
>
> I have a DEM image of which below I've copied the gdalinfo output.
>
> Driver: GTiff/GeoTIFF
> Size is 1800, 1200
> Coordinate System is:
> GEOGCS["WGS 84",
>     DATUM["WGS_1984",
>         SPHEROID["WGS 84",6378137,298.2572235630016,
>             AUTHORITY["EPSG","7030"]],
>         AUTHORITY["EPSG","6326"]],
>     PRIMEM["Greenwich",0],
>     UNIT["degree",0.0174532925199433],
>     AUTHORITY["EPSG","4326"]]
> Origin = (-48.000416,-24.000416)
> Pixel Size = (0.00083333,-0.00083333 )
> Metadata:
>   AREA_OR_POINT=Area
>   TIFFTAG_SOFTWARE=IMAGINE TIFF Support
> Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved
> @(#)$RCSfile: etif.c $ $Revision: 1.10.1.9 $ $Date: 2003/11/13 19:25:49EST
> $
>   TIFFTAG_XRESOLUTION=1
>   TIFFTAG_YRESOLUTION=1
>   TIFFTAG_RESOLUTIONUNIT=1 (unitless)
> Corner Coordinates:
> Upper Left  ( -48.0004159, -24.0004163) ( 48d 0'1.50"W, 24d 0'1.50"S)
> Lower Left  ( -48.0004159, -25.0004164 ) ( 48d 0'1.50"W, 25d 0'1.50"S)
> Upper Right ( -46.5004159, -24.0004163) ( 46d30'1.50"W, 24d 0'1.50"S)
> Lower Right ( -46.5004159, -25.0004164) ( 46d30'1.50"W, 25d 0'1.50"S)
> Center      ( -47.2504159, -24.5004163) ( 47d15'1.50"W, 24d30'1.50"S)
> Band 1 Block=1800x2 Type=UInt16, ColorInterp=Gray
>   Overviews: 450x300, 225x150, 113x75, 57x38
>
> I could take from it the EXTENT to use in my Mapfile using the Lower Left and
> Upper Right coordinates. But the problem is that the image is to small
> inside this coordinates and I can't find the image location inside then by
> this output. Is there some other utility to get this coordinates?
>
>
> --
> "Minds are like parachutes, they work best when open."
>
> Bruno Patini Furtado
> Software Developer
> webpage: http://bpfurtado.net
> software development blog: http://bpfurtado.livejournal.com
>



-- 
"Minds are like parachutes, they work best when open."

Bruno Patini Furtado
Software Developer
webpage: http://bpfurtado.net
software development blog: http://bpfurtado.livejournal.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060809/0cc0ee6a/attachment.html


More information about the mapserver-users mailing list