Re: VS: [mapserver-users] Re: WCS Geotiff output issue

2011-11-09 Thread Havard Tveite

This behaviour is unexpected, so it might be a bug.
I would suggest that you file a ticket on the probable bug
instead.

I have added a "note" in the WCS server documentation (where
it is stated that this probably is due to a bug).

Håvard

On 11/8/2011 10:17 PM, Rahkonen Jukka wrote:

Hi,

Would you mind making a trac request http://trac.osgeo.org/mapserver/ for 
improving WCS server documentation http://www.mapserver.org/ogc/wcs_server.html 
so that Configuring Your Mapfile to Serve WCS Layers clearly says that layer 
must have / it is strongly recommended to include projection object?
In WMS server documentation is is written "Here is the list of parameters and 
metadata items that usually optional with MapServer, but are required (or strongly 
recommended) for a WMS configuration:"

-Jukka Rahkonen-


Lähettäjä: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] käyttäjän Guillaume Loiselle 
[loiselle.guilla...@gmail.com] puolesta
Lähetetty: 8. marraskuuta 2011 15:58
Vastaanottaja: mapserver-users@lists.osgeo.org
Aihe: Re: VS: [mapserver-users] Re: WCS Geotiff output issue

Hi,

Wow! Adding a projection object on layer level fixed the problem. I was sure 
the map level projection object was used when a layer was lacking it. Now the 
result is the same than that of the WMS GeoTiff output (except for the 
background color but that's not an issue).

Thanks a lot for your help!
Guillaume Loiselle


2011/11/7 Rahkonen 
Jukkamailto:jukka.rahko...@mmmtike.fi>>
Hi,

Mapfile looks good to me. I fear I have only two suggestions left:
- try adding projection also to the layer even it should use the map level 
projection by default
- forget HDF5 for a moment and use some geotiff instead to check if there are 
some oddities due to source data format

-Jukka Rahkonen-


Lähettäjä: 
mapserver-users-boun...@lists.osgeo.org
  
[mailto:mapserver-users-boun...@lists.osgeo.org]
 Puolesta Guillaume Loiselle
Lähetetty: 7. marraskuuta 2011 23:07
Vastaanottaja: 
mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] Re: WCS Geotiff output issue

Hi,

Both mapfile and datasource are available in the first email I sent.

http://lists.osgeo.org/pipermail/mapserver-users/2011-November/070670.html

Filenames appear to be a little bit messed up but the data itself is fine. I 
don't know why it went so wrong.

Mapfile : 
http://lists.osgeo.org/pipermail/mapserver-users/attachments/2004/78e5fa24/2011102811-0001.obj

Data (HDF5 format) : 
http://lists.osgeo.org/pipermail/mapserver-users/attachments/2004/78e5fa24/data-0001.obj

I intend to stick with 1.0.0 indeed. At least until it works... I will look up 
1.1.0's details in due time.




2011/11/7 Rahkonen 
Jukkamailto:jukka.rahko...@mmmtike.fi>>
Pity that is was not just version mismatch.  Could it be possible to see your 
mapfile and info about the datasource?
Stay with version 1.0.0 while testing. With version 1.1.0 you must give 
EPSG:4326 coordinates in Northing-Easting order which can make things more 
complicated.

-Jukka Rahkonen-

Guillaume Loiselle wrote:

Hi,

I'm afraid it isn't. I didn't notice the request version I sent was a "mixed" 
one but I tried Coverage on 1.0.0 and Identifier on 1.1.0 as well and the result was 
basically the same.
Here is the 1.1.0 version of the error :



http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:ows="http://www.opengis.net/ows/1.1"; version="1.1.0" xml:lang="en-US" 
xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd";>
  

msWCSGetCoverage(): WCS server error. Requested BBOX 
(-178.804111261525,2802.84894277903,179.578125552223,2907.18853507175) is outside 
requested coverage BBOX (-70,45,-55,52)
  



I of course spent a lot of time on the WCS server documentation page. I saw no 
reference to such a problem, though. My request,

