[mapserver-users] Problem displaying a NAD83 tile in WGS84 (or via WMS)

Smith, Michael ERDC-CRREL-NH Michael.Smith at usace.army.mil
Sat Aug 20 05:25:37 EDT 2011


Ed,

Your mrsid image is in UTM Zone 10, NAD 1983. You should set

PROJECTION
 "init=epsg:26910"
END


For your layer (http://spatialreference.org/ref/epsg/26910/)

-- 
Mike


Michael Smith
Remote Sensing/GIS Center
US Army Corps of Engineers



On 8/19/11 5:23 PM, "Ed Resnick" <eresnick at tapestrysolutions.com> wrote:

>Here's a WMS request, broken up for readability:
>
>-------------------------------------------------------
>http://10.10.10.206/cgi-bin/mapserv.exe?map=E:/osm4326/mrsid.map
>  &service=WMS
>  &version=1.1.1
>  &request=GetMap
>  &layers=default
>  &format=image/png
>  &width=256
>  &height=256
>  &srs=EPSG:4326
>  &bbox=-122.875,45.25,-122.75,45.375
>  &transparent=TRUE
>-------------------------------------------------------
>
>Here's the gdalinfo dump:
>
>-------------------------------------------------------
>Driver: MrSID/Multi-resolution Seamless Image Database (MrSID)
>Files: wa.sid.sid
>       wa.sid.sdw
>       wa.sid.sid.aux.xml
>Size is 1742, 1458
>Coordinate System is:
>PROJCS["NAD_1983_UTM_Zone_10N",
>    GEOGCS["GCS_North_American_1983",
>        DATUM["North_American_Datum_1983",
>            SPHEROID["GRS_1980",6378137.0,298.257222101]],
>        PRIMEM["Greenwich",0.0],
>        UNIT["Degree",0.0174532925199433]],
>    PROJECTION["Transverse_Mercator"],
>    PARAMETER["false_easting",500000.0],
>    PARAMETER["false_northing",0.0],
>    PARAMETER["central_meridian",-123.0],
>    PARAMETER["scale_factor",0.9996],
>    PARAMETER["latitude_of_origin",0.0],
>    UNIT["Meter",1.0]]
>Origin = (555230.000000000000000,5048039.000000000000000)
>Pixel Size = (1.000009239300614,-1.000000000000000)
>Metadata:
>  IMAGE__INPUT_NAME=C:\DOCUME~1\PAULW~2.ATT\LOCALS~1\Temp\img1AE.tmp
>  IMAGE__INPUT_FILE_SIZE=7619508.000000
>  GEO__spref_horizsys_cordsysn_geogcsn=GCS_North_American_1983
>  GEO__spref_horizsys_cordsysn_projcsn=NAD_1983_UTM_Zone_10N
>  GEO__spref_horizsys_planar_gridsys_gridsysn=Universal Transverse
>Mercator
>  GEO__spref_horizsys_planar_gridsys_utm_utmzone=10
>  GEO__spref_horizsys_planar_gridsys_utm_transmer_sfctrmer=0.999600
>  GEO__spref_horizsys_planar_gridsys_utm_transmer_longcm=-123.000000
>  GEO__spref_horizsys_planar_gridsys_utm_transmer_latprjo=0.000000
>  GEO__spref_horizsys_planar_gridsys_utm_transmer_feast=500000.000000
>  GEO__spref_horizsys_planar_gridsys_utm_transmer_fnorth=0.000000
>  GEO__spref_horizsys_planar_planci_plance=row and column
>  GEO__spref_horizsys_planar_planci_plandu=meters
>  GEO__spref_horizsys_planar_planci_coordrep_absres=1.000009
>  GEO__spref_horizsys_planar_planci_coordrep_ordres=1.000000
>  GEO__spref_horizsys_geodetic_horizdn=North American Datum of 1983
>  GEO__spref_horizsys_geodetic_ellips=Geodetic Reference System 80
>  GEO__spref_horizsys_geodetic_semiaxis=6378137.000000
>  GEO__spref_horizsys_geodetic_denflat=298.257222
>  IMAGE__COMPRESSION_VERSION=1,6,3
>  IMAGE__TARGET_COMPRESSION_RATIO=20.000000
>  IMAGE__COMPRESSION_NLEV=6
>  IMAGE__COMPRESSION_WEIGHT=4.000000
>  IMAGE__COMPRESSION_GAMMA=2.000000
>  IMAGE__COMPRESSION_BLOCK_SIZE=512
>  IMAGE__CREATION_DATE=Wed Dec 02 14:18:16 2009
>
>  IMAGE__NO_DITHER=0
>  VERSION=MG2
>  IMAGE__WIDTH=1742
>  IMAGE__HEIGHT=1458
>  IMAGE__NO_DATA_VALUE=15,172,40
>  IMAGE__TRANSPARENT_DATA_VALUE=0,0,176
>  IMAGE__COLOR_SCHEME=0
>  IMAGE__DATA_TYPE=0
>  IMAGE__XY_ORIGIN=555230.500005,5048038.500000
>  IMAGE__X_RESOLUTION=1.000009
>  IMAGE__Y_RESOLUTION=1.000000
>Image Structure Metadata:
>  INTERLEAVE=PIXEL
>Corner Coordinates:
>Upper Left  (  555230.000, 5048039.000) (122d17'31.28"W, 45d35' 1.32"N)
>Lower Left  (  555230.000, 5046581.000) (122d17'31.87"W, 45d34'14.07"N)
>Upper Right (  556972.016, 5048039.000) (122d16'10.90"W, 45d35' 0.81"N)
>Lower Right (  556972.016, 5046581.000) (122d16'11.51"W, 45d34'13.57"N)
>Center      (  556101.008, 5047310.000) (122d16'51.39"W, 45d34'37.44"N)
>Band 1 Block=1742x128 Type=Byte, ColorInterp=Red
>  Minimum=60.000, Maximum=222.000, Mean=119.606, StdDev=36.132
>  Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23
>Band 2 Block=1742x128 Type=Byte, ColorInterp=Green
>  Minimum=84.000, Maximum=220.000, Mean=133.956, StdDev=21.319
>  Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23
>Band 3 Block=1742x128 Type=Byte, ColorInterp=Blue
>  Minimum=95.000, Maximum=205.000, Mean=119.015, StdDev=12.620
>  Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23
>-------------------------------------------------------
>
>And finally here is the map file:
>
>-------------------------------------------------------
>MAP
>OUTPUTFORMAT
>    NAME agg
>    DRIVER AGG/PNG
>    IMAGEMODE RGB
>    FORMATOPTION "INTERLACE=false"
>    MIMETYPE "image/png"
>END
>NAME "MrSID"
>IMAGETYPE agg
>MAXSIZE 4000
>SIZE 800 800
>IMAGECOLOR "#B3C6D4"
>WEB
>    METADATA
>      ows_enable_request "*"
>      labelcache_map_edge_buffer "-10"
>      wms_srs "EPSG:4326 EPSG:4269"
>      wms_title "MrSID"
>      wms_onlineresource
>"http://10.10.10.206/cgi-bin/mapserv.exe?map=E:/osm4326/mrsid.map"
>    END
>END
>CONFIG "PROJ_LIB" "C:\ms4w\proj\nad"
>CONFIG "MS_ERRORFILE" "E:\errors.txt"
>DEBUG 5
>SHAPEPATH "E:/osm4326/MrSID/"
>EXTENT -123.0 45.0 -122.0 46.0
>UNITS dd
>PROJECTION
>"init=epsg:4326"
>END
>LAYER
>        METADATA
>          wms_title "A"
>          wms_group_title "default"
>          wms_srs "EPSG:4269"
>          wms_extent "555230 5046581 556972 5048039"
>        END
>    TYPE RASTER
>    STATUS ON
>    GROUP "default"
>    NAME "A"
>    PROJECTION
>        "init=epsg:4269"
>    END
>        EXTENT 555230 5046581 556972 5048039
>    DATA "wa.sid.sid"
>END
>END
>-------------------------------------------------------
>
>
>________________________________________
>From: Rahkonen Jukka [Jukka.Rahkonen at mmmtike.fi]
>Sent: Thursday, August 18, 2011 9:51 PM
>To: Ed Resnick; 'mapserver-users at lists.osgeo.org'
>Subject: <Ext> Re: [mapserver-users] Problem displaying a NAD83 tile in
>WGS84 (or via   WMS)
>
>Hi,
>
>Could you give a bit more information? Your use case is the most common
>that exists and all instructions should be at
>http://mapserver.org/ogc/wms_server.html
>It would be good to see the gdalinfo report of your image and your
>mapfile and the exact WMS request you were using including the WMS
>version. At least these parts of mapfile are important
>
>MAP level: extent, projection and metadata (wms_srs and
>wms_inable_request at least)
>LAYER level projection.
>
>I can see some really odd LatLonBoundingBoxes in my own MS 6.0 WMS
>service too. I will investigate them a bit further. If it is just that
>the Mapserver is creating the GetCapabilities document wrong then the WMS
>service should still be usable.
>
>-Jukka Rahkonen-
>
>
>
>
>> -----Alkuperäinen viesti-----
>> Lähettäjä: mapserver-users-bounces at lists.osgeo.org
>> [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Ed Resnick
>> Lähetetty: 19. elokuuta 2011 2:47
>> Vastaanottaja: mapserver-users at lists.osgeo.org
>> Aihe: [mapserver-users] Problem displaying a NAD83 tile in
>> WGS84 (or via WMS)
>>
>> I have a MrSID file in NAD83 projection (EPGS 4269) which I
>> want to display via WMS in WGS84 projection (EPGS 4326). I
>> cannot get this to work.
>>
>> I have tried setting the entire map-file's projection to
>> 4269, with the extent specified in that projection (in
>> meters), and shp2img shows the image, but attempting to view
>> it via WMS (requesting the 4326 projection) does not work,
>> and the GetCapabilities response file is completely wrong -
>> the LatLonBoundingBox tags actually list the 4269 bounding
>> box in meters. Excerpt:
>>
>>     <LatLonBoundingBox minx="555230" miny="5.04658e+006"
>> maxx="556972" maxy="5.04804e+006" />
>>     <BoundingBox SRS="EPSG:4269"
>>                 minx="555230" miny="5.04658e+006"
>> maxx="556972" maxy="5.04804e+006" />
>>
>> The BoundingBox is correct; the LatLonBoundingBox obviously is not.
>>
>> I have also tried specifying 4326 as the map projection and
>> 4269 as the layer projection, with the map's extent in
>> lat/lon and the layer's extent as the above value (meters).
>> Not only did this not work, but even shp2img just shows a
>> blank image. If I change the map's extent to the value in
>> meters (even though its projection is specified as 4326),
>> then shp2img works, but the WMS feed still does not; the
>> GetCapabilities still is wrong.
>>
>> Is MapServer simply buggy or is there a
>> solution?_______________________________________________
>> 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



More information about the mapserver-users mailing list