http://localhost/cgi-bin/mapserv.exe?
map=D:/Guillaume/ProjetCourantsGlaces/WCSproblem/2011102811.map&
SERVICE=WCS&
VERSION=1.0.0&
REQUEST=GetCoverage&
COVERAGE=thelayer&
CRS=EPSG:4326&
BBOX=-67.5,48.922499263758255,-64.6875,50.736455137010665&
WIDTH=256&
HEIGHT=256&
FORMAT=GTiff

is formatted the same way the example is :

http://my.host.com/cgi-bin/mapserv?
map=mywcs.map&
SERVICE=wcs&
VERSION=1.0.0&
REQUEST=GetCoverage&
coverage=bathymetry&
CRS=EPSG:42304&
BBOX=-220,-712631,3072800,384&
WIDTH=3199&
HEIGHT=2833&
FORMAT=GTiff


My mapfile contains every required attribute.

Thank you.
Guillaume Loiselle


2011/11/7 Rahkonen 
Jukkamailto:jukka.rahko...@mmmtike.fi>>>
Hi,

See examples in http://www.mapserver.org/ogc/wcs_server.html and try to avoid mixing versions 1.0.0 
and 1.1.0. Let's hope using "co

Re: VS: [mapserver-users] Re: WCS Geotiff output issue

2011-11-09 Thread Frank Warmerdam

On 11-11-09 12:07 AM, Havard Tveite wrote:

This behaviour is unexpected, so it might be a bug.
I would suggest that you file a ticket on the probable bug
instead.

I have added a "note" in the WCS server documentation (where
it is stated that this probably is due to a bug).

Håvard


I would appreciate a ticket, and to be cc:ed on it.  I suspect there
is a bug and I'd like to look into rather than just documenting around it.

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/warmerda
and watch the world go round - Rush| Geospatial Software Developer

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


RE: [mapserver-users] Problem with queryByPoint

2011-11-09 Thread Bistrais, Bob
Problem solved (slapping myself on forehead)- I forgot to include a
template with the queried layer.

 



From: Bistrais, Bob 
Sent: Tuesday, November 08, 2011 2:19 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Problem with queryByPoint

 

Mapserver 5.6/MS4W 3.2.1-

I am trying to some  Php-Mapscript code to do a QueryByPoint on a line
shapefile.  For testing, I've created a new point object, and have hard
coded the x,y at a known location. 

 

No matter what I do, the query keeps returning 0 records found.  I set a
generous search radius, still no go.  Any suggestions?

 

Not sure if this code sample will be useful, but (data is in EPSG 26919,
UTM meters):

 

 

$myMap = ms_newMapObj("/ms4w/apps/broadband/maps/broadband.map");

$selectLayer = $myMap->getLayerByName("broadband");

 

$xCoord = 434802;

$yCoord = 4907306;

 

$myPoint = ms_newPointObj();

$myPoint->setXY($xCoord,$yCoord);

$selectLayer->queryByPoint($myPoint,MS_MULTIPLE,20); //---Returns 0
results

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


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

2011-11-09 Thread kablukiw
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@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 Fawcett, David (MPCA)
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.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@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
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)
 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.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@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 Even Rouault
Le mercredi 09 novembre 2011 20:46:54, Kevin Ward a écrit :
> 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?

PNG has no native support for georeferencing. If it is important for you, then 
consider using GeoTIFF as output format with GDAL/GTiff : see 
http://mapserver.org/mapfile/outputformat.html

> 
> Kevin
> 
> On Wed, Nov 9, 2011 at 11:35 AM, Fawcett, David (MPCA)
> 
>  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.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@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


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

2011-11-09 Thread Fawcett, David (MPCA)
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)
 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.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@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 Rahkonen Jukka
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)
 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.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@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


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

2011-11-09 Thread Fawcett, David (MPCA)
In MapServer, if you set a MAP level projection and extent and don't specify a 
projection for a layer, MapServer assumes that the layer has the same 
projection as the MAP.

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


___
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
 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)
>  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.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@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
ma

[mapserver-users] displaying ERDAS .img files with mapserver

2011-11-09 Thread Puneet Kishor
I am looking for some recent tutes on rendering ERDAS .img files. A bit of the 
background:

I inherited these data as an ArcMap .mdb dataset which has metadata.xml, a few 
other sundry files, and inside a directory with .idb extension, many more 
folders, each containing a .img file, and a corresponding .rrd and .xml file. A 
simple layer definition like so allows me to get the tiles displaying in the 
browser (via OpenLayers) --

LAYER
NAME"lyr"
TYPERASTER
DATA"foo.img"
PROCESSING "SCALE=AUTO"
STATUS  ON
OFFSITE 0 0 0
END

But, the tiles don't make for a continuous image. I can see the tile 
boundaries. Besides correcting that, I would also like to be able to apply 
different color ramps, and, finally, I would like to be able to query either 
single pixel values (click on the map and get the underlying value), or some 
kind of stats on pixels in an area.

Would appreciate any tutorials/write-ups if anyone has done this.

Many thanks,

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


[mapserver-users] Two Layers not matching up when one is reprojected

2011-11-09 Thread Matthew Pettis
Hi,

I am reprojecting a layer of Minnesota county boundaries from epsg:26915 to
be commensurate with a google maps overlay (epsg:3857 aka epsg:900913).
 The county overlay is shifted down from the Google Maps map by I'm
guessing to be about 10 miles.  Relevant links to map with Openlayers,
straight mapserver map of counties, and the contents of the mapfile for the
counties are below.

My question is:  Do I have a data problem, or is it a mapserver
reprojection problem? Or is it a proj4 reprojection problem?

In addition, I am including the epsg codes and the proj.4 equivalents I got
from spatialreference.org and stuck into my proj/epsg file:

# got proj/epsg entries from proj4 link at:
http://spatialreference.org/ref/sr-org/6864/ :
<3785> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
<3857> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
<900913> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>

Help is much appreciated,

Thanks,
Matt

--
Map Overlays: http://209.20.85.148/scratch/google-state.htm

Straight mapserver output of county overlay:
http://209.20.85.148/cgi-bin/mapserv?mode=map&map=/var/www/scratch/county-epsg900913.map

County Map (epsg:26916) mapfile (county-epsg900913.map):
=

MAP

# Map attributes

IMAGETYPE   PNG

# epsg:3785 http://spatialreference.org/ref/epsg/3785/proj4/
# Convert
EXTENT -10779406.34 5378456.81 -9951631.67 6334157.39
PROJECTION
"init=epsg:3857"
END

SIZE700 700
IMAGECOLOR  244 244 244
FONTSET "/home/matt/votevis/mapserver-files/fonts/fonts.list"




# Layers



#---
# Counties
# Renders different thickness borders at different scales
#---
LAYER
NAME"county"
DATA
 "/home/matt/votevis/MN/2010-election/shp/shp_counties"
STATUS  default
TYPEpolygon

PROJECTION
"init=epsg:26915"
END

CLASS
NAME"county_lg"
STYLE
OUTLINECOLOR  111 111 111
COLOR -1 -1 -1
WIDTH 3
END
END

END # Layer county

END # MAP


-- 
Do not seek to follow in the footsteps of the wise men of old. Seek what
they sought.

- Matsuo Munefusa (”Basho”)
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Two Layers not matching up when one is reprojected

2011-11-09 Thread Stephen Woodbridge

I use the following definition:

<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 
+x_0=0.0 +y_0=0 +k=1.0 +units=m +over +nadgrids=@null +no_defs  <>


and have never gad a problem. Give it a try.

-Steve W

On 11/9/2011 11:06 PM, Matthew Pettis wrote:

Hi,

I am reprojecting a layer of Minnesota county boundaries from epsg:26915
to be commensurate with a google maps overlay (epsg:3857 aka
epsg:900913).  The county overlay is shifted down from the Google Maps
map by I'm guessing to be about 10 miles.  Relevant links to map with
Openlayers, straight mapserver map of counties, and the contents of the
mapfile for the counties are below.

My question is:  Do I have a data problem, or is it a mapserver
reprojection problem? Or is it a proj4 reprojection problem?

In addition, I am including the epsg codes and the proj.4 equivalents I
got from spatialreference.org  and stuck
into my proj/epsg file:

# got proj/epsg entries from proj4 link at:
http://spatialreference.org/ref/sr-org/6864/ :
<3785> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
<3857> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>
<900913> +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=6378137 +b=6378137
+towgs84=0,0,0,0,0,0,0 +units=m +no_defs <>

Help is much appreciated,

Thanks,
Matt

--
Map Overlays: http://209.20.85.148/scratch/google-state.htm

Straight mapserver output of county overlay:
http://209.20.85.148/cgi-bin/mapserv?mode=map&map=/var/www/scratch/county-epsg900913.map


County Map (epsg:26916) mapfile (county-epsg900913.map):
=

MAP
 
 # Map attributes
 
 IMAGETYPE   PNG

 # epsg:3785 http://spatialreference.org/ref/epsg/3785/proj4/
 # Convert
 EXTENT -10779406.34 5378456.81 -9951631.67 6334157.39
 PROJECTION
"init=epsg:3857"
 END

 SIZE700 700
 IMAGECOLOR  244 244 244
 FONTSET "/home/matt/votevis/mapserver-files/fonts/fonts.list"



 
 # Layers
 


 #---
 # Counties
 # Renders different thickness borders at different scales
 #---
 LAYER
 NAME "county"
 DATA "/home/matt/votevis/MN/2010-election/shp/shp_counties"
 STATUS  default
 TYPEpolygon

 PROJECTION
"init=epsg:26915"
 END

 CLASS
 NAME "county_lg"
 STYLE
 OUTLINECOLOR  111 111 111
 COLOR -1 -1 -1
 WIDTH 3
 END
 END

 END # Layer county

END # MAP


--
Do not seek to follow in the footsteps of the wise men of old. Seek what
they sought.

- Matsuo Munefusa (”Basho”)


___
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] GAP problem on MapServer 6.0.1

2011-11-09 Thread Jackey Cheung
Hi all,

We are trying to render line direction on 6.0.1. However, there are
something weird with it.


SYMBOL
  NAME  "arrow_right"
  TYPE VECTOR
  POINTS
5 6
27 6
25 0
35 7.5
25 14
27 8
5 8
5 6
  END
  FILLED  TRUE
END


LAYER
  NAME  "traffic_direction"
  STATUSDEFAULT
  TYPE  LINE
  MAXSCALEDENOM 5000

  CONNECTIONTYPEPOSTGIS
  PROCESSING"CLOSE_CONNECTION=DEFER"
  CONNECTION"host=xxx dbname=*** user=xx
password="
  DATA  "geom FROM view_render_traffic_direction USING
UNIQUE oid USING SRID=4326"

  CLASS
NAME"Traffic Direction"
STYLE
  ANGLE AUTO
  SYMBOL"arrow_right"
  SIZE  6
  COLOR 0 0 250
  GAP   -200
  #GEOMTRANSFORM "start"
END
  END
END


The layer above is rendered as 1.PNG. We've checked that there are
only one line (ring) there, but arrows are rendered problematic.
Then we've tried to change GEOMTRANSFORM to "start" or "end", then
rings seem OK, but all arrows at intersections got crossed, as 2.PNG.
We've also tried to use OFFSET and GAP with positive and negative
combinations, but none can solve the problem.

Can anyone shed some light for us? Thanks in advance.
<><>___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: Two Layers not matching up when one is reprojected

2011-11-09 Thread Matt Pettis
That worked perfectly, thank you!

Just for posterity, is there an explanation you know of why the
spatialreference.org proj4 parameters didn't work?  I took the fact that I
could exchange epsg:3857 with epsg:900913 from the book "OpenLayers 2.10",
but it appears that it doesn't work...

Thanks a ton again for your help!

Matt

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Two-Layers-not-matching-up-when-one-is-reprojected-tp6980480p6980632.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