From tony.baylis at resexmap.com.au Tue Dec 1 03:03:18 2009
From: tony.baylis at resexmap.com.au (Tony Baylis)
Date: Tue, 01 Dec 2009 21:03:18 +1000
Subject: [mapserver-users] WMS Client and SLD
Message-ID: <4B14F7F6.4070308@resexmap.com.au>
All,
This is the first time I have tried styling external WMS data using SLD
and cannot get the returned data/image in the desired style. Below is
the simplified mapfile and SLD file. If anyone has any pointers I'd be
more than grateful. Please note that the link to the SLD file does work
with the following return: 56
APPLICATION STATUS #ff0000 GRANTED STATUS #ffffbe
Tony
Mapfile:
#
# Start of map file
#
MAP
NAME qld_tenement
STATUS ON
SIZE 800 500
EXTENT 140 -23.25 150 -17
UNITS DD
SHAPEPATH "/var/www/remwms/htdocs/data"
IMAGECOLOR 192 213 255
SYMBOLSET "/var/www/remwms/htdocs/includes/symbols.sym"
FONTSET "/usr/share/fonts/truetype/font.list"
DEBUG 2
CONFIG "MS_ERRORFILE" "/var/www/ms_tmp/ms_error.txt"
#IMAGETYPE PNG
OUTPUTFORMAT
NAME "AGGA"
MIMETYPE "image/png"
DRIVER "AGG/PNG"
EXTENSION "png"
IMAGEMODE RGBA
TRANSPARENT ON
END
#
# Start of web interface definition
#
WEB
IMAGEPATH "/var/www/ms_tmp/"
IMAGEURL "http://mapserver1/ms_tmp/"
END
#
# Assign Projection
#
PROJECTION
"init=epsg:4283"
END
LAYER
NAME "EPM"
TYPE RASTER
STATUS ON
CONNECTIONTYPE WMS
CONNECTION
'http://atlas.information.qld.gov.au/ArcGIS/services/IRTM/MapServer/WMSServer?'
METADATA
"wms_srs" "EPSG:4326"
"wms_name" "56"
"wms_server_version" "1.1.1"
"wms_format" "image/png"
"wms_title" "EPM"
"wms_include_items" "all"
"wms_sld_url" "http://mapserver1/remwms/includes/sld/publicsld.xml"
"wms_legend_graphic" "0"
"wms_feature_info_mime_type" "text/plain"
END
END
END
SLD File:
56APPLICATIONSTATUS#ff0000GRANTEDSTATUS#ffffbe
--
Tony Baylis
Spatial Information Specialist
Resource and Exploration Mapping
Suite 8, 290 Boundary St
Spring Hill QLD 4000
Ph 3832 1600
Fax 3832 1603
Mob 0419 759 131
Email tony.baylis at resexmap.com.au
www resexmap.com.au
From jmckenna at gatewaygeomatics.com Tue Dec 1 05:20:36 2009
From: jmckenna at gatewaygeomatics.com (Jeff McKenna)
Date: Tue, 01 Dec 2009 09:20:36 -0400
Subject: [mapserver-users] Fatal error: Call to undefined function dl()
in C:\ms4w\Apache\htdocs\phpmapscript.php on line 5
In-Reply-To: <49184.1259645866@ttkmaps.com>
References: <49184.1259645866@ttkmaps.com>
Message-ID: <4B151824.6000106@gatewaygeomatics.com>
geetha at ttkmaps.com wrote:
>
>
> Hi all,
>
>
>
> I tried to install php/mapscript in windows,I get the above error.I
> use mapserver version 5.4.2,Apache 2.2.11,PHP 5.3.Php works fine.Im able
> to run files with .php extension,but the below coding produces error:
>
>
>
>
> dl("php_mapscript.dll");
> phpinfo();
> ?>
>
>
>
>
> My php_mapscript.dll is in ..php/ext folder by default.My php.ini &
> php.exe is in /ms4w/Apache/cgi-bin.Is there any other dll i should
> add?It is said php/mapscript is preconfigured right...then what might be
> wrong?Thanks in advance.
>
> NewUser.
>
Hello NewUser,
Since PHP version 5.3.0 you can no longer use PHP's dl() function (it
has been deprecated and removed as noted in
http://ca2.php.net/manual/en/function.dl.php).
In MS4W version 3.0 the mapscript dll is already enabled, through the
php.ini
If you have any questions regarding MS4W, please use the MS4W email list
(subscribe at http://lists.maptools.org/mailman/listinfo/ms4w-users).
-jeff
--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/
From jmckenna at gatewaygeomatics.com Tue Dec 1 05:27:39 2009
From: jmckenna at gatewaygeomatics.com (Jeff McKenna)
Date: Tue, 01 Dec 2009 09:27:39 -0400
Subject: [mapserver-users] Fatal error: Call to undefined function dl()
in C:\ms4w\Apache\htdocs\phpmapscript.php on line 5
In-Reply-To: <1259651929711-4092286.post@n2.nabble.com>
References: <49184.1259645866@ttkmaps.com> <1259647188.778.6.camel@milo-desktop.localdomain> <1259650303392-4092227.post@n2.nabble.com> <1259651234.870.13.camel@milo-desktop.localdomain>
<1259651929711-4092286.post@n2.nabble.com>
Message-ID: <4B1519CB.5030509@gatewaygeomatics.com>
new wrote:
> No,i am still not able to get it.It was given in
>
> http://www.maptools.org/ms4w/index.phtml?page=README_INSTALL.html
>
> troubleshooting part, to check for dll errors using cmd prompt.I did so,but
> it gives file info.
>
> newuser.
Remove all dl() functions from your PHP scripts, and load those dlls
through your php.ini instead, and your errors will go away.
If you have any questions regarding MS4W, please use the MS4W email list
(subscribe at http://lists.maptools.org/mailman/listinfo/ms4w-users).
-jeff
--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/
From fla83tn at libero.it Tue Dec 1 06:06:35 2009
From: fla83tn at libero.it (fla83tn at libero.it)
Date: Tue, 1 Dec 2009 15:06:35 +0100 (CET)
Subject: [mapserver-users] WMS: raster's x and y pixel dimension
Message-ID: <29455193.1348401259676395133.JavaMail.defaultUser@defaultHost>
Hi to all,
I've a problem with the loading of a raster image via WMS (1.3.0).
To load the layers of my project I use gvSIG. If I load my digital elevation
model (DEM) directly from filesystem (which is a HFA/Erdas Image file - .img),
x and y pixel dimension are fixed to 2.5 and -2.5 meters respectively, and
fixed are also the width and height attributes.
If I load the layer from
Mapserver's WMS instead, x and y pixel dimension change as I zoom in or out (i.
e. changing the width
and height parameters of the getMap request).
Is there
the possibility to tell the wms client that x and y pixel dimension are
constant and should never be calculated?
Here's my layer definition and the
tiff outputformat definition:
OUTPUTFORMAT
NAME GTiff
DRIVER "GDAL/GTiff"
MIMETYPE "image/tiff"
IMAGEMODE FLOAT32
EXTENSION "tif"
END
LAYER
NAME
"my_dem"
EXTENT 669913.75 5143998.75 678313.75 5150701.25
METADATA
"wms_title" "my_dem" ##required
"wms_extent" "669913.75 5143998.75
678313.75 5150701.25"
"gml_include_items" "all"
END
TYPE RASTER
STATUS ON
PROJECTION
"init=epsg:25832"
END
DATA "my_dem.tiff"
PROCESSING "NODATA=-9999"
PROCESSING "SCALE=227.23,1741.15"
PROCESSING
"SCALE_BUCKETS=2000"
PROCESSING "BANDS=1"
DEBUG on
DUMP true
TEMPLATE "void" # enable queryable attribute on the layer
END
Any help is
appreciated,
Flavio
From Jukka.Rahkonen at mmmtike.fi Tue Dec 1 06:16:19 2009
From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka)
Date: Tue, 1 Dec 2009 16:16:19 +0200
Subject: [mapserver-users] WMS: raster's x and y pixel dimension
In-Reply-To: <29455193.1348401259676395133.JavaMail.defaultUser@defaultHost>
References: <29455193.1348401259676395133.JavaMail.defaultUser@defaultHost>
Message-ID:
Hi,
Width, height and BBOX are all compulsory parameters in WMS GetMap
request and Mapserver is sending an image according to the request. If
you want to be able to control the pixel size easily, without making WMS
client to balance the BBOX and image size in pixels, consider using WCS.
One way to make a WCS request is
http://server.fi/cgi-bin/mapserver_wcs?SERVICE=WCS&VERSION=1.0.0&REQUEST
=GetCoverage&COVERAGE=DEM&FORMAT=image/tiff&CRS=EPSG:3067&ResX=1.0&ResY=
1.0&BBOX=533652,6973434,534658,6974219
You can see parameters ResX and ResY which are used for controlling the
pixel size.
-Jukka Rahkonen-
fla83tn wrote:
>
> Hi to all,
> I've a problem with the loading of a raster image via WMS (1.3.0).
>
> To load the layers of my project I use gvSIG. If I load my
> digital elevation model (DEM) directly from filesystem (which
> is a HFA/Erdas Image file - .img),
>
> x and y pixel dimension are fixed to 2.5 and -2.5 meters
> respectively, and fixed are also the width and height attributes.
> If I load the layer from
> Mapserver's WMS instead, x and y pixel dimension change as I
> zoom in or out (i.
> e. changing the width
> and height parameters of the getMap request).
> Is there
> the possibility to tell the wms client that x and y pixel
> dimension are constant and should never be calculated?
>
> Here's my layer definition and the
> tiff outputformat definition:
>
> OUTPUTFORMAT
> NAME GTiff
> DRIVER "GDAL/GTiff"
>
> MIMETYPE "image/tiff"
> IMAGEMODE FLOAT32
> EXTENSION "tif"
> END
>
> LAYER
> NAME
> "my_dem"
> EXTENT 669913.75 5143998.75 678313.75 5150701.25
>
> METADATA
>
> "wms_title" "my_dem" ##required
> "wms_extent" "669913.75 5143998.75
> 678313.75 5150701.25"
> "gml_include_items" "all"
> END
> TYPE RASTER
>
> STATUS ON
> PROJECTION
> "init=epsg:25832"
> END
>
> DATA "my_dem.tiff"
>
> PROCESSING "NODATA=-9999"
> PROCESSING "SCALE=227.23,1741.15"
> PROCESSING
> "SCALE_BUCKETS=2000"
> PROCESSING "BANDS=1"
>
> DEBUG on
> DUMP true
>
> TEMPLATE "void" # enable queryable attribute on the layer END
>
> Any help is
> appreciated,
> Flavio
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
From adube at mapgears.com Tue Dec 1 06:17:28 2009
From: adube at mapgears.com (Alexandre Dube)
Date: Tue, 01 Dec 2009 09:17:28 -0500
Subject: [mapserver-users] Black background with palette
In-Reply-To: <4B140074.5157.008F.0@dnr.state.mn.us>
References: <4B13E157.7050709@mapgears.com> <4B13E554.2020702@swoodbridge.com>
<4B13E65E.7030404@swoodbridge.com> <4B13E79C.2030302@mapgears.com>
<4B13FA74.9050107@swoodbridge.com> <4B141344.3040509@mapgears.com>
<4B140074.5157.008F.0@dnr.state.mn.us>
Message-ID: <4B152578.1060001@mapgears.com>
Steve Lime wrote:
> Are you compiling with the experimental png support?
>
No, but I just tried with it and it didn't resolved the issue. I noticed
a slight change of the image quality though.
Thanks,
--
Alexandre Dub?
Mapgears
www.mapgears.com
From Steve.Lime at dnr.state.mn.us Tue Dec 1 06:36:18 2009
From: Steve.Lime at dnr.state.mn.us (Steve Lime)
Date: Tue, 01 Dec 2009 08:36:18 -0600
Subject: [mapserver-users] map_web_template
Message-ID: <4B14D5830200008F0002B4FF@co5.dnr.state.mn.us>
Hi Lee: There's been a lot of change in that area in 5.x series. I believe the
syntax is:
Steve
>>> Lee 11/29/09 9:42 PM >>>
Greetings,
I have one mapfile and use many template files to read from the mapfile. In Mapserver 4, I could use templatepattern '.*'
in the mapfile, and from an html form send a variable like this;
In Mapserver 5 it doesn't seem to work ( loadWeb(): Unknown identifier ).
Is it possible to pass the name of an HTML template in Mapserver 5 using an HTML form? And if it is, then how?
Thanks
Lee
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
From fla83tn at libero.it Tue Dec 1 07:31:00 2009
From: fla83tn at libero.it (fla83tn at libero.it)
Date: Tue, 1 Dec 2009 16:31:00 +0100 (CET)
Subject: [mapserver-users] WMS: raster's x and y pixel dimension
Message-ID: <14109062.1360441259681460769.JavaMail.defaultUser@defaultHost>
Thank you Jukka for the quick reply. Now I'm able to correctly generate z-
dimension from DEM layer.
However, since I'm new to GIS, I'm not able to
understand the differences between WCS and WMS..could
you briefly summarize
the goal of the two approach?
And, as last question , should I set the resX and
resY parameters from client or could I embed them directly into the map file?
Best regards,
Flavio
>Hi,
>
>Width, height and BBOX are all compulsory
parameters in WMS GetMap
>request and Mapserver is sending an image according
to the request. If
>you want to be able to control the pixel size easily,
without making WMS
>client to balance the BBOX and image size in pixels,
consider using WCS.
>One way to make a WCS request is
>
>http://server.fi/cgi-
bin/mapserver_wcs?SERVICE=WCS&VERSION=1.0.0&REQUEST
>=GetCoverage&COVERAGE=DEM&FORMAT=image/tiff&CRS=EPSG:3067&ResX=1.0&ResY=
>1.
0&BBOX=533652,6973434,534658,6974219
>
>You can see parameters ResX and ResY
which are used for controlling the
>pixel size.
>
>-Jukka Rahkonen-
>
>fla83tn
wrote:
>
>>
>> Hi to all,
>> I've a problem with the loading of a raster
image via WMS (1.3.0).
>>
>> To load the layers of my project I use gvSIG. If
I load my
>> digital elevation model (DEM) directly from filesystem (which
>>
is a HFA/Erdas Image file - .img),
>>
>> x and y pixel dimension are fixed to
2.5 and -2.5 meters
>> respectively, and fixed are also the width and height
attributes.
>> If I load the layer from
>> Mapserver's WMS instead, x and y
pixel dimension change as I
>> zoom in or out (i.
>> e. changing the width
>>
and height parameters of the getMap request).
>> Is there
>> the possibility
to tell the wms client that x and y pixel
>> dimension are constant and should
never be calculated?
>>
>> Here's my layer definition and the
>> tiff
outputformat definition:
>>
>> OUTPUTFORMAT
>> NAME GTiff
>> DRIVER
"GDAL/GTiff"
>>
>> MIMETYPE "image/tiff"
>> IMAGEMODE FLOAT32
>>
EXTENSION "tif"
>> END
>>
>> LAYER
>> NAME
>> "my_dem"
>> EXTENT 669913.75
5143998.75 678313.75 5150701.25
>>
>> METADATA
>>
>> "wms_title"
"my_dem" ##required
>> "wms_extent" "669913.75 5143998.75
>> 678313.75
5150701.25"
>> "gml_include_items" "all"
>> END
>> TYPE RASTER
>>
>>
STATUS ON
>> PROJECTION
>> "init=epsg:25832"
>> END
>>
>>
DATA "my_dem.tiff"
>>
>> PROCESSING "NODATA=-9999"
>> PROCESSING
"SCALE=227.23,1741.15"
>> PROCESSING
>> "SCALE_BUCKETS=2000"
>> PROCESSING
"BANDS=1"
>>
>> DEBUG on
>> DUMP true
>>
>> TEMPLATE "void" # enable
queryable attribute on the layer END
>>
>> Any help is
>> appreciated,
>>
Flavio
>> _______________________________________________
>> mapserver-users
mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.
org/mailman/listinfo/mapserver-users
>>
>
From yassefa at dmsolutions.ca Tue Dec 1 09:28:48 2009
From: yassefa at dmsolutions.ca (Yewondwossen Assefa)
Date: Tue, 01 Dec 2009 12:28:48 -0500
Subject: [mapserver-users] WMS Client and SLD
In-Reply-To: <4B14F7F6.4070308@resexmap.com.au>
References: <4B14F7F6.4070308@resexmap.com.au>
Message-ID: <4B155250.7080908@dmsolutions.ca>
Hi There,
The first thing would be to make sure that the server supports SLD
styling. Doing a GetCapabilities [1], It seems it does not (at least it
does not the DescribeLayer operation which would indicate that SLD is
supported). If there server indeed supports sld, I would suggest to do a
manual call first [2][3] and see if it applies the sld properly. If all
goes well you can then try it from MapServer.
Note also that there seems to be a error in your sld:
STATUS
should have a literal value in it, something like:
STATUS1
Hope it helps.
regards,,
[1]:
http://atlas.information.qld.gov.au/ArcGIS/services/IRTM/MapServer/WMSServer?service=WMS&Request=GetCapabilities
[2]:http://atlas.information.qld.gov.au/ArcGIS/services/IRTM/MapServer/WMSServer?service=WMS&VERSION=1.1.0&Request=GetMap&Layers=56&SRS=EPSG:4326&BBOX=137.984510,-28.998470,153.534386,-10.098496&FORMAT=image/png&WIDTH=300&HEIGHT=200&STYLES=&
[3]http://atlas.information.qld.gov.au/ArcGIS/services/IRTM/MapServer/WMSServer?service=WMS&VERSION=1.1.0&Request=GetMap&Layers=56&SRS=EPSG:4326&BBOX=137.984510,-28.998470,153.534386,-10.098496&FORMAT=image/png&WIDTH=300&HEIGHT=200&STYLES=&sld=http://../mysld.xml
Tony Baylis wrote:
> All,
>
> This is the first time I have tried styling external WMS data using
> SLD and cannot get the returned data/image in the desired style.
> Below is the simplified mapfile and SLD file. If anyone has any
> pointers I'd be more than grateful. Please note that the link to the
> SLD file does work with the following return: 56 APPLICATION STATUS
> #ff0000 GRANTED STATUS #ffffbe
>
> Tony
>
> Mapfile:
> #
> # Start of map file
> #
> MAP
> NAME qld_tenement
> STATUS ON
> SIZE 800 500
> EXTENT 140 -23.25 150 -17
> UNITS DD
> SHAPEPATH "/var/www/remwms/htdocs/data"
> IMAGECOLOR 192 213 255
> SYMBOLSET "/var/www/remwms/htdocs/includes/symbols.sym"
> FONTSET "/usr/share/fonts/truetype/font.list"
> DEBUG 2
> CONFIG "MS_ERRORFILE" "/var/www/ms_tmp/ms_error.txt"
>
> #IMAGETYPE PNG
>
> OUTPUTFORMAT
> NAME "AGGA"
> MIMETYPE "image/png"
> DRIVER "AGG/PNG"
> EXTENSION "png"
> IMAGEMODE RGBA
> TRANSPARENT ON
> END
>
> #
> # Start of web interface definition
> #
> WEB
> IMAGEPATH "/var/www/ms_tmp/"
> IMAGEURL "http://mapserver1/ms_tmp/"
> END
>
> #
> # Assign Projection
> #
> PROJECTION
> "init=epsg:4283"
> END
>
> LAYER
> NAME "EPM"
> TYPE RASTER
> STATUS ON
> CONNECTIONTYPE WMS
> CONNECTION
> 'http://atlas.information.qld.gov.au/ArcGIS/services/IRTM/MapServer/WMSServer?'
>
> METADATA
> "wms_srs" "EPSG:4326"
> "wms_name" "56"
> "wms_server_version" "1.1.1"
> "wms_format" "image/png"
> "wms_title" "EPM"
> "wms_include_items" "all"
> "wms_sld_url" "http://mapserver1/remwms/includes/sld/publicsld.xml"
> "wms_legend_graphic" "0"
> "wms_feature_info_mime_type" "text/plain"
> END
> END
>
> END
>
> SLD File:
>
> xmlns="http://www.opengis.net/sld"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:xlink="http://www.w3.org/1999/xlink"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.opengis.net/sld
> http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
>
> 56
>
>
>
> APPLICATION
>
> STATUS
>
>
>
> #ff0000
>
>
>
>
> GRANTED
>
> STATUS
>
>
>
> #ffffbe
>
>
>
>
>
>
>
>
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
From truong_pham_minh at yahoo.com Tue Dec 1 10:17:17 2009
From: truong_pham_minh at yahoo.com (truongpm)
Date: Tue, 1 Dec 2009 10:17:17 -0800 (PST)
Subject: [mapserver-users] Is that mapserver support download map???
Message-ID: <1259691437592-4095271.post@n2.nabble.com>
Hello,
My project require that allow user draw a rectangle and download map in this
frame into his machine. After that, he can use some software (ex: quantum
gis) to work with this map.
I spent a lot of time finding solution on web but unsuccess.
Please help me if you can.
Thanks for your attention and sorry about my language skill.
--
View this message in context: http://n2.nabble.com/Is-that-mapserver-support-download-map-tp4095271p4095271.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
From james.perrins at gmail.com Tue Dec 1 10:51:58 2009
From: james.perrins at gmail.com (James Perrins)
Date: Tue, 1 Dec 2009 18:51:58 +0000
Subject: [mapserver-users] Using Open street map tiles via GDAL_WMS
Message-ID:
I've been trying to use Open street map tiles via a mapserver WMS
service displayed in OpenLayers.
This is sort of working - in that I'm getting maps displayed and they
seem to be in the right position (as checked against other datasets).
My issue is that the images are nowhere near as clear as the originals
from the Open Street map tiles. I've kept projections the same
throughout - and they don't appear to be being re-projected. The
images saved in the local cache (if enabled) are the same as from Open
Street Map. What appears to be happening is that mapserver is getting
images from (perhaps) a zoom level too high - and then re-sampling
these to produce the WMS output image - which then appears to have too
much detail displayed for its zoom level (if you understand what I'm
trying to say).
Any ideas why this is happening - I've messed around with Bounding
boxes and image sizes - but it doesn't seem to make any difference.
Thanks
James
MapFile extract:
LAYER
NAME "OSM"
STATUS ON
TYPE RASTER
DATA "D:\Websites\OpenStreetMap\OSM.xml"
PROJECTION
"init=EPSG:900913"
END
END
http://tile.openstreetmap.org/${z}/${x}/${y}.png-20037508.3420037508.3420037508.34-20037508.341911topEPSG:9009132562563
From crschmidt at metacarta.com Tue Dec 1 10:59:53 2009
From: crschmidt at metacarta.com (Christopher Schmidt)
Date: Tue, 1 Dec 2009 13:59:53 -0500
Subject: [mapserver-users] Using Open street map tiles via GDAL_WMS
In-Reply-To:
References:
Message-ID: <20091201185953.GD4421@metacarta.com>
On Tue, Dec 01, 2009 at 06:51:58PM +0000, James Perrins wrote:
> I've been trying to use Open street map tiles via a mapserver WMS
> service displayed in OpenLayers.
Er... why? Why not just load the tiles directly in OpenLayers?
Regards,
--
Christopher Schmidt
MetaCarta
From james.perrins at gmail.com Tue Dec 1 11:25:59 2009
From: james.perrins at gmail.com (James Perrins)
Date: Tue, 1 Dec 2009 19:25:59 +0000
Subject: [mapserver-users] Using Open street map tiles via GDAL_WMS
In-Reply-To: <20091201185953.GD4421@metacarta.com>
References:
<20091201185953.GD4421@metacarta.com>
Message-ID:
Sorry - meant to cover that - should have said this is just a
mechanism to test getting the OSM tiles into a WMS layer - as I
appreciate that if the ultimate aim was getting OSM tiles in
openlayers its a pretty silly way of doing it !
Ultimately the aim was to use them in a custom desktop app along with
other WMS delivered data. The other possible route is to reference
the tiles directly from the desktop app (which was actually what I was
looking at when I saw this option in GDAL and thought seeing as WMS
service was going to be used anyway - this might be an easier route
getting all the data delivered in in one go)
Thanks
On Tue, Dec 1, 2009 at 6:59 PM, Christopher Schmidt
wrote:
> On Tue, Dec 01, 2009 at 06:51:58PM +0000, James Perrins wrote:
>> I've been trying to use Open street map tiles via a mapserver WMS
>> service displayed in OpenLayers.
>
> Er... why? Why not just load the tiles directly in OpenLayers?
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
>
From Jukka.Rahkonen at mmmtike.fi Tue Dec 1 13:33:42 2009
From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka)
Date: Tue, 1 Dec 2009 23:33:42 +0200
Subject: [mapserver-users] WMS: raster's x and y pixel dimension
References: <14109062.1360441259681460769.JavaMail.defaultUser@defaultHost>
Message-ID:
Hi,
I would say that the main difference is that WMS is meant for showing a map on a computer screen, while WCS is made for letting users to download data so they can utilise it locally or process further. Real life is not so black and white. I promise you will find lots of good reading about WMS and WCS easily. Do not forget to read a little bit about WFS as well, service for downloading vector data.
-Jukka Rahkonen-
fla83tn wrote:
L?hetetty: ti 1.12.2009 17:31
Vastaanottaja: Rahkonen Jukka; mapserver-users at lists.osgeo.org
Aihe: Re: Re: [mapserver-users] WMS: raster's x and y pixel dimension
Thank you Jukka for the quick reply. Now I'm able to correctly generate z-
dimension from DEM layer.
However, since I'm new to GIS, I'm not able to
understand the differences between WCS and WMS..could
you briefly summarize
the goal of the two approach?
And, as last question , should I set the resX and
resY parameters from client or could I embed them directly into the map file?
Best regards,
Flavio
>Hi,
>
>Width, height and BBOX are all compulsory
parameters in WMS GetMap
>request and Mapserver is sending an image according
to the request. If
>you want to be able to control the pixel size easily,
without making WMS
>client to balance the BBOX and image size in pixels,
consider using WCS.
>One way to make a WCS request is
>
>http://server.fi/cgi-
bin/mapserver_wcs?SERVICE=WCS&VERSION=1.0.0&REQUEST
>=GetCoverage&COVERAGE=DEM&FORMAT=image/tiff&CRS=EPSG:3067&ResX=1.0&ResY=
>1.
0&BBOX=533652,6973434,534658,6974219
>
>You can see parameters ResX and ResY
which are used for controlling the
>pixel size.
>
>-Jukka Rahkonen-
>
>fla83tn
wrote:
>
>>
>> Hi to all,
>> I've a problem with the loading of a raster
image via WMS (1.3.0).
>>
>> To load the layers of my project I use gvSIG. If
I load my
>> digital elevation model (DEM) directly from filesystem (which
>>
is a HFA/Erdas Image file - .img),
>>
>> x and y pixel dimension are fixed to
2.5 and -2.5 meters
>> respectively, and fixed are also the width and height
attributes.
>> If I load the layer from
>> Mapserver's WMS instead, x and y
pixel dimension change as I
>> zoom in or out (i.
>> e. changing the width
>>
and height parameters of the getMap request).
>> Is there
>> the possibility
to tell the wms client that x and y pixel
>> dimension are constant and should
never be calculated?
>>
>> Here's my layer definition and the
>> tiff
outputformat definition:
>>
>> OUTPUTFORMAT
>> NAME GTiff
>> DRIVER
"GDAL/GTiff"
>>
>> MIMETYPE "image/tiff"
>> IMAGEMODE FLOAT32
>>
EXTENSION "tif"
>> END
>>
>> LAYER
>> NAME
>> "my_dem"
>> EXTENT 669913.75
5143998.75 678313.75 5150701.25
>>
>> METADATA
>>
>> "wms_title"
"my_dem" ##required
>> "wms_extent" "669913.75 5143998.75
>> 678313.75
5150701.25"
>> "gml_include_items" "all"
>> END
>> TYPE RASTER
>>
>>
STATUS ON
>> PROJECTION
>> "init=epsg:25832"
>> END
>>
>>
DATA "my_dem.tiff"
>>
>> PROCESSING "NODATA=-9999"
>> PROCESSING
"SCALE=227.23,1741.15"
>> PROCESSING
>> "SCALE_BUCKETS=2000"
>> PROCESSING
"BANDS=1"
>>
>> DEBUG on
>> DUMP true
>>
>> TEMPLATE "void" # enable
queryable attribute on the layer END
>>
>> Any help is
>> appreciated,
>>
Flavio
>> _______________________________________________
>> mapserver-users
mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.
org/mailman/listinfo/mapserver-users
>>
>
From Jukka.Rahkonen at mmmtike.fi Tue Dec 1 14:49:02 2009
From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka)
Date: Wed, 2 Dec 2009 00:49:02 +0200
Subject: [mapserver-users] WMS: raster's x and y pixel dimension
References: <14109062.1360441259681460769.JavaMail.defaultUser@defaultHost>
<4B1592C1.3050904@tamu.edu>
Message-ID:
Hi,
Thank you for clarifying my quick answer. I am looking WCS from a narrow viewport because I use it mostly for delivering aerial images in original resolution and quality. WCS does give more. Delivering raw data is not the only alternative with WCS but it offers also some limited processing options like resampling to different resolution, reprojecting and a set of user selectable outputformats.
When it comes to spatial relevance, for me the image captured from WMS does not have much spatial relevance after it has arrived to the computer if the request used for ordering it from the server is not known. GIS program who made the request does remember it but save it on a disk, or capture it with a web browser and it is just an image. Of course the situation is similar if you take an image from WCS server in png or jpeg format which do not carry embedded metadata. But this is not black and white either, Mapserver WMS can also create georeferenced geotiff or ecw files, even most WMS clients do not know what do do with them. Is it too simple to say that WMS was planned to be used for showing a map, WCS for downloading coverages and WFS for querying and downloading features?
-Jukka-
Gerald Creager wrote:
Er... not quite.
WMS is designed to provide a map for, say, a baselayer or background
with spatial relevance for GIS work. A picture on a screen is similar,
but a WMS result has spatial relevance.
Web Coverage Service delivers a product with spatial relevance and data
embedded within the pixels, voxels, etc of the coverage. You're not too
far off, but I believe you're attempting to oversimplify this.
A WFS result will provide a feature (line, polygon, point, polyline,
etc.) with all of its attributes.
In a coverage, e.g., a geotiff of a 3-band LandSAT image, you would have
information on which bands were provided for the RGB elements, and the
pixel values for each. The coverage is georegistered so that the
spatial relevance of the "image" is preserved. Similarly, a netcdf with
significantly more values could be passed as a coverage and utilized,
not limited to simply 3 "bands" of "color" (data).
gerry
Rahkonen Jukka wrote:
> Hi,
>
> I would say that the main difference is that WMS is meant for showing a map on a computer screen, while WCS is made for letting users to download data so they can utilise it locally or process further. Real life is not so black and white. I promise you will find lots of good reading about WMS and WCS easily. Do not forget to read a little bit about WFS as well, service for downloading vector data.
>
> -Jukka Rahkonen-
>
>
> fla83tn wrote:
>
> L?hetetty: ti 1.12.2009 17:31
> Vastaanottaja: Rahkonen Jukka; mapserver-users at lists.osgeo.org
> Aihe: Re: Re: [mapserver-users] WMS: raster's x and y pixel dimension
>
> Thank you Jukka for the quick reply. Now I'm able to correctly generate z-
> dimension from DEM layer.
> However, since I'm new to GIS, I'm not able to
> understand the differences between WCS and WMS..could
> you briefly summarize
> the goal of the two approach?
> And, as last question , should I set the resX and
> resY parameters from client or could I embed them directly into the map file?
>
>
> Best regards,
> Flavio
>
>> Hi,
>>
>> Width, height and BBOX are all compulsory
> parameters in WMS GetMap
>> request and Mapserver is sending an image according
> to the request. If
>> you want to be able to control the pixel size easily,
> without making WMS
>> client to balance the BBOX and image size in pixels,
> consider using WCS.
>> One way to make a WCS request is
>>
>> http://server.fi/cgi-
> bin/mapserver_wcs?SERVICE=WCS&VERSION=1.0.0&REQUEST
>
>> =GetCoverage&COVERAGE=DEM&FORMAT=image/tiff&CRS=EPSG:3067&ResX=1.0&ResY=
>> 1.
> 0&BBOX=533652,6973434,534658,6974219
>> You can see parameters ResX and ResY
> which are used for controlling the
>> pixel size.
>>
>> -Jukka Rahkonen-
>>
>> fla83tn
> wrote:
>>> Hi to all,
>>> I've a problem with the loading of a raster
> image via WMS (1.3.0).
>>> To load the layers of my project I use gvSIG. If
> I load my
>>> digital elevation model (DEM) directly from filesystem (which
>>>
> is a HFA/Erdas Image file - .img),
>>> x and y pixel dimension are fixed to
> 2.5 and -2.5 meters
>>> respectively, and fixed are also the width and height
> attributes.
>>> If I load the layer from
>>> Mapserver's WMS instead, x and y
> pixel dimension change as I
>>> zoom in or out (i.
>>> e. changing the width
>>>
> and height parameters of the getMap request).
>>> Is there
>>> the possibility
> to tell the wms client that x and y pixel
>>> dimension are constant and should
> never be calculated?
>>> Here's my layer definition and the
>>> tiff
> outputformat definition:
>>> OUTPUTFORMAT
>>> NAME GTiff
>>> DRIVER
> "GDAL/GTiff"
>>> MIMETYPE "image/tiff"
>>> IMAGEMODE FLOAT32
>>>
> EXTENSION "tif"
>>> END
>>>
>>> LAYER
>>> NAME
>>> "my_dem"
>>> EXTENT 669913.75
> 5143998.75 678313.75 5150701.25
>>>
>>> METADATA
>>>
>>> "wms_title"
> "my_dem" ##required
>>> "wms_extent" "669913.75 5143998.75
>>> 678313.75
> 5150701.25"
>>> "gml_include_items" "all"
>>> END
>>> TYPE RASTER
>>>
>>>
> STATUS ON
>>> PROJECTION
>>> "init=epsg:25832"
>>> END
>>>
>>>
> DATA "my_dem.tiff"
>>> PROCESSING "NODATA=-9999"
>>> PROCESSING
> "SCALE=227.23,1741.15"
>>> PROCESSING
>>> "SCALE_BUCKETS=2000"
>>> PROCESSING
> "BANDS=1"
>>>
>>> DEBUG on
>>> DUMP true
>>>
>>> TEMPLATE "void" # enable
> queryable attribute on the layer END
>>> Any help is
>>> appreciated,
>>>
> Flavio
>>> _______________________________________________
>>> 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
From gerry.creager at tamu.edu Tue Dec 1 14:57:56 2009
From: gerry.creager at tamu.edu (Gerald Creager)
Date: Tue, 01 Dec 2009 16:57:56 -0600
Subject: [mapserver-users] WMS: raster's x and y pixel dimension
In-Reply-To:
References: <14109062.1360441259681460769.JavaMail.defaultUser@defaultHost>
<4B1592C1.3050904@tamu.edu>
Message-ID: <4B159F74.1000007@tamu.edu>
Jukka
The key issue here is that you should be making the WMS request, and
thus, you know what the spatial extents, projection, and CRS are for
that map. If all you are doing is using a WMS result someone else got,
without the key metadata, what you have is not a web _map_ but a
picture. If you've the metadata, you have a map processable via a GIS
or suitable for use on another spatial display system such as MapServer.
gerry
Rahkonen Jukka wrote:
> Hi,
>
> Thank you for clarifying my quick answer. I am looking WCS from a narrow viewport because I use it mostly for delivering aerial images in original resolution and quality. WCS does give more. Delivering raw data is not the only alternative with WCS but it offers also some limited processing options like resampling to different resolution, reprojecting and a set of user selectable outputformats.
> When it comes to spatial relevance, for me the image captured from WMS does not have much spatial relevance after it has arrived to the computer if the request used for ordering it from the server is not known. GIS program who made the request does remember it but save it on a disk, or capture it with a web browser and it is just an image. Of course the situation is similar if you take an image from WCS server in png or jpeg format which do not carry embedded metadata. But this is not black and white either, Mapserver WMS can also create georeferenced geotiff or ecw files, even most WMS clients do not know what do do with them. Is it too simple to say that WMS was planned to be used for showing a map, WCS for downloading coverages and WFS for querying and downloading features?
>
> -Jukka-
>
> Gerald Creager wrote:
>
> Er... not quite.
>
> WMS is designed to provide a map for, say, a baselayer or background
> with spatial relevance for GIS work. A picture on a screen is similar,
> but a WMS result has spatial relevance.
>
> Web Coverage Service delivers a product with spatial relevance and data
> embedded within the pixels, voxels, etc of the coverage. You're not too
> far off, but I believe you're attempting to oversimplify this.
>
> A WFS result will provide a feature (line, polygon, point, polyline,
> etc.) with all of its attributes.
>
> In a coverage, e.g., a geotiff of a 3-band LandSAT image, you would have
> information on which bands were provided for the RGB elements, and the
> pixel values for each. The coverage is georegistered so that the
> spatial relevance of the "image" is preserved. Similarly, a netcdf with
> significantly more values could be passed as a coverage and utilized,
> not limited to simply 3 "bands" of "color" (data).
>
> gerry
>
> Rahkonen Jukka wrote:
>> Hi,
>>
>> I would say that the main difference is that WMS is meant for showing a map on a computer screen, while WCS is made for letting users to download data so they can utilise it locally or process further. Real life is not so black and white. I promise you will find lots of good reading about WMS and WCS easily. Do not forget to read a little bit about WFS as well, service for downloading vector data.
>>
>> -Jukka Rahkonen-
>>
>>
>> fla83tn wrote:
>>
>> L?hetetty: ti 1.12.2009 17:31
>> Vastaanottaja: Rahkonen Jukka; mapserver-users at lists.osgeo.org
>> Aihe: Re: Re: [mapserver-users] WMS: raster's x and y pixel dimension
>>
>> Thank you Jukka for the quick reply. Now I'm able to correctly generate z-
>> dimension from DEM layer.
>> However, since I'm new to GIS, I'm not able to
>> understand the differences between WCS and WMS..could
>> you briefly summarize
>> the goal of the two approach?
>> And, as last question , should I set the resX and
>> resY parameters from client or could I embed them directly into the map file?
>>
>>
>> Best regards,
>> Flavio
>>
>>> Hi,
>>>
>>> Width, height and BBOX are all compulsory
>> parameters in WMS GetMap
>>> request and Mapserver is sending an image according
>> to the request. If
>>> you want to be able to control the pixel size easily,
>> without making WMS
>>> client to balance the BBOX and image size in pixels,
>> consider using WCS.
>>> One way to make a WCS request is
>>>
>>> http://server.fi/cgi-
>> bin/mapserver_wcs?SERVICE=WCS&VERSION=1.0.0&REQUEST
>>
>>> =GetCoverage&COVERAGE=DEM&FORMAT=image/tiff&CRS=EPSG:3067&ResX=1.0&ResY=
>>> 1.
>> 0&BBOX=533652,6973434,534658,6974219
>>> You can see parameters ResX and ResY
>> which are used for controlling the
>>> pixel size.
>>>
>>> -Jukka Rahkonen-
>>>
>>> fla83tn
>> wrote:
>>>> Hi to all,
>>>> I've a problem with the loading of a raster
>> image via WMS (1.3.0).
>>>> To load the layers of my project I use gvSIG. If
>> I load my
>>>> digital elevation model (DEM) directly from filesystem (which
>>>>
>> is a HFA/Erdas Image file - .img),
>>>> x and y pixel dimension are fixed to
>> 2.5 and -2.5 meters
>>>> respectively, and fixed are also the width and height
>> attributes.
>>>> If I load the layer from
>>>> Mapserver's WMS instead, x and y
>> pixel dimension change as I
>>>> zoom in or out (i.
>>>> e. changing the width
>>>>
>> and height parameters of the getMap request).
>>>> Is there
>>>> the possibility
>> to tell the wms client that x and y pixel
>>>> dimension are constant and should
>> never be calculated?
>>>> Here's my layer definition and the
>>>> tiff
>> outputformat definition:
>>>> OUTPUTFORMAT
>>>> NAME GTiff
>>>> DRIVER
>> "GDAL/GTiff"
>>>> MIMETYPE "image/tiff"
>>>> IMAGEMODE FLOAT32
>>>>
>> EXTENSION "tif"
>>>> END
>>>>
>>>> LAYER
>>>> NAME
>>>> "my_dem"
>>>> EXTENT 669913.75
>> 5143998.75 678313.75 5150701.25
>>>>
>>>> METADATA
>>>>
>>>> "wms_title"
>> "my_dem" ##required
>>>> "wms_extent" "669913.75 5143998.75
>>>> 678313.75
>> 5150701.25"
>>>> "gml_include_items" "all"
>>>> END
>>>> TYPE RASTER
>>>>
>>>>
>> STATUS ON
>>>> PROJECTION
>>>> "init=epsg:25832"
>>>> END
>>>>
>>>>
>> DATA "my_dem.tiff"
>>>> PROCESSING "NODATA=-9999"
>>>> PROCESSING
>> "SCALE=227.23,1741.15"
>>>> PROCESSING
>>>> "SCALE_BUCKETS=2000"
>>>> PROCESSING
>> "BANDS=1"
>>>>
>>>> DEBUG on
>>>> DUMP true
>>>>
>>>> TEMPLATE "void" # enable
>> queryable attribute on the layer END
>>>> Any help is
>>>> appreciated,
>>>>
>> Flavio
>>>> _______________________________________________
>>>> 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
>
>
From gerry.creager at tamu.edu Tue Dec 1 15:09:43 2009
From: gerry.creager at tamu.edu (Gerald Creager)
Date: Tue, 01 Dec 2009 17:09:43 -0600
Subject: [mapserver-users] WMS: raster's x and y pixel dimension
In-Reply-To:
References: <14109062.1360441259681460769.JavaMail.defaultUser@defaultHost>
<4B1592C1.3050904@tamu.edu>
Message-ID: <4B15A237.8040709@tamu.edu>
And, as usual, I was too fast for my own good.
Your last sentence summarized the abstracts of the Open Geospatial
Consortium for WMS, WFS and WCS. However, it begs the question of
defining the terms. A knowledge of teh definitions is necessary to
understand what you want to access and what you're getting. Mistakes
are common where one thinks they understand a "feature" but then get
something back that didn't match their understanding. I could
substitute 'map' or 'coverage' for feature above.
And then, there's the metadata. Metadata and a coherent vocabulary and
ontology, often formated as a registered schema (GML in this case)
provides the description of the data for further use. When one issues a
GetCapabilities request to a Web [Map|Feature|Coverage] server one gets
a GML response back with all the pertinent metadata available about the
requested object that's on that server. From that, one may craft a
request for the data and data-type desired. While you're working with
that object, you will need to retain the metadata.
Note that in my earlier post, I indicated use of a 3-band geotiff of
landsat data. This represents a processed image, as you've restricted
the dataset to those three bands of data. The netCDF example was an
unprocessed (potentially) example (Hmmm. Maybe I should add some
cgi-hooks for NCAR's NCL package for netcdf subsetting and processing?).
The "WxS" packages, as I've taken to calling them, are powerful tools
for their specific tasks. They can be used out-of-context, too, but
that tends to confuse others who aren't familiar with how you were
thinking if you ask them to do strange things.
Your approach to this does not appear incorrect to me, but doesn't take
advantage of the full capabilities of the services.
gerry
Rahkonen Jukka wrote:
> Hi,
>
> Thank you for clarifying my quick answer. I am looking WCS from a narrow viewport because I use it mostly for delivering aerial images in original resolution and quality. WCS does give more. Delivering raw data is not the only alternative with WCS but it offers also some limited processing options like resampling to different resolution, reprojecting and a set of user selectable outputformats.
> When it comes to spatial relevance, for me the image captured from WMS does not have much spatial relevance after it has arrived to the computer if the request used for ordering it from the server is not known. GIS program who made the request does remember it but save it on a disk, or capture it with a web browser and it is just an image. Of course the situation is similar if you take an image from WCS server in png or jpeg format which do not carry embedded metadata. But this is not black and white either, Mapserver WMS can also create georeferenced geotiff or ecw files, even most WMS clients do not know what do do with them. Is it too simple to say that WMS was planned to be used for showing a map, WCS for downloading coverages and WFS for querying and downloading features?
>
> -Jukka-
>
> Gerald Creager wrote:
>
> Er... not quite.
>
> WMS is designed to provide a map for, say, a baselayer or background
> with spatial relevance for GIS work. A picture on a screen is similar,
> but a WMS result has spatial relevance.
>
> Web Coverage Service delivers a product with spatial relevance and data
> embedded within the pixels, voxels, etc of the coverage. You're not too
> far off, but I believe you're attempting to oversimplify this.
>
> A WFS result will provide a feature (line, polygon, point, polyline,
> etc.) with all of its attributes.
>
> In a coverage, e.g., a geotiff of a 3-band LandSAT image, you would have
> information on which bands were provided for the RGB elements, and the
> pixel values for each. The coverage is georegistered so that the
> spatial relevance of the "image" is preserved. Similarly, a netcdf with
> significantly more values could be passed as a coverage and utilized,
> not limited to simply 3 "bands" of "color" (data).
>
> gerry
>
> Rahkonen Jukka wrote:
>> Hi,
>>
>> I would say that the main difference is that WMS is meant for showing a map on a computer screen, while WCS is made for letting users to download data so they can utilise it locally or process further. Real life is not so black and white. I promise you will find lots of good reading about WMS and WCS easily. Do not forget to read a little bit about WFS as well, service for downloading vector data.
>>
>> -Jukka Rahkonen-
>>
>>
>> fla83tn wrote:
>>
>> L?hetetty: ti 1.12.2009 17:31
>> Vastaanottaja: Rahkonen Jukka; mapserver-users at lists.osgeo.org
>> Aihe: Re: Re: [mapserver-users] WMS: raster's x and y pixel dimension
>>
>> Thank you Jukka for the quick reply. Now I'm able to correctly generate z-
>> dimension from DEM layer.
>> However, since I'm new to GIS, I'm not able to
>> understand the differences between WCS and WMS..could
>> you briefly summarize
>> the goal of the two approach?
>> And, as last question , should I set the resX and
>> resY parameters from client or could I embed them directly into the map file?
>>
>>
>> Best regards,
>> Flavio
>>
>>> Hi,
>>>
>>> Width, height and BBOX are all compulsory
>> parameters in WMS GetMap
>>> request and Mapserver is sending an image according
>> to the request. If
>>> you want to be able to control the pixel size easily,
>> without making WMS
>>> client to balance the BBOX and image size in pixels,
>> consider using WCS.
>>> One way to make a WCS request is
>>>
>>> http://server.fi/cgi-
>> bin/mapserver_wcs?SERVICE=WCS&VERSION=1.0.0&REQUEST
>>
>>> =GetCoverage&COVERAGE=DEM&FORMAT=image/tiff&CRS=EPSG:3067&ResX=1.0&ResY=
>>> 1.
>> 0&BBOX=533652,6973434,534658,6974219
>>> You can see parameters ResX and ResY
>> which are used for controlling the
>>> pixel size.
>>>
>>> -Jukka Rahkonen-
>>>
>>> fla83tn
>> wrote:
>>>> Hi to all,
>>>> I've a problem with the loading of a raster
>> image via WMS (1.3.0).
>>>> To load the layers of my project I use gvSIG. If
>> I load my
>>>> digital elevation model (DEM) directly from filesystem (which
>>>>
>> is a HFA/Erdas Image file - .img),
>>>> x and y pixel dimension are fixed to
>> 2.5 and -2.5 meters
>>>> respectively, and fixed are also the width and height
>> attributes.
>>>> If I load the layer from
>>>> Mapserver's WMS instead, x and y
>> pixel dimension change as I
>>>> zoom in or out (i.
>>>> e. changing the width
>>>>
>> and height parameters of the getMap request).
>>>> Is there
>>>> the possibility
>> to tell the wms client that x and y pixel
>>>> dimension are constant and should
>> never be calculated?
>>>> Here's my layer definition and the
>>>> tiff
>> outputformat definition:
>>>> OUTPUTFORMAT
>>>> NAME GTiff
>>>> DRIVER
>> "GDAL/GTiff"
>>>> MIMETYPE "image/tiff"
>>>> IMAGEMODE FLOAT32
>>>>
>> EXTENSION "tif"
>>>> END
>>>>
>>>> LAYER
>>>> NAME
>>>> "my_dem"
>>>> EXTENT 669913.75
>> 5143998.75 678313.75 5150701.25
>>>>
>>>> METADATA
>>>>
>>>> "wms_title"
>> "my_dem" ##required
>>>> "wms_extent" "669913.75 5143998.75
>>>> 678313.75
>> 5150701.25"
>>>> "gml_include_items" "all"
>>>> END
>>>> TYPE RASTER
>>>>
>>>>
>> STATUS ON
>>>> PROJECTION
>>>> "init=epsg:25832"
>>>> END
>>>>
>>>>
>> DATA "my_dem.tiff"
>>>> PROCESSING "NODATA=-9999"
>>>> PROCESSING
>> "SCALE=227.23,1741.15"
>>>> PROCESSING
>>>> "SCALE_BUCKETS=2000"
>>>> PROCESSING
>> "BANDS=1"
>>>>
>>>> DEBUG on
>>>> DUMP true
>>>>
>>>> TEMPLATE "void" # enable
>> queryable attribute on the layer END
>>>> Any help is
>>>> appreciated,
>>>>
>> Flavio
>>>> _______________________________________________
>>>> 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
>
>
From peter.hopfgartner at r3-gis.com Wed Dec 2 02:09:34 2009
From: peter.hopfgartner at r3-gis.com (Peter Hopfgartner)
Date: Wed, 02 Dec 2009 11:09:34 +0100
Subject: [mapserver-users] Export SVG
In-Reply-To: <6dbb2e690911260106r2501c36au41f45ed36fbffeab@mail.gmail.com>
References: <6dbb2e690911240538t2fe2107gde38083c8db3333@mail.gmail.com> <4B0C203C.2030108@dmsolutions.ca> <6dbb2e690911250107s4de46e99g3e8a89f306312a91@mail.gmail.com> <4B0DC02E.7020605@dmsolutions.ca>
<6dbb2e690911260106r2501c36au41f45ed36fbffeab@mail.gmail.com>
Message-ID: <4B163CDE.2070203@r3-gis.com>
Hi Maria,
the fact that a SVG rendered by MapServer is simplified makes sense,
since what MapServer basically gives are maps, not raw data. Imagine
that you want a map of all European countries, where your raw data has
details down to something like a meter, the resulting SVG file would
easily scale up to some GB of data.
I'f you want raw data, try exporting in GML and render it with some
tools like GMLViewer or access MapServer through WFS with some desktop
GIS program.
If I'm right, what FULL_RESOLUTION does is to place the nodes of the
polygon more accurately, but I doubt that it changes the number of nodes.
Peter
Maria Neywell wrote:
>
> Hi,
>
>
>
> Sorry, I don?t think you are getting it right. I?m going to try to
> explain it differently.
>
>
>
> The aliasing in my svg file rendered by mapserver is independent of
> the viewer. Mapserver automatically simplifies geometries during the
> svg generation, so the geometries rendered in a SVG file don?t match
> with the ones in my original map.
>
>
>
> See enclosed a picture to explain my problem. Iit will help you to
> understand and to compare before and after SVG generation.
>
>
>
> Do you understand what's going on with mapserver and so with my svg file ?
>
>
>
> Thanks a lot and I?m sorry if my English is not so good to explain my
> problems
>
>
> Regards,
>
>
> Maria
>
>
>
> 2009/11/26 Yewondwossen Assefa >
>
> Hi,
>
> Not sure I get it correctly: MapServer exports a vector file (the
> svg), when you mention anti-aliasing, I believe you are referring
> to an svg viewer rendering the svg file? From what I understand,
> the svg specifications allows to specify some properties at the
> shape level for example to give a hint to the viewers on how to
> render the different shapes
> (http://www.w3.org/TR/SVG/painting.html#ShapeRenderingProperty).
> Depending on the viewer, I suppose some would respect these
> properties. MapServer does not at the point setup these
> properties. Is this what you are looking for?
>
> regards.
>
> Maria Neywell wrote:
>
>
> Thanks,
>
> I have already tried this way to extract my map in a svg file
> and it works. _However_, I had a svg file which corresponds to
> my map but with a lot of aliasing. The FORMATOPTION
> "FULL_RESOLUTION=TRUE" changes nothing. I tested this with and
> without option.
>
> I don't know if I did something wrong or if this is a
> mapserver problem?
>
> am I the only one to have this problem ?
>
> Regards,
>
> Maria
>
> 2009/11/24 Yewondwossen Assefa >>
>
>
> Hi,
>
> You could possibly specify FULL_RESOLUTION option in your
> outputformat. Something like this:
>
> OUTPUTFORMAT
> NAME svg
> MIMETYPE "image/svg+xml"
> DRIVER svg
> FORMATOPTION "FULL_RESOLUTION=TRUE"
> END
> best regards,
>
> Maria Neywell wrote:
>
> Hi list,
>
> I'm using mapserver 5.2.
>
> I have tested all mapserver exports to render my map in
> svg,
> see : http://mapserver.org/output/svg.html but, the
> point is
> that all of these outputs give me up simplified geometry. I
> want to export my map in a svg with geometries who match
> exactly with my map.
>
> did someone noticed that same weird result ?
>
> Regards,
>
> Maria
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
>
> >
>
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
> --
> ----------------------------------------------------------------
> Assefa Yewondwossen Software Analyst Email:
> assefa at dmsolutions.ca
> >
> http://www.dmsolutions.ca/
>
>
> Phone: (613) 565-5056 (ext 14)
> Fax: (613) 565-0925
>
> ----------------------------------------------------------------
>
>
>
>
>
> --
> ----------------------------------------------------------------
> Assefa Yewondwossen Software Analyst
> Email: assefa at dmsolutions.ca
> http://www.dmsolutions.ca/
>
> Phone: (613) 565-5056 (ext 14)
> Fax: (613) 565-0925
> ----------------------------------------------------------------
>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
--
Dott. Peter Hopfgartner
R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
Email: peter.hopfgartner at r3-gis.com
Tel. : +39 0473 494949
Fax : +39 0473 069902
www : http://www.r3-gis.com
================================================================================
Venite a trovarci all'ASITA, dal 1 al 4 dicembre a Bari www.asita.it
Besuchen Sie uns bei der Messe ASITA vom 1. bis 4. Dezember in Bari www.asita.it
Visit us at ASITA, from 1st to 4th December in Bari www.asita.it
================================================================================
From Jukka.Rahkonen at mmmtike.fi Wed Dec 2 02:27:55 2009
From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka)
Date: Wed, 2 Dec 2009 12:27:55 +0200
Subject: [mapserver-users] Export SVG
In-Reply-To: <4B163CDE.2070203@r3-gis.com>
References: <6dbb2e690911240538t2fe2107gde38083c8db3333@mail.gmail.com> <4B0C203C.2030108@dmsolutions.ca> <6dbb2e690911250107s4de46e99g3e8a89f306312a91@mail.gmail.com> <4B0DC02E.7020605@dmsolutions.ca><6dbb2e690911260106r2501c36au41f45ed36fbffeab@mail.gmail.com>
<4B163CDE.2070203@r3-gis.com>
Message-ID:
Peter Hopfgartner wrote:
> Hi Maria,
>
> the fact that a SVG rendered by MapServer is simplified makes
> sense, since what MapServer basically gives are maps, not raw
> data. Imagine that you want a map of all European countries,
> where your raw data has details down to something like a
> meter, the resulting SVG file would easily scale up to some
> GB of data.
There is no need to output ugly SVG even for small areas just because
serving the whole world with the same resolution would leed to
difficulties. Maxscale/Minscale are used to control this situation in
other places, as well as MaxFeatures with WFS requests. The example
Maria sent looks ugly for me and I am sure it can be improved.
Mapserver is sending raw data very effectively, as you said, through WFS
but also through WCS.
-Jukka Rahkonen-
From thomas.ellett at statkart.no Wed Dec 2 06:27:58 2009
From: thomas.ellett at statkart.no (tellett)
Date: Wed, 2 Dec 2009 06:27:58 -0800 (PST)
Subject: [mapserver-users] Mapserver Expression Result Error
Message-ID: <1259764078523-4100026.post@n2.nabble.com>
Hi all, I've come up against a problem that I just can't seem to fix, so I
hope someone on here has the time to look into this and prove that I'm not
going crazy!!
I've attached a zip file with a stripped down map file with just one layer
and one class and the associated shp file.
http://n2.nabble.com/file/n4100026/flydekning.zip flydekning.zip
The problem is that when I request features with the expression 'BILDEMALES'
= "8000", a filter takes place but clearly not the right one because I just
seem to get random features returned, some correct, most not (having a
BILDEMALES value of 1000, 8000, 20000 etc). I originally tried this with
postgis data and tried regex expressions, string comparisons and logical
mapserver expressions, and with different values for the attribute.
Everytime it returned some right and some wrong values.
The attribute column in postgis was originally var char and I converted it
to numeric, neither worked.
So now I've tried with the original shp file and get the same results. The
attribute in the shp file is of type char. Also, as you can see with the
commented out time extents, originally (when connecting to postgis) I was
just calling records from 1947 (filtering on the fotodato attribute which I
changed to type date in postgis), but with the shp file I should be calling
all records as there is no date filter in place anymore (the fotodato field
in the shp file is of type char). However, even though the records returned
seem to be random, they are all from 1947. This isn't so important, just a
bit weird? I've checked the log file but I seem to just be getting the error
message:
'msSearchDiskTree(): Search returned no results. Unable to open spatial
index for /opt/maps/flyfoto_dekning/flightpass-1-999f.qix. In most cases you
can safely ignore this message, otherwise check file names and permissions.'
The data is in utm32N or epsg:32632
Hope someones encountered this before and knows the fix!!
Regards
Tom Ellett
--
View this message in context: http://n2.nabble.com/Mapserver-Expression-Result-Error-tp4100026p4100026.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
From darenas2001 at yahoo.es Wed Dec 2 06:39:45 2009
From: darenas2001 at yahoo.es (darenas)
Date: Wed, 2 Dec 2009 06:39:45 -0800 (PST)
Subject: [mapserver-users] Reprojection from ETRS89 to ED5030
Message-ID: <1259764785980-4100086.post@n2.nabble.com>
Hi everyone!
I have some problems to reproject WMS service from ETRS89 to ED5030 in tools
like ArcGis or gvSIG. I?ve defined all the layers with PROJECTION 25830
(ETRS89).
As majority knows there is an internal mapserver?s file called epsg
(\ms4w\proj\nad) where It?s possible to define diferents reprojections. The
definition line to define reprojection from ED5030 to ETRS89 is the
following one in my server:
<23030> +proj=utm +zone=30 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0
+units=m +nadgrids=sped2et.gsb +no_defs <>
Therefore I suppose I have to change this line to inverse reprojection (from
ETRS89 to ED5030):
<25830> +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs <>
,but I have no clue about it.
Any ideas?
Thanks in advance.
David
--
View this message in context: http://n2.nabble.com/Reprojection-from-ETRS89-to-ED5030-tp4100086p4100086.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
From adams at terrestris.de Wed Dec 2 06:47:37 2009
From: adams at terrestris.de (Till Adams)
Date: Wed, 02 Dec 2009 15:47:37 +0100
Subject: [mapserver-users] Reprojection from ETRS89 to ED5030
In-Reply-To: <1259764785980-4100086.post@n2.nabble.com>
References: <1259764785980-4100086.post@n2.nabble.com>
Message-ID: <4B167E09.2060708@terrestris.de>
David,
did you define the epsg the WMS should be valid for in the wms metadata
section ?
Should be like this:
'WMS_SRS' 'epsg:23030 epsg:25830'
If you have the direct getMap request and you didn't do the above,
mapserver reports an error like
"projection library error. no system list,errno: 2"
Regards, Till
> Hi everyone!
>
> I have some problems to reproject WMS service from ETRS89 to ED5030 in tools
> like ArcGis or gvSIG. I?ve defined all the layers with PROJECTION 25830
> (ETRS89).
>
> As majority knows there is an internal mapserver?s file called epsg
> (\ms4w\proj\nad) where It?s possible to define diferents reprojections. The
> definition line to define reprojection from ED5030 to ETRS89 is the
> following one in my server:
>
> <23030> +proj=utm +zone=30 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0
> +units=m +nadgrids=sped2et.gsb +no_defs <>
>
> Therefore I suppose I have to change this line to inverse reprojection (from
> ETRS89 to ED5030):
>
> <25830> +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs <>
>
> ,but I have no clue about it.
>
> Any ideas?
>
> Thanks in advance.
>
> David
>
>
>
--
----------------------------------------------------------
terrestris GmbH & Co. KG
Irmintrudisstrasse 17
53111 Bonn
Germany
Till Adams
Gesch?ftsf?hrung
Tel: +49 (0)228 / 962 899-52
Fax: +49 (0)228 / 962 899-57
adams at terrestris.de http://www.terrestris.de
Amtsgericht Bonn, HRA 6835
---------------------------------------------------------
Komplement?rin:
terrestris Verwaltungs GmbH
vertreten durch:
Hinrich Paulsen, Till Adams
From jmckenna at gatewaygeomatics.com Wed Dec 2 07:16:59 2009
From: jmckenna at gatewaygeomatics.com (Jeff McKenna)
Date: Wed, 02 Dec 2009 11:16:59 -0400
Subject: [mapserver-users] Mapserver Expression Result Error
In-Reply-To: <1259764078523-4100026.post@n2.nabble.com>
References: <1259764078523-4100026.post@n2.nabble.com>
Message-ID: <4B1684EB.80704@gatewaygeomatics.com>
tellett wrote:
> Hi all, I've come up against a problem that I just can't seem to fix, so I
> hope someone on here has the time to look into this and prove that I'm not
> going crazy!!
>
> I've attached a zip file with a stripped down map file with just one layer
> and one class and the associated shp file.
> http://n2.nabble.com/file/n4100026/flydekning.zip flydekning.zip
>
> The problem is that when I request features with the expression 'BILDEMALES'
> = "8000", a filter takes place but clearly not the right one because I just
> seem to get random features returned, some correct, most not (having a
> BILDEMALES value of 1000, 8000, 20000 etc). I originally tried this with
> postgis data and tried regex expressions, string comparisons and logical
> mapserver expressions, and with different values for the attribute.
> Everytime it returned some right and some wrong values.
>
> The attribute column in postgis was originally var char and I converted it
> to numeric, neither worked.
>
> So now I've tried with the original shp file and get the same results. The
> attribute in the shp file is of type char. Also, as you can see with the
> commented out time extents, originally (when connecting to postgis) I was
> just calling records from 1947 (filtering on the fotodato attribute which I
> changed to type date in postgis), but with the shp file I should be calling
> all records as there is no date filter in place anymore (the fotodato field
> in the shp file is of type char). However, even though the records returned
> seem to be random, they are all from 1947. This isn't so important, just a
> bit weird? I've checked the log file but I seem to just be getting the error
> message:
>
> 'msSearchDiskTree(): Search returned no results. Unable to open spatial
> index for /opt/maps/flyfoto_dekning/flightpass-1-999f.qix. In most cases you
> can safely ignore this message, otherwise check file names and permissions.'
>
> The data is in utm32N or epsg:32632
>
> Hope someones encountered this before and knows the fix!!
>
>
Hello,
Thanks for packaging a test case. Note that the package is missing font
and symbol files that your mapfile points to, so in the future your
test packages should contain no references to fonts or symbols, to make
it easier to run (I removed all references and extra metadata and
objects, to make it easier to read).
If I open your shapefile in QuantumGIS and do an advanced query for
'BILDEMALES = 8000' I get 29 records returned.
If I change your mapfile extents to the full extents of your shapefile,
and use shp2img to create a map image, those same 29 features are shown
in the MapServer map image.
If I use the ogrinfo utility to execute SQL to select 'BILDEMALES =
8000' values, ogr/gdal returns those same 29 features.
In other words, I cannot duplicate your problem. Maybe I don't
understand what your problem is exactly?
(using MapServer 5.6.0-rc1)
-jeff
--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/
From Johan.Forsman at LA.GOV Wed Dec 2 09:27:25 2009
From: Johan.Forsman at LA.GOV (Johan Forsman)
Date: Wed, 2 Dec 2009 11:27:25 -0600
Subject: [mapserver-users] PostGIS wildcard expression and blank map
Message-ID:
Hello All:
I have a vexing problem where wildcard expressions in my mapfile return blank maps (tested directly in the browser address bar) when queried against a PostGIS database, but work perfectly against a shapefile.
There are no errors indicated in the log. In fact, the log indicates that it finds all the data alright:
(snip)
[Wed Dec 02 11:02:28 2009].890000 msPostGISLayerWhichShapes got 20691 records in result.
(snip)
[Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape called.
[Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape: [welluse] "P-R"
[Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape: [newid] "001-1060"
[Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape: [index] 4
[Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape: [shape] POINT (577278.4106000000600000 3355380.4495999999000000)
[Wed Dec 02 11:02:28 2009].921000 msPostGISLayerNextShape called.
(snip)
There are indeed 20691 records in the table. The "welluse" field contains entries that start with one of the letters "P", "N", "T", "Z", or "O", and are classified based on these letters.
The mapfile contains the following relevant lines:
(snip)
CLASSITEM "welluse"
CLASS
NAME "Public"
EXPRESSION /P^/
(snip)
Using
EXPRESSION /P^/
returns nothing from PostGIS, but the proper results from the shapefile (all records that start with the letter "P" in the field "welluse"). There are no errors returned from PostGIS, just a blank map and entries as shown in the log snippet above.
Using
EXPRESSION /P-R/
returns the correct results (all records with "P-R" in the field "welluse") from PostGIS and the shapefile.
I have tried crafting an expression using the SQL "LIKE" operator, e.g. various forms of
EXPRESSION ([welluse] like 'P%')
which usually works in SQL, but appears to not be supported in this instance based on all the syntax errors in the log after trying it, hence trying the regex above.
I am certain I am missing something obvious, but I would nevertheless appreciate your advice. I am trying to migrate the point data to PostGIS to improve on the query performance which is too poor using shapefiles on our humble server. Then I may be back to ask why php_cgi.exe crashes in ntdll.dll every time I try to query a dataset in PostGIS but works fine (but too slow) when using shapefiles, but I'll leave that for a later time.
I am currently using the MS4W beta from earlier this autumn, version 3 I think. It shipped with MS 5.4.2, but I have updated the to the RC1 version of MS 5.6 while looking for a solution to the php crashes (no difference).
Thanks in advance,
Johan.
----------------------
Johan Forsman
Geologist
Safe Drinking Water Program
Louisiana Department of Health and Hospitals
Office of Public Health
Telephone: 225.342.7309
Telefax: 225.342.7303
From pramsey at cleverelephant.ca Wed Dec 2 09:46:21 2009
From: pramsey at cleverelephant.ca (Paul Ramsey)
Date: Wed, 2 Dec 2009 09:46:21 -0800
Subject: [mapserver-users] PostGIS wildcard expression and blank map
In-Reply-To:
References:
Message-ID: <30fe546d0912020946r2de5b0ccm1f34a33f7c5e302@mail.gmail.com>
The usual regex for "starts with P" is /^P/ but your is backwards, is
that on purpose?
P
On Wed, Dec 2, 2009 at 9:27 AM, Johan Forsman wrote:
> Hello All:
>
> I have a vexing problem where wildcard expressions in my mapfile return blank maps (tested directly in the browser address bar) when queried against a PostGIS database, but work perfectly against a shapefile.
>
> There are no errors indicated in the log. In fact, the log indicates that it finds all the data alright:
>
> (snip)
> [Wed Dec 02 11:02:28 2009].890000 msPostGISLayerWhichShapes got 20691 records in result.
> (snip)
> [Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape called.
> [Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape: [welluse] "P-R"
> [Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape: [newid] "001-1060"
> [Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape: [index] 4
> [Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape: [shape] POINT (577278.4106000000600000 3355380.4495999999000000)
> [Wed Dec 02 11:02:28 2009].921000 msPostGISLayerNextShape called.
> (snip)
>
> There are indeed 20691 records in the table. The "welluse" field contains entries that start with one of the letters "P", "N", "T", "Z", or "O", and are classified based on these letters.
>
> The mapfile contains the following relevant lines:
>
> (snip)
> CLASSITEM "welluse"
> ?CLASS
> ? ?NAME "Public"
> ? ?EXPRESSION /P^/
> (snip)
>
> Using
>
> ? ? ? ?EXPRESSION /P^/
>
> returns nothing from PostGIS, but the proper results from the shapefile (all records that start with the letter "P" in the field "welluse"). There are no errors returned from PostGIS, just a blank map and entries as shown in the log snippet above.
>
> Using
>
> ? ? ? ?EXPRESSION /P-R/
>
> returns the correct results (all records with "P-R" in the field "welluse") from PostGIS and the shapefile.
>
> I have tried crafting an expression using the SQL "LIKE" operator, e.g. various forms of
>
> ? ? ? ?EXPRESSION ([welluse] like 'P%')
>
> which usually works in SQL, but appears to not be supported in this instance based on all the syntax errors in the log after trying it, hence trying the regex above.
>
> I am certain I am missing something obvious, but I would nevertheless appreciate your advice. I am trying to migrate the point data to PostGIS to improve on the query performance which is too poor using shapefiles on our humble server. Then I may be back to ask why php_cgi.exe crashes in ntdll.dll every time I try to query a dataset in PostGIS but works fine (but too slow) when using shapefiles, but I'll leave that for a later time.
>
> I am currently using the MS4W beta from earlier this autumn, version 3 I think. It shipped with MS 5.4.2, but I have updated the to the RC1 version of MS 5.6 while looking for a solution to the php crashes (no difference).
>
> Thanks in advance,
> Johan.
>
> ----------------------
> Johan Forsman
> Geologist
> Safe Drinking Water Program
> Louisiana Department of Health and Hospitals
> Office of Public Health
> Telephone: 225.342.7309
> Telefax: 225.342.7303
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
From Johan.Forsman at LA.GOV Wed Dec 2 10:09:06 2009
From: Johan.Forsman at LA.GOV (Johan Forsman)
Date: Wed, 2 Dec 2009 12:09:06 -0600
Subject: [mapserver-users] PostGIS wildcard expression and blank map --
SOLVED
In-Reply-To: <30fe546d0912020946r2de5b0ccm1f34a33f7c5e302@mail.gmail.com>
References:
<30fe546d0912020946r2de5b0ccm1f34a33f7c5e302@mail.gmail.com>
Message-ID:
Indeed not on purpose! Corrected and all is well with the map display. Egg on my face, thanks Paul.
The original file that points to shapefiles have it correct, I must have inadvertently turned it around when I was working on the LIKE version of the EXPRESSION statement. Stare at your own work long enough...
Now back to trying to determine why php-cgi.exe crashes when I query the PostGIS data.
Thanks again,
Johan.
-----Original Message-----
From: Paul Ramsey [mailto:pramsey at cleverelephant.ca]
Sent: Wednesday, December 02, 2009 11:46 AM
To: Johan Forsman
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] PostGIS wildcard expression and blank map
The usual regex for "starts with P" is /^P/ but your is backwards, is
that on purpose?
P
On Wed, Dec 2, 2009 at 9:27 AM, Johan Forsman wrote:
> Hello All:
>
> I have a vexing problem where wildcard expressions in my mapfile return blank maps (tested directly in the browser address bar) when queried against a PostGIS database, but work perfectly against a shapefile.
>
> There are no errors indicated in the log. In fact, the log indicates that it finds all the data alright:
>
> (snip)
> [Wed Dec 02 11:02:28 2009].890000 msPostGISLayerWhichShapes got 20691 records in result.
> (snip)
> [Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape called.
> [Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape: [welluse] "P-R"
> [Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape: [newid] "001-1060"
> [Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape: [index] 4
> [Wed Dec 02 11:02:28 2009].921000 msPostGISReadShape: [shape] POINT (577278.4106000000600000 3355380.4495999999000000)
> [Wed Dec 02 11:02:28 2009].921000 msPostGISLayerNextShape called.
> (snip)
>
> There are indeed 20691 records in the table. The "welluse" field contains entries that start with one of the letters "P", "N", "T", "Z", or "O", and are classified based on these letters.
>
> The mapfile contains the following relevant lines:
>
> (snip)
> CLASSITEM "welluse"
> ?CLASS
> ? ?NAME "Public"
> ? ?EXPRESSION /P^/
> (snip)
>
> Using
>
> ? ? ? ?EXPRESSION /P^/
>
> returns nothing from PostGIS, but the proper results from the shapefile (all records that start with the letter "P" in the field "welluse"). There are no errors returned from PostGIS, just a blank map and entries as shown in the log snippet above.
>
> Using
>
> ? ? ? ?EXPRESSION /P-R/
>
> returns the correct results (all records with "P-R" in the field "welluse") from PostGIS and the shapefile.
>
> I have tried crafting an expression using the SQL "LIKE" operator, e.g. various forms of
>
> ? ? ? ?EXPRESSION ([welluse] like 'P%')
>
> which usually works in SQL, but appears to not be supported in this instance based on all the syntax errors in the log after trying it, hence trying the regex above.
>
> I am certain I am missing something obvious, but I would nevertheless appreciate your advice. I am trying to migrate the point data to PostGIS to improve on the query performance which is too poor using shapefiles on our humble server. Then I may be back to ask why php_cgi.exe crashes in ntdll.dll every time I try to query a dataset in PostGIS but works fine (but too slow) when using shapefiles, but I'll leave that for a later time.
>
> I am currently using the MS4W beta from earlier this autumn, version 3 I think. It shipped with MS 5.4.2, but I have updated the to the RC1 version of MS 5.6 while looking for a solution to the php crashes (no difference).
>
> Thanks in advance,
> Johan.
>
> ----------------------
> Johan Forsman
> Geologist
> Safe Drinking Water Program
> Louisiana Department of Health and Hospitals
> Office of Public Health
> Telephone: 225.342.7309
> Telefax: 225.342.7303
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
From timbonicus at realgo.com Wed Dec 2 12:34:58 2009
From: timbonicus at realgo.com (Timbonicus Hansen)
Date: Wed, 2 Dec 2009 13:34:58 -0700
Subject: [mapserver-users] Different projections with MapServer and PostGIS
Message-ID:
Hi all,
I'm using MapServer to connect to PostGIS and not getting the any
results since the MapServer query and the data in postgresql are
different projections. The 'USING srid' option in the mapfile DATA
field only controls the GeomFromText call that MapServer generates
rather than enforcing a ST_Transform on the database column to match
the projection. Is there any way to make this work?
Here is the PostGIS section from the mapfile I am using:
CONNECTIONTYPE POSTGIS
CONNECTION "user=postgres dbname=lqms_prod"
DATA "the_geom FROM listing USING UNIQUE listing_id USING srid=4326"
Which MapServer munges into this SQL:
select status,encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'base64')
as geom,listing_id from listing where the_geom &&
GeomFromText('POLYGON((-105.074620715937
39.804844079017,-105.074620715937 39.869217095375,-104.927912119243
39.869217095375,-104.927912119243 39.804844079017,-105.074620715937
39.804844079017))',4326);
Unfortunately, the_geom in my database is in EPSG:26913 and the WKT is
in EPSG:4326. It seems the overlap operator (&&) is not smart enough
to pick up on this and convert one or the other - surprisingly,
neither is ST_Overlap. If I modify the query to ST_Transform(the_geom,
4326) && ... results come back as expected (or
ST_Transform(GeomFromText..., 26913)).
The options I see are:
- Change the database column the_geom to use EPSG:4326
- Create a view on the database that translates to EPSG:4326. Does
anyone know if this is feasible or the performance impact?
- Change the passed-in geometry to be EPSG:26913
Is there another option with MapServer? Is there a bug/feature request
to make "USING srid" do a transform on the DB column to match the WKT
conversion?
From timbonicus at realgo.com Wed Dec 2 12:50:27 2009
From: timbonicus at realgo.com (Timbonicus Hansen)
Date: Wed, 2 Dec 2009 13:50:27 -0700
Subject: [mapserver-users] Different projections with MapServer and
PostGIS
In-Reply-To: <30fe546d0912021245m77096ea5w5e5c5631d0aef977@mail.gmail.com>
References:
<30fe546d0912021245m77096ea5w5e5c5631d0aef977@mail.gmail.com>
Message-ID:
Thanks Paul, that did the trick! I knew I had to be missing something
I could do in the mapfile. This makes a lot of sense.
- Tim
On Wed, Dec 2, 2009 at 1:45 PM, Paul Ramsey wrote:
> In Mapserver, add a PROJECTION block to the LAYER:
>
> PROJECTION
> ?"init=epsg:26913"
> END
>
> And also a projection block to the MAP:
>
> PROJECTION
> ?"init=epsg:4326"
> END
>
> And then alter the DATA block to declare your data SRID.
>
> DATA "the_geom FROM listing USING UNIQUE listing_id USING srid= 26913"
>
> Now everything will work. Your requests to mapserver will get
> transformed (by mapserver) into the correct projection for your
> postgis data. All the reprojection will happen inside mapserver,
> postgis will be blissfully ignorant of transforms.
>
> P.
>
>
> On Wed, Dec 2, 2009 at 12:34 PM, Timbonicus Hansen
> wrote:
>> Hi all,
>>
>> I'm using MapServer to connect to PostGIS and not getting the any
>> results since the MapServer query and the data in postgresql are
>> different projections. The 'USING srid' option in the mapfile DATA
>> field only controls the GeomFromText call that MapServer generates
>> rather than enforcing a ST_Transform on the database column to match
>> the projection. Is there any way to make this work?
>>
>> Here is the PostGIS section from the mapfile I am using:
>> ? ?CONNECTIONTYPE POSTGIS
>> ? ?CONNECTION "user=postgres dbname=lqms_prod"
>> ? ?DATA "the_geom FROM listing USING UNIQUE listing_id USING srid=4326"
>>
>> Which MapServer munges into this SQL:
>> ? ?select status,encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'base64')
>> as geom,listing_id from listing where the_geom &&
>> GeomFromText('POLYGON((-105.074620715937
>> 39.804844079017,-105.074620715937 39.869217095375,-104.927912119243
>> 39.869217095375,-104.927912119243 39.804844079017,-105.074620715937
>> 39.804844079017))',4326);
>>
>> Unfortunately, the_geom in my database is in EPSG:26913 and the WKT is
>> in EPSG:4326. It seems the overlap operator (&&) is not smart enough
>> to pick up on this and convert one or the other - surprisingly,
>> neither is ST_Overlap. If I modify the query to ST_Transform(the_geom,
>> 4326) && ... results come back as expected (or
>> ST_Transform(GeomFromText..., 26913)).
>>
>> The options I see are:
>> - Change the database column the_geom to use EPSG:4326
>> - Create a view on the database that translates to EPSG:4326. Does
>> anyone know if this is feasible or the performance impact?
>> - Change the passed-in geometry to be EPSG:26913
>>
>> Is there another option with MapServer? Is there a bug/feature request
>> to make "USING srid" do a transform on the DB column to match the WKT
>> conversion?
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
From pramsey at opengeo.org Wed Dec 2 12:45:33 2009
From: pramsey at opengeo.org (Paul Ramsey)
Date: Wed, 2 Dec 2009 12:45:33 -0800
Subject: [mapserver-users] Different projections with MapServer and
PostGIS
In-Reply-To:
References:
Message-ID: <30fe546d0912021245m77096ea5w5e5c5631d0aef977@mail.gmail.com>
In Mapserver, add a PROJECTION block to the LAYER:
PROJECTION
"init=epsg:26913"
END
And also a projection block to the MAP:
PROJECTION
"init=epsg:4326"
END
And then alter the DATA block to declare your data SRID.
DATA "the_geom FROM listing USING UNIQUE listing_id USING srid= 26913"
Now everything will work. Your requests to mapserver will get
transformed (by mapserver) into the correct projection for your
postgis data. All the reprojection will happen inside mapserver,
postgis will be blissfully ignorant of transforms.
P.
On Wed, Dec 2, 2009 at 12:34 PM, Timbonicus Hansen
wrote:
> Hi all,
>
> I'm using MapServer to connect to PostGIS and not getting the any
> results since the MapServer query and the data in postgresql are
> different projections. The 'USING srid' option in the mapfile DATA
> field only controls the GeomFromText call that MapServer generates
> rather than enforcing a ST_Transform on the database column to match
> the projection. Is there any way to make this work?
>
> Here is the PostGIS section from the mapfile I am using:
> ? ?CONNECTIONTYPE POSTGIS
> ? ?CONNECTION "user=postgres dbname=lqms_prod"
> ? ?DATA "the_geom FROM listing USING UNIQUE listing_id USING srid=4326"
>
> Which MapServer munges into this SQL:
> ? ?select status,encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'base64')
> as geom,listing_id from listing where the_geom &&
> GeomFromText('POLYGON((-105.074620715937
> 39.804844079017,-105.074620715937 39.869217095375,-104.927912119243
> 39.869217095375,-104.927912119243 39.804844079017,-105.074620715937
> 39.804844079017))',4326);
>
> Unfortunately, the_geom in my database is in EPSG:26913 and the WKT is
> in EPSG:4326. It seems the overlap operator (&&) is not smart enough
> to pick up on this and convert one or the other - surprisingly,
> neither is ST_Overlap. If I modify the query to ST_Transform(the_geom,
> 4326) && ... results come back as expected (or
> ST_Transform(GeomFromText..., 26913)).
>
> The options I see are:
> - Change the database column the_geom to use EPSG:4326
> - Create a view on the database that translates to EPSG:4326. Does
> anyone know if this is feasible or the performance impact?
> - Change the passed-in geometry to be EPSG:26913
>
> Is there another option with MapServer? Is there a bug/feature request
> to make "USING srid" do a transform on the DB column to match the WKT
> conversion?
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
From Jukka.Rahkonen at mmmtike.fi Wed Dec 2 12:50:33 2009
From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka)
Date: Wed, 2 Dec 2009 22:50:33 +0200
Subject: [mapserver-users] Different projections with MapServer and PostGIS
References:
Message-ID:
Hi,
I believe that the right way is to set
a) Mapserver connection string to suit your data, "using srid=26913" and
b) tell in the layer definition, in PROJECTION block, that the native projection of this layer is epsg:26913.
-Jukka Rahkonen-
-----Alkuper?inen viesti-----
L?hett?j?: mapserver-users-bounces at lists.osgeo.org puolesta: Timbonicus Hansen
L?hetetty: ke 2.12.2009 22:34
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: [mapserver-users] Different projections with MapServer and PostGIS
Hi all,
I'm using MapServer to connect to PostGIS and not getting the any
results since the MapServer query and the data in postgresql are
different projections. The 'USING srid' option in the mapfile DATA
field only controls the GeomFromText call that MapServer generates
rather than enforcing a ST_Transform on the database column to match
the projection. Is there any way to make this work?
Here is the PostGIS section from the mapfile I am using:
CONNECTIONTYPE POSTGIS
CONNECTION "user=postgres dbname=lqms_prod"
DATA "the_geom FROM listing USING UNIQUE listing_id USING srid=4326"
Which MapServer munges into this SQL:
select status,encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'base64')
as geom,listing_id from listing where the_geom &&
GeomFromText('POLYGON((-105.074620715937
39.804844079017,-105.074620715937 39.869217095375,-104.927912119243
39.869217095375,-104.927912119243 39.804844079017,-105.074620715937
39.804844079017))',4326);
Unfortunately, the_geom in my database is in EPSG:26913 and the WKT is
in EPSG:4326. It seems the overlap operator (&&) is not smart enough
to pick up on this and convert one or the other - surprisingly,
neither is ST_Overlap. If I modify the query to ST_Transform(the_geom,
4326) && ... results come back as expected (or
ST_Transform(GeomFromText..., 26913)).
The options I see are:
- Change the database column the_geom to use EPSG:4326
- Create a view on the database that translates to EPSG:4326. Does
anyone know if this is feasible or the performance impact?
- Change the passed-in geometry to be EPSG:26913
Is there another option with MapServer? Is there a bug/feature request
to make "USING srid" do a transform on the DB column to match the WKT
conversion?
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
From mschulz at webgis.de Thu Dec 3 02:35:15 2009
From: mschulz at webgis.de (Michael Schulz)
Date: Thu, 3 Dec 2009 11:35:15 +0100
Subject: [mapserver-users] Mapserver compilation on SLES 11 fails ...
Message-ID:
Dear Mapservers,
currently a source compilation of a recent mapserver will fail on SuSE
Enterprise 11 with the following error:
ld: cannot find -lpgport
It seems that with SLES11 this library has been removed from the
repositories. After removing the linker flag from the makefiles the
compilation is successful. I'm just wondering if this library is
really needed or if we will be facing problems in the future? It seems
Slony also had this problem, and now the library has been readded to
the repos - but only for OpenSuse (see [1]). Hmpf.
Can someone comment on this, whether the lib is really needed?
Cheers, Michael
[1] http://www.mail-archive.com/slony1-general at lists.slony.info/msg03318.html
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aufwind durch Wissen!
Qualifizierte Open Source Schulungen bei der
http://www.foss-akademie.de/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------
Michael Schulz
mschulz at webgis.de
in medias res
Gesellschaft f?r Informationstechnologie mbH
+++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++
Schwimmbadstra?e 2
D-79100 Freiburg i. Br.
Tel: +49 (0)761 705798-102
Tel: +49 (0)761 705798-0
Fax: +49 (0)761 705798-09
+++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++
http://www.webgis.de / http://www.zopecms.de
--------------------------------------------------------------
Gesch?ftsf?hrer: Stefan Giese, Dr. Christof Lindenbeck
Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg
From maria.neywell at gmail.com Thu Dec 3 03:22:41 2009
From: maria.neywell at gmail.com (Maria Neywell)
Date: Thu, 3 Dec 2009 12:22:41 +0100
Subject: [mapserver-users] Export SVG
In-Reply-To:
References: <6dbb2e690911240538t2fe2107gde38083c8db3333@mail.gmail.com>
<4B0C203C.2030108@dmsolutions.ca>
<6dbb2e690911250107s4de46e99g3e8a89f306312a91@mail.gmail.com>
<4B0DC02E.7020605@dmsolutions.ca>
<6dbb2e690911260106r2501c36au41f45ed36fbffeab@mail.gmail.com>
<4B163CDE.2070203@r3-gis.com>
Message-ID: <6dbb2e690912030322g6fb38764w96e6429f61024252@mail.gmail.com>
Hi,
Yes it can be improved,
see my post on Mapserver development mailing list :
http://n2.nabble.com/Export-SVG-with-and-without-Mapserver-td4098474.html.
I solve the problem but without using Mapserver. I don?t know if it can be
implemented in the SVG export in Mapserver.
Regards,
Maria
2009/12/2 Rahkonen Jukka
> Peter Hopfgartner wrote:
> > Hi Maria,
> >
> > the fact that a SVG rendered by MapServer is simplified makes
> > sense, since what MapServer basically gives are maps, not raw
> > data. Imagine that you want a map of all European countries,
> > where your raw data has details down to something like a
> > meter, the resulting SVG file would easily scale up to some
> > GB of data.
>
> There is no need to output ugly SVG even for small areas just because
> serving the whole world with the same resolution would leed to
> difficulties. Maxscale/Minscale are used to control this situation in
> other places, as well as MaxFeatures with WFS requests. The example
> Maria sent looks ugly for me and I am sure it can be improved.
>
> Mapserver is sending raw data very effectively, as you said, through WFS
> but also through WCS.
>
> -Jukka Rahkonen-
> _______________________________________________
> 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:
From cnieman at dmsolutions.ca Thu Dec 3 05:31:45 2009
From: cnieman at dmsolutions.ca (Christy Nieman)
Date: Thu, 03 Dec 2009 08:31:45 -0500
Subject: [mapserver-users] Multiple WRAP Characters
Message-ID: <4B17BDC1.9060708@dmsolutions.ca>
Hello all,
I realize this is largely a development-based question, but thought that
users may be able to add to the discussion.
I've found some discussion about the feasibility of introducing the
ability to specify multiple WRAP characters related to RFC 40. Has
there been any further discussion? I have been working on a dataset
with many French names, and am wondering how to proceed to have both
spaces and hyphens treated as WRAP characters (I guess, for now,
separate classes could be used. Wouldn't be a perfect solution though).
Thanks for any insight you may be able to provide.
--
Christy Nieman
GIS Technician
DM Solutions Group, Inc.
Email: cnieman at dmsolutions.ca
Web: http://dmsolutions.ca
Web: http://research.dmsolutions.ca
From Jukka.Rahkonen at mmmtike.fi Thu Dec 3 06:34:25 2009
From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka)
Date: Thu, 3 Dec 2009 16:34:25 +0200
Subject: [mapserver-users] Reprojection from ETRS89 to ED5030
In-Reply-To: <4B167E09.2060708@terrestris.de>
References: <1259764785980-4100086.post@n2.nabble.com>
<4B167E09.2060708@terrestris.de>
Message-ID:
Till Adams wrote:
> David,
>
> did you define the epsg the WMS should be valid for in the
> wms metadata section ?
> Should be like this:
>
> 'WMS_SRS' 'epsg:23030 epsg:25830'
Just a small detail, it is better to use EPSG: with uppercase letters.
-Jukka Rahkonen-
From dmorissette at mapgears.com Thu Dec 3 07:37:07 2009
From: dmorissette at mapgears.com (Daniel Morissette)
Date: Thu, 03 Dec 2009 10:37:07 -0500
Subject: [mapserver-users] Mapserver compilation on SLES 11 fails ...
In-Reply-To:
References:
Message-ID: <4B17DB23.2040708@mapgears.com>
I don't know if we use the stuff from the pgport lib, probably not, but
we use the output of "pg_config --libs" to figure the required
dependencies to link with postgresql. This is the correct way to do
things AFAIK.
My take is that if the SuSe maintainers want to remove libpgport.a from
the -devel package, then they should also edit the pg_config script to
not list it.
Daniel
Michael Schulz wrote:
> Dear Mapservers,
>
> currently a source compilation of a recent mapserver will fail on SuSE
> Enterprise 11 with the following error:
> ld: cannot find -lpgport
>
> It seems that with SLES11 this library has been removed from the
> repositories. After removing the linker flag from the makefiles the
> compilation is successful. I'm just wondering if this library is
> really needed or if we will be facing problems in the future? It seems
> Slony also had this problem, and now the library has been readded to
> the repos - but only for OpenSuse (see [1]). Hmpf.
>
> Can someone comment on this, whether the lib is really needed?
>
> Cheers, Michael
>
> [1] http://www.mail-archive.com/slony1-general at lists.slony.info/msg03318.html
>
--
Daniel Morissette
http://www.mapgears.com/
From heskina at ubitech.com Thu Dec 3 08:13:10 2009
From: heskina at ubitech.com (Helen Eskina)
Date: Thu, 3 Dec 2009 11:13:10 -0500
Subject: [mapserver-users] How to set Labels dynamically?
Message-ID: <5CDE4E2F906F4CE9B22AFEDB42CD00F0@SkySource>
Hello,
I couldn?t find documentation how to set the text labels dynamically using
MapScript.
My application should show points with labels on the map. Points and labels
are obtained dynamically from the database or some text file.
I add the points to the layer and draw layer as following:
$my_point = ms_newpointObj();
$my_point->setXY(-75.895, 45.9227);
$my_point->project($projInObj,$projOutObj);
$line = ms_newLineObj();
$line->add($my_point);
$shape = ms_newShapeObj(MS_SHAPE_POINT);
$shape->add($line);
$shape->set(text, 'new point');
$daLayer->addFeature($shape);
$image=$map->draw();
$daLayer->draw($image);
$image_url=$image->saveWebImage();
Points are displayed on the map, but no text. What am I doing wrong?
I will appreciate any help,
Helen
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From ludwig at kni-online.de Thu Dec 3 09:13:22 2009
From: ludwig at kni-online.de (Ludwig Kniprath)
Date: Thu, 03 Dec 2009 18:13:22 +0100
Subject: [mapserver-users] RE: How to set Labels dynamically
Message-ID: <3990373.861741259860402458.JavaMail.servlet@kundenserver>
Hi,
I think there's only one line missing after $daLayer->draw($image):
$daLayer->drawLabelCache($image);
Regards
Ludwig
>Message: 6
>Date: Thu, 3 Dec 2009 11:13:10 -0500
>From: Helen Eskina
>Subject: [mapserver-users] How to set Labels dynamically?
>To: mapserver-users at lists.osgeo.org
>Message-ID: <5CDE4E2F906F4CE9B22AFEDB42CD00F0 at SkySource>
>Content-Type: text/plain; charset="windows-1252"
>
>Hello,
>
>
>
>I couldn?t find documentation how to set the text labels dynamically using
>MapScript.
>
>My application should show points with labels on the map. Points and labels
>are obtained dynamically from the database or some text file.
>
>I add the points to the layer and draw layer as following:
>
>
>
>$my_point = ms_newpointObj();
>
>
>
> $my_point->setXY(-75.895, 45.9227);
>
> $my_point->project($projInObj,$projOutObj);
>
>
>
> $line = ms_newLineObj();
>
>$line->add($my_point);
>
> $shape = ms_newShapeObj(MS_SHAPE_POINT);
>
> $shape->add($line);
>
> $shape->set(text, 'new point');
>
> $daLayer->addFeature($shape);
>
>
>
>$image=$map->draw();
>
>$daLayer->draw($image);
>
> $image_url=$image->saveWebImage();
>
>
>
>Points are displayed on the map, but no text. What am I doing wrong?
>
>
>
>I will appreciate any help,
>
>Helen
From guineau at earthlink.net Thu Dec 3 12:11:06 2009
From: guineau at earthlink.net (W.John Guineau)
Date: Thu, 3 Dec 2009 15:11:06 -0500
Subject: [mapserver-users] Shapefile,
itemnquery and HTML image map generation problem
Message-ID: <042101ca7454$bfc62830$3f527890$@net>
I have a basic vector shapefile that I am trying to generate HTML clickable
maps from. It seems to work well for the most part, however there is a
problem where some items from the shapefile do not get processed from the
qstring in the browser, but they are processed fine in the mapfile layer (to
color them differently).
So the map that renders shows all the items colored properly as the layer
class defines. Using the exact same list of items in the HTTP query string
causes several items to be ignored (the HTML image map area is not
generated).
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105
,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,
114A,114B,115A,115B,115C")
Below is the layer section from the mapfile. I can post whatever else is
helpful.
Thanks for any help on this.
john
LAYER
NAME map_m
DATA "map_shape"
TEMPLATE "bodytemplate.html"
HEADER "imapheader.html"
FOOTER "imapfooter.html"
PROJECTION
"proj=latlong"
"ellps=GRS80"
"init=epsg:4326"
END
TYPE polygon
STATUS ON
TRANSPARENCY 70
CLASS
NAME "MLRA"
COLOR 0 200 0
OUTLINECOLOR 0 0 0
EXPRESSION( "[MLRARSYM]" in
"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,1
11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
END
METADATA
qstring_validation_pattern ".*"
END
END
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From geomartino at gmail.com Thu Dec 3 12:59:31 2009
From: geomartino at gmail.com (Martin Ouellet)
Date: Thu, 3 Dec 2009 15:59:31 -0500
Subject: [mapserver-users] Question on the layer order impact in a
Getmap(WMS) call
Message-ID: <28d70b140912031259p4bcd2bbeu54309cadd3df1375@mail.gmail.com>
The mapserver doc specified that the layer are drawn in their order of
appearance in the MapFile (first layer is at the bottom, last is on top).
Extract from: http://umn.mapserver.ch/MapServer/en/layer.htm
So I wonder why the map is different if I change the order of the layers
(CEHQ_STATION_CEHQ_NIVEAU_NIV2 = point layer and CEHQ_BASSIN_N1_NIVEAU =
polygon layer) in the call?
Should Mapserver generate the map considering the layer order in the mapfile
(bottom to top) and not with the order in the URL call?
With this call, the polygon are on top:
http://spssoww5d.sso.msp.gouv.qc.ca/cgi-wms/adnIntranet?LAYERS=CEHQ_STATION_CEHQ_NIVEAU_NIV2,CEHQ_BASSIN_N1_NIVEAU&TRANSPARENT=true&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:900913&BBOX=-8397907.6360637,5657903.782736,-7510015.1156621,6129367.3731146&WIDTH=1452&HEIGHT=771
With this call, the point are on top (which I would like to have always)
http://spssoww5d.sso.msp.gouv.qc.ca/cgi-wms/adnIntranet?LAYERS=CEHQ_BASSIN_N1_NIVEAU,CEHQ_STATION_CEHQ_NIVEAU_NIV2&TRANSPARENT=true&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=EPSG:900913&BBOX=-8397907.6360637,5657903.782736,-7510015.1156621,6129367.3731146&WIDTH=1452&HEIGHT=771
Do I forgot something?
MartinO
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From ludwig at kni-online.de Thu Dec 3 13:57:22 2009
From: ludwig at kni-online.de (Ludwig Kniprath)
Date: Thu, 03 Dec 2009 22:57:22 +0100
Subject: [mapserver-users] Re: How to set Labels dynamically
In-Reply-To:
References: <3990373.861741259860402458.JavaMail.servlet@kundenserver>
Message-ID: <4B183442.80103@kni-online.de>
Oops, you're right, "drawLabelCache" is a method of the map-object, but
all the same it works for me!
Perhaps a missing LABEL-Section in the mapfile-definition of your $daLayer?
Regards
Ludwig
Helen Eskina schrieb:
> Hi Ludwig,
>
> Layer object doesn't have DrawLabelCache method. I've tried this line and
> got an error. I'm using Mapserver installed with fgs 5.4.2.
>
> I've tried
> $map-> drawLabelCache($image);
> But it doesn't make any difference.
>
> Helen
> -----Original Message-----
> From: Ludwig Kniprath [mailto:ludwig at kni-online.de]
> Sent: Thursday, December 03, 2009 12:13 PM
> To: mapserver-users at lists.osgeo.org
> Cc: heskina at ubitech.com
> Subject: RE: How to set Labels dynamically
>
> Hi,
> I think there's only one line missing after $daLayer->draw($image):
>
> $daLayer->drawLabelCache($image);
>
> Regards
> Ludwig
>
>
>> Message: 6
>> Date: Thu, 3 Dec 2009 11:13:10 -0500
>> From: Helen Eskina
>> Subject: [mapserver-users] How to set Labels dynamically?
>> To: mapserver-users at lists.osgeo.org
>> Message-ID: <5CDE4E2F906F4CE9B22AFEDB42CD00F0 at SkySource>
>> Content-Type: text/plain; charset="windows-1252"
>>
>> Hello,
>>
>>
>>
>> I couldn't find documentation how to set the text labels dynamically
>>
> using
>
>> MapScript.
>>
>> My application should show points with labels on the map. Points and
>>
> labels
>
>> are obtained dynamically from the database or some text file.
>>
>> I add the points to the layer and draw layer as following:
>>
>>
>>
>> $my_point = ms_newpointObj();
>>
>>
>>
>> $my_point->setXY(-75.895, 45.9227);
>>
>> $my_point->project($projInObj,$projOutObj);
>>
>>
>>
>> $line = ms_newLineObj();
>>
>> $line->add($my_point);
>>
>> $shape = ms_newShapeObj(MS_SHAPE_POINT);
>>
>> $shape->add($line);
>>
>> $shape->set(text, 'new point');
>>
>> $daLayer->addFeature($shape);
>>
>>
>>
>> $image=$map->draw();
>>
>> $daLayer->draw($image);
>>
>> $image_url=$image->saveWebImage();
>>
>>
>>
>> Points are displayed on the map, but no text. What am I doing wrong?
>>
>>
>>
>> I will appreciate any help,
>>
>> Helen
>>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.426 / Virus Database: 270.14.88/2538 - Release Date: 12/03/09
> 07:32:00
>
From wal3 at mindspring.com Thu Dec 3 14:05:57 2009
From: wal3 at mindspring.com (Worth Lutz)
Date: Thu, 3 Dec 2009 17:05:57 -0500
Subject: [mapserver-users] How to set Labels dynamically?
In-Reply-To: <5CDE4E2F906F4CE9B22AFEDB42CD00F0@SkySource>
References: <5CDE4E2F906F4CE9B22AFEDB42CD00F0@SkySource>
Message-ID: <08EA5885A6C34BF587ABDC81C91F4167@Worthlaptop>
I think that you need to add a class with a label definition to your layer.
Here is how I add a set of virtual layers to my map object before drawing
it. I'm sorry I do not have time this afternoon to distill it down to just
the information you are looking for. Things to notice that I am using
update from string to update my layer with a class which has style and label
information. I have found that the SYMBOL part of the updateFromText does
not work thus the
"$style->set('symbolname',$virtualLayers[$i]->symbol);"
statement which would seem redundant but is necessary. Let me know if you
cannot get the required information from this example and I'll help more.
function addVirtualLayers($ms, $virtualLayers) {
if (isset($virtualLayers)) {
$newLayer = array();
for ($i=0; $i < sizeof($virtualLayers); $i++) {
$newLayer[$i] = ms_newLayerObj($ms);
$newLayer[$i]->set('type',$virtualLayers[$i]->layerType);
#echo('layer type='.$virtualLayers[$i]->layerType);
if($virtualLayers[$i]->layerType == MS_LAYER_POINT) {
$string = 'LAYER NAME VirtualLayer'.$i.' CLASS NAME SELECTEDPTS
STYLE SYMBOL CROSS COLOR 255 0 200 SIZE 8 END LABEL TYPE truetype
MINFEATURESIZE 50 MINDISTANCE 0 POSITION CR FONT vera SIZE 7 COLOR 255 0 255
END END END';
} else if ($virtualLayers[$i]->layerType == MS_LAYER_POLYGON) {
$string = 'LAYER NAME VirtualLayer'.$i.' CLASS NAME SELECTEDPOLYGONS
STYLE OUTLINECOLOR 255 0 200 WIDTH 3 END LABEL TYPE truetype MINFEATURESIZE
50 MINDISTANCE 0 POSITION LC FONT vera SIZE 7 COLOR 255 0 255 END END END';
} else if ($virtualLayers[$i]->layerType == MS_LAYER_LINE) {
$string = 'LAYER NAME VirtualLayer'.$i.' CLASS NAME SELECTEDPOLYGONS
STYLE COLOR 255 0 0 WIDTH 3 END LABEL TYPE truetype MINFEATURESIZE 50
MINDISTANCE 0 POSITION LC FONT vera SIZE 7 COLOR 255 0 255 END END END';
}
$newLayer[$i]->updateFromString($string);
#echo('layer type2 ='.$newLayer[$i]->type);
$newLayer[$i]->set('status',MS_ON);
$class = $newLayer[$i]->getClass(0);
#echo($virtualLayers[$i]->class);
$class->updateFromString($virtualLayers[$i]->class); //returns
MS_SUCCESS | MS_FAILURE
if(isset($virtualLayers[$i]->symbol)) {
$style = $class->getStyle($class->numstyles-1);
$style->set('symbolname',$virtualLayers[$i]->symbol);
}
$shape = ms_shapeObjFromWkt($virtualLayers[$i]->shapeWkt);
# $shape->set('text', $i);
if(isset($virtualLayers[$i]->labelText)) {
$shape->set('text', $virtualLayers[$i]->labelText);
}
$newLayer[$i]->addFeature($shape);
}
}
}
?>
_____
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Helen Eskina
Sent: Thursday, December 03, 2009 11:13 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] How to set Labels dynamically?
Hello,
I couldn't find documentation how to set the text labels dynamically using
MapScript.
My application should show points with labels on the map. Points and labels
are obtained dynamically from the database or some text file.
I add the points to the layer and draw layer as following:
$my_point = ms_newpointObj();
$my_point->setXY(-75.895, 45.9227);
$my_point->project($projInObj,$projOutObj);
$line = ms_newLineObj();
$line->add($my_point);
$shape = ms_newShapeObj(MS_SHAPE_POINT);
$shape->add($line);
$shape->set(text, 'new point');
$daLayer->addFeature($shape);
$image=$map->draw();
$daLayer->draw($image);
$image_url=$image->saveWebImage();
Points are displayed on the map, but no text. What am I doing wrong?
I will appreciate any help,
Helen
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.709 / Virus Database: 270.14.91/2542 - Release Date: 12/03/09
02:32:00
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From ludwig at kni-online.de Fri Dec 4 00:43:53 2009
From: ludwig at kni-online.de (Ludwig Kniprath)
Date: Fri, 04 Dec 2009 09:43:53 +0100
Subject: [mapserver-users] Re: How to set Labels dynamically
In-Reply-To:
References: <3990373.861741259860402458.JavaMail.servlet@kundenserver>
<4B183442.80103@kni-online.de>
Message-ID: <4B18CBC9.1020401@kni-online.de>
Hi Helen,
this sample-script should work:
---schnipp------
preparequery();
$blank_map_image = $blank_map_object->prepareImage();
//2. LAYER
$draw_layer = ms_newLayerObj($blank_map_object);
$draw_layer->set('type', MS_LAYER_POINT);
$draw_layer->set('status', MS_ON);
//3. CLASS, STYLE and LABEL
$new_class = ms_newClassObj($draw_layer);
$new_style = ms_newStyleObj($new_class);
$label_obj = $new_class->label;
$label_obj->set('size', 25);
$label_obj->set('type', MS_TRUETYPE);
//Path to arial.ttf must be defined in test_fontset.txt
$label_obj->set('font', 'arial');
$label_obj->set('angle', 30);
//0x007E is the "~" sign
$label_obj->set('wrap', 0x007E);
$label_obj->color->setRGB(0,255,0);
$label_obj->backgroundcolor->setRGB(0,0,255);
$label_obj->backgroundshadowcolor->setRGB(200,200,200);
$label_obj->set('backgroundshadowsizex', 15);
$label_obj->set('backgroundshadowsizey', 15);
//...and so on
//4. Shape with label
$draw_shape = ms_shapeObjFromWkt('POINT(2502500 5602500)');
$draw_shape->set('text', ' ~ Hello World!~ Mapserver is cool... ~');
$draw_layer->addFeature($draw_shape);
$draw_layer->draw($blank_map_image);
//5. Shape to Image
$blank_map_object->drawLabelCache($blank_map_image);
$blank_map_object->labelcache->free();
//6. ready
$image_url=$blank_map_image->saveWebImage();
echo "";
?>
---schnapp------
With mini-mapfile:
---schnipp------
MAP
name "test"
fontset "your path to the fontset"
units meters
extent 2500000 5600000 2505000 5605000
size 800 600
imagecolor 255 255 255
WEB
imagepath "your path to tmp-directory"
imageurl "your url to tmp-directory"
END
END
---schnapp------
Regards
Ludwig
Helen Eskina schrieb:
> Hi,
>
> My $daLayer is defined dynamically. How should I define Label-Section in
> this case?
> $daLayer->set("type", MS_LAYER_POINT);
> $daLayer->set("status", MS_ON);
> $class = ms_newClassObj($daLayer);
> $style = ms_newStyleObj($class);
> $style->color->setRGB(255,0,0);
> $style->set("symbolname", "circle");
> $style->set("size", 10);
>
> Thank you,
> Helen
> -----Original Message-----
> From: Ludwig Kniprath [mailto:ludwig at kni-online.de]
> Sent: Thursday, December 03, 2009 4:57 PM
> To: Helen Eskina; mapserver-users at lists.osgeo.org
> Subject: Re: How to set Labels dynamically
>
> Oops, you're right, "drawLabelCache" is a method of the map-object, but
> all the same it works for me!
> Perhaps a missing LABEL-Section in the mapfile-definition of your
> $daLayer?
> Regards
> Ludwig
>
> Helen Eskina schrieb:
>
>> Hi Ludwig,
>>
>> Layer object doesn't have DrawLabelCache method. I've tried this line
>>
> and
>
>> got an error. I'm using Mapserver installed with fgs 5.4.2.
>>
>> I've tried
>> $map-> drawLabelCache($image);
>> But it doesn't make any difference.
>>
>> Helen
>> -----Original Message-----
>> From: Ludwig Kniprath [mailto:ludwig at kni-online.de]
>> Sent: Thursday, December 03, 2009 12:13 PM
>> To: mapserver-users at lists.osgeo.org
>> Cc: heskina at ubitech.com
>> Subject: RE: How to set Labels dynamically
>>
>> Hi,
>> I think there's only one line missing after $daLayer->draw($image):
>>
>> $daLayer->drawLabelCache($image);
>>
>> Regards
>> Ludwig
>>
>>
>>
>>> Message: 6
>>> Date: Thu, 3 Dec 2009 11:13:10 -0500
>>> From: Helen Eskina
>>> Subject: [mapserver-users] How to set Labels dynamically?
>>> To: mapserver-users at lists.osgeo.org
>>> Message-ID: <5CDE4E2F906F4CE9B22AFEDB42CD00F0 at SkySource>
>>> Content-Type: text/plain; charset="windows-1252"
>>>
>>> Hello,
>>>
>>>
>>>
>>> I couldn't find documentation how to set the text labels dynamically
>>>
>>>
>> using
>>
>>
>>> MapScript.
>>>
>>> My application should show points with labels on the map. Points and
>>>
>>>
>> labels
>>
>>
>>> are obtained dynamically from the database or some text file.
>>>
>>> I add the points to the layer and draw layer as following:
>>>
>>>
>>>
>>> $my_point = ms_newpointObj();
>>>
>>>
>>>
>>> $my_point->setXY(-75.895, 45.9227);
>>>
>>> $my_point->project($projInObj,$projOutObj);
>>>
>>>
>>>
>>> $line = ms_newLineObj();
>>>
>>> $line->add($my_point);
>>>
>>> $shape = ms_newShapeObj(MS_SHAPE_POINT);
>>>
>>> $shape->add($line);
>>>
>>> $shape->set(text, 'new point');
>>>
>>> $daLayer->addFeature($shape);
>>>
>>>
>>>
>>> $image=$map->draw();
>>>
>>> $daLayer->draw($image);
>>>
>>> $image_url=$image->saveWebImage();
>>>
>>>
>>>
>>> Points are displayed on the map, but no text. What am I doing wrong?
>>>
>>>
>>>
>>> I will appreciate any help,
>>>
>>> Helen
>>>
>>>
From kobben at itc.nl Fri Dec 4 01:42:51 2009
From: kobben at itc.nl (=?iso-8859-1?Q?Barend_K=F6bben?=)
Date: Fri, 4 Dec 2009 10:42:51 +0100
Subject: [mapserver-users] Question on the layer order impact in a
Getmap(WMS) call
In-Reply-To: <28d70b140912031259p4bcd2bbeu54309cadd3df1375@mail.gmail.com>
Message-ID:
The WMS GetMap interface standard requires layers to be drawn in order
(bottom to top) they appear in the LAYERS= statement in the request. So that
overrides the order in the MAP file...
--
Barend K?bben
International Institute for Geo-Information
Sciences and Earth Observation (ITC)
PO Box 6, 7500AA Enschede, The Netherlands
+31 (0)53 4874253
On 03-12-09 21:59, "Martin Ouellet" wrote:
> The mapserver doc specified that the layer are?drawn in their order of
> appearance in the MapFile (first layer is at the bottom, last is on top).
> Extract from:?http://umn.mapserver.ch/MapServer/en/layer.htm
>
> So I wonder why the map is different if I change the order of the layers
> (CEHQ_STATION_CEHQ_NIVEAU_NIV2 = point layer and CEHQ_BASSIN_N1_NIVEAU =
> polygon layer) in the call?
> Should Mapserver generate the map considering the layer order in the mapfile
> (bottom to top) and not with the order in the URL call?
>
> With this call, the?polygon are on top:
> http://spssoww5d.sso.msp.gouv.qc.ca/cgi-wms/adnIntranet?LAYERS=CEHQ_STATION_CE
> HQ_NIVEAU_NIV2,CEHQ_BASSIN_N1_NIVEAU&TRANSPARENT=true&FORMAT=image/png&SERVICE
> =WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_in
> image&SRS=EPSG:900913&BBOX=-8397907.6360637,5657903.782736,-7510015.1156621,61
> 29367.3731146&WIDTH=1452&HEIGHT=771
>
> With this call, the point are on top (which I would like to have always)
> http://spssoww5d.sso.msp.gouv.qc.ca/cgi-wms/adnIntranet?LAYERS=CEHQ_BASSIN_N1_
> NIVEAU,CEHQ_STATION_CEHQ_NIVEAU_NIV2&TRANSPARENT=true&FORMAT=image/png&SERVICE
> =WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_in
> image&SRS=EPSG:900913&BBOX=-8397907.6360637,5657903.782736,-7510015.1156621,61
> 29367.3731146&WIDTH=1452&HEIGHT=771
>
> Do I forgot something?
>
> MartinO
>
>
>
>
>
International Institute for Geo-Information Science and Earth Observation (ITC)
Chamber of Commerce: 410 27 560
E-mail disclaimer
The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission.
From geomartino at gmail.com Fri Dec 4 05:34:22 2009
From: geomartino at gmail.com (Martin Ouellet)
Date: Fri, 4 Dec 2009 08:34:22 -0500
Subject: [mapserver-users] Strange behavior for a truetype symbol render..
Message-ID: <28d70b140912040534j1bf7f5aq7ec8d92d3c604ee0@mail.gmail.com>
Hi there,
I have two symbol definition in my mapfile:
SYMBOL
NAME 'baisse'
TYPE TRUETYPE
FONT "windg3"
#CHARACTER "?"
CHARACTER "È"
END
SYMBOL
NAME 'hausse'
TYPE TRUETYPE
FONT "windg3"
#CHARACTER "?"
CHARACTER "Ç"
END
While moving the map around (and without making any changes in the mapfile
or in js code), sometime Mapserver is drawing the arrow up symbol (hausse),
and the other time, the arrow down symbol (baisse). See attachment for this
strange display. In both case, the symbol who's not displayed correctly is
replaced with a little box in the center of the circle.
Here the 2 WMS call behind it (identical but BBOX is different)
http://
/cgi-wms/adnInternet?LAYERS=ADN_STATION&TRANSPARENT=true&FORMAT=image%2Fpng&ISBASELAYER=false&VISIBILITY=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-8357644.0084038,5691908.0497863,-7868447.0274662,6038014.9137997&WIDTH=800&HEIGHT=566
http://
/cgi-wms/adnInternet?LAYERS=ADN_STATION&TRANSPARENT=true&FORMAT=image%2Fpng&ISBASELAYER=false&VISIBILITY=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-8451202.9310082,5636261.8932047,-7962005.9500706,5982368.7572181&WIDTH=800&HEIGHT=566
Any tought why this happen?
MartinO
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arrow_up2.GIF
Type: image/gif
Size: 8143 bytes
Desc: not available
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arrow_down2.GIF
Type: image/gif
Size: 8894 bytes
Desc: not available
URL:
From dgwalton at gmail.com Fri Dec 4 06:18:14 2009
From: dgwalton at gmail.com (Daniel Walton)
Date: Fri, 4 Dec 2009 08:18:14 -0600
Subject: [mapserver-users] Anyone know how to set up Mapserver under IIS 7
x64?
Message-ID: <8ab83e650912040618yd7bc9b4w3dd64f48f776cecf@mail.gmail.com>
I had Mapserver running well under IIS 7 x86 + PHP, but we now have a 64-bit
requirement, and I am having trouble getting Mapserver to work. I tried
32-bit IIS emulation to no avail. I was wondering if anyone out there has
accomplished this in 64 bit Windows, and if so, how?
Thanks guys,
Dan Walton
Dan Walton
GIS Fire Tools
(612) 232-6784
dgwalton at gmail.com
[image: Linkedin] [image:
Twitter]
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From szekerest at gmail.com Fri Dec 4 11:29:41 2009
From: szekerest at gmail.com (Tamas Szekeres)
Date: Fri, 4 Dec 2009 20:29:41 +0100
Subject: [mapserver-users] Anyone know how to set up Mapserver under IIS 7
x64?
In-Reply-To: <8ab83e650912040618yd7bc9b4w3dd64f48f776cecf@mail.gmail.com>
References: <8ab83e650912040618yd7bc9b4w3dd64f48f776cecf@mail.gmail.com>
Message-ID:
Daniel,
The x64 binaries at http://vbkto.dyndns.org/sdk/ would be near to this
requirement, if we'd compile mapserver with php support.
This would require at first to compile the php lib for x64 on Windows.
Then you might try to use the x64 SDK package and edit the Makefile and
recompile mapserver accordingly.
Best regards,
Tamas
2009/12/4 Daniel Walton
> I had Mapserver running well under IIS 7 x86 + PHP, but we now have a
> 64-bit requirement, and I am having trouble getting Mapserver to work. I
> tried 32-bit IIS emulation to no avail. I was wondering if anyone out there
> has accomplished this in 64 bit Windows, and if so, how?
>
> Thanks guys,
> Dan Walton
>
>
> Dan Walton
> GIS Fire Tools
> (612) 232-6784
> dgwalton at gmail.com
> [image: Linkedin] [image:
> Twitter]
>
> _______________________________________________
> 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:
From armin.burger at gmx.net Fri Dec 4 11:47:56 2009
From: armin.burger at gmx.net (Armin Burger)
Date: Fri, 04 Dec 2009 20:47:56 +0100
Subject: [mapserver-users] How to avoid warning messages for WFS and
optional metadata
Message-ID: <4B19676C.1030003@gmx.net>
Hi all
when defining a WFS with MapServer the GetCapabilities request returns
several warnings of the type:
WARNING: Optional metadata ... was missing for ...
if the version is set to 1.1.0 (it does not appear for requested version
1.0.0). I do not really understand why missing *optional* metadata
parameters create a warning output. Therefore my question is if there is
a configuration setting that allows suppressing warnings for missing
optional elements.
Thanks for any hints
Armin
PS: When I remember well this behaviour is the same for WCS in version 1.1.0
From zhaops at hotmail.com Fri Dec 4 12:00:09 2009
From: zhaops at hotmail.com (Peisheng Zhao)
Date: Fri, 4 Dec 2009 20:00:09 +0000
Subject: [mapserver-users] Multiple styles for raster data in MapServer
Message-ID:
Hi all,
I follow the document http://mapserver.org/ogc/sld.html to set up multiple styles for raster data in map file, just like this:
CLASSGROUP "sequential"
CLASS
GROUP "sequential"
EXPRESSION ([pixel] <= 2e+15)
STYLE
COLOR 255 237 160
END
END
CLASS
GROUP "sequential"
EXPRESSION ([pixel] >2e+15 AND [pixel] <= 3e+15)
STYLE
COLOR 254 217 118
END
END
...
...
CLASSGROUP "KNMI"
CLASS
GROUP "KNMI"
EXPRESSION ([pixel] <= 1e+15)
STYLE
COLOR 161 240 119
END
END
CLASS
NAME "knmi2"
GROUP "KNMI"
EXPRESSION ([pixel] >1e+15 AND [pixel] <= 2e+15)
STYLE
COLOR 136 238 120
END
END
In the response of "getcapabilities", there shows two styles "sequential, KNMI" available. But when I get map using either "styles=sequential" or "styles=KNMI", the rendered image is in "sequential" style. Then, I define "KNMI" at first, and "sequential" secondly in the Map file. The rendered images are all in "KNMI" style whatever I set up "styles" in getMap request.
Is there anything wrong in my Map file?
_________________________________________________________________
Windows Live Hotmail is faster and more secure than ever.
http://www.microsoft.com/windows/windowslive/hotmail_bl1/hotmail_bl1.aspx?ocid=PID23879::T:WLMTAGL:ON:WL:en-ww:WM_IMHM_1:092009
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jkapalczynski at ci.maple-grove.mn.us Fri Dec 4 12:21:15 2009
From: jkapalczynski at ci.maple-grove.mn.us (Jay Kapalczynski)
Date: Fri, 4 Dec 2009 14:21:15 -0600
Subject: [mapserver-users] html and ajax query
Message-ID:
I am trying to get the user to choose from 2 comboboxes...cant seem to get this to work.......maybe someone out there can see something I am doin wrong?
I think this how it works? Using the code below
The user selects two values in combo boxes ("PriceFactor and PriceArea")
Click the button to call function "ReturnQueryResults"
The Array is built from the values of the two dropdown boxes ("id = PriceFactor" and "id = PriceArea") using their ID values
The javascript call is made that calls Ajax page which sends the php page the array of values. I then have to parse the ID (the array) with "Get" in the php page, formatting the output, which is then shown on the target specified in the Ajax page.
The results go back to the back to the ajax page
I don't have a great understanding of this...trying with a couple dropdowns to start.
Any help would be greatly appreciated...I think I am pretty close but can use another set of eyes...
THanks
HTML PAGE:
Please Choose Price Factor:
Please Choose Area:
AJAX Page:
function getResulthype(url){
var _target = 'content_details_form';
if (id.length == 0) {
document.getElementById(_target).innerHTML="No Information Available";
return;
}
xmlHttp = GetAJAXObject();
if (xmlHttp==null) {
alert ("Unable to process your request, your browser does not support AJAX!");
return;
}
var url = "http://127.0.0.1:80/webapp/php/"+url+";
xmlHttp.onreadystatechange = showResult;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From Steve.Toutant at inspq.qc.ca Fri Dec 4 12:35:18 2009
From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca)
Date: Fri, 4 Dec 2009 15:35:18 -0500
Subject: [mapserver-users] Layer based on a view renders faster than if
based on a table
In-Reply-To: <1364.87.212.162.59.1259002563.squirrel@webmail.hostingdiscounter.nl>
Message-ID:
Hi,
I have a layer that renders faster when DATA is defined on a view than on
a table with a clustered index.
Here is the layer definition
CONNECTIONTYPE postgis
CONNECTION "host=xxxx dbname=xx user=xx password=xx port=5432"
DATA "geom900913 FROM prevalence using unique id using srid=900913"
PROCESSING "CLOSE_CONNECTION=DEFER"
PROJECTION
"init=epsg:900913"
END
My MAP projection is also 900913
If prevalence is a
Postgis View: 0.469s (2.6 seconds in OpenLayers)
Postgis table: 0.781s (3.6 seconds in OpenLayers)
Postgis table+index+cluster: 0.782s ( 3.4 seconds in OpenLayers)
I thought that a layer definition based on a table would be much faster
than on a view.
What should be the expected behavior please?
Please tell me is this should be asked to postgis forum.
thanks
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dmorissette at mapgears.com Fri Dec 4 14:05:29 2009
From: dmorissette at mapgears.com (Daniel Morissette)
Date: Fri, 04 Dec 2009 17:05:29 -0500
Subject: [mapserver-users] Layer based on a view renders faster than if
based on a table
In-Reply-To:
References:
Message-ID: <4B1987A9.3060405@mapgears.com>
Steve.Toutant at inspq.qc.ca wrote:
>
> I thought that a layer definition based on a table would be much faster
> than on a view.
> What should be the expected behavior please?
>
> Please tell me is this should be asked to postgis forum.
>
I'd suggest you capture the exact SQL query that is run in each case
(using DEBUG/MS_ERRORFILE) and check that the difference in time indeed
comes form the PostGIS queries.
If that's the case then you could submit a question to the postgis list
based on that, taking MapServer out of the equation.
If on the other hand the queries take about the same time and the time
difference is in MapServer's code (which I doubt) then we'd need more
details (ideally a testcase) to be able to reproduce and troubleshoot
the issue.
Daniel
--
Daniel Morissette
http://www.mapgears.com/
From shanksje at yahoo.com Fri Dec 4 21:42:30 2009
From: shanksje at yahoo.com (Jennifer Shanks)
Date: Fri, 4 Dec 2009 21:42:30 -0800 (PST)
Subject: [mapserver-users] Fw: DECEMBER 5th!! RED BALLOON SEARCH starts
Tomorrow! Help Conservation group win $40,
000 for scholarship Program!
Message-ID: <58144.72327.qm@web83402.mail.sp1.yahoo.com>
----- Forwarded Message ----
From: Lisa Pierce
To: SCGIS at LISTSERV.URI.EDU
Sent: Fri, December 4, 2009 5:49:38 PM
Subject: DECEMBER 5th!! RED BALLOON SEARCH starts Tomorrow! Help Conservation group win $40,000 for scholarship Program!
Please send on this note to your network to extend the SCGIS family and
increase our chances of winning!
RED BALLOON SEARCH Tomorrow! Help Conservation group win $40,000 for
scholarship Program!
Importance: High
http://www.edc.uri.edu/scgis/
SCGIS Takes On The DARPA Challenge:
Help the Society for Conservation GIS win $40,000 for our international
scholarship program and improve our SCGIS networking efforts!
www.scgis.org
The Challenge: Help the SCGIS Team locate 10 RED Weather Balloons THIS
Saturday Dec 05, 2009. This is a one day event and all we need are your
eyes...We do NOT need individuals to drive all over the countryside, we need
increased numbers of observers. If you forward this email to ALL individuals
on your contact list we have a greater chance of winning. The only way we
can possible win this challenge is to have thousands of eyes looking for
these red weather balloons located throughout the United States. You do NOT
have to be a "geocacher" or own a GPS to participate, we just need you to
keep an eye out for the balloons. This money will be used to help
conservationists world-wide to gain the skills they need to conserve the
environment, indigenous tribes, and local communities.
Why SCGIS: Because the Society of Conservation GIS is comprised of the
world's smartest mapping geeks, nerds, wonks, and pros, if we can't come up
with 10 geographic locations for bright red balloons, who can? Oh yeah, if
we are the first to log the 10 balloon sites, the SCGIS will win a prize of
$40,000 which will be used to support the SCGIS International Scholarship
Fund. Our participation in this event is strictly for fund-raising purposes,
and having some fun as well.
Why is DARPA Doing This?: They want to find out how society can mobilize
itself using the Internet and social networking tools. We have the answer --
pull together a great group like SCGIS and their friends and put them to the
task.
Rules/information for the Challenge:
. Balloons will go up at 10:00am (ET) (7:00am PT) and be taken down at 4:00
pm local time on Saturday 05 Dec - yes this means they will be visible for 6
hrs on the east coast and 9 hrs on the west coast.
. All balloon locations will be visible from a roadway and all areas will be
accessible to the public by pedestrian access. Officials will be stationed
with the balloons and participants should ask officials for the balloon
number and to verify that it is a DARPA Challenge balloon.
. Balloons will be visible on 05 Dec ONLY, but we have until noon on 14 Dec
to collect the information from our participants.
. Federal government employees can not submit locations to DARPA but they
can partiticpate in the search for balloons. SCGIS will submit locations for
everyone.
. The balloons coordinates should be collected in degree-minute-second
(DDD-MM-SS) format (latitude/longitude, do not use negative values for
longitude). IF you do not have a GPS unit, we have staff available to
convert available information (street intersections,...nearby lakes) for
you..gather as much information as possible, and be as detailed as possible.
See the instructions below for submitting your observation
What You Need to Do: Take a walk, go for a jog, hop on your bike, or fire up
that hybrid and go for a Saturday drive. If you see a big red balloon that
looks like this, take a photo, get an address, and if you are
geospatially-enabled, compute a lat-long value that is within 1 mile of
where the balloon is. If you have no idea how to determine the latitude and
longitude, not prob, just us get an address. There will be a credentialed
DARPA staffer at the site so if you are not sure you found a DARPA balloon,
just ask. DARPA balloons are also numbered (1-10) and be sure to record this
as well. More photos of DARPA balloons can be seen here.
Spread the Word: Tell your friends, family, colleagues, and neighbors to be
on the lookout for a red DARPA balloon. And tell them you are doing it for
SCGIS and their scholarship fund. If they find one, let us know. Here is a
sample announcement for your friends, colleagues and family.
Reporting Your Observation: We need the following information from you:
Participant's Info:
Participant's Name:
Telephone Number:
Email Address:
Participant's State:
Participant's County:
Participant's Town/City:
KEY Info:
Balloon Number (Balloon number will be clearly visible and is available from
the DARPA staff at the balloon site):
Street Intersection and City of sighting.
Lat/Long of the Balloon (If feasible but not necessary) How the coordinate
was derived.
A photo (if possible)
Brief (few sentences) of the setting of the balloon (any details are
valuable) Brief summary of who they heard about this contest from (their
network lineage)
How to Log Your Sighting:
TELEPHONE: 909-793-9011
TEXT MESSAGES: 909-553-4710
EMAIL: Email the info to:l.pierce at verizon.net
WEB: Click HERE
SKYPE ADDRESS : Lapierce (location is Redlands CA)
Current SCGIS Balloon Sightings (none as of Dec 4, 2009).
States where SCGIS has registered sightings will be circled on the map
below.
*******************************************************
SCGIS:The LISTSERV for the Society for Conservation GIS
www.scgis.org
To unsubscribe send the following email message
to LISTSERV at LISTSERV.URI.EDU:
SIGNOFF SCGIS
********************************************************
From guineau at earthlink.net Fri Dec 4 06:11:51 2009
From: guineau at earthlink.net (W.John Guineau)
Date: Fri, 4 Dec 2009 09:11:51 -0500
Subject: [mapserver-users] Shapefile,
itemnquery and HTML image map generation problem
In-Reply-To: <042101ca7454$bfc62830$3f527890$@net>
References: <042101ca7454$bfc62830$3f527890$@net>
Message-ID: <04e001ca74eb$bc473400$34d59c00$@net>
How would I go about debugging this?
I think this is GDAL and its query of shapefiles, right?
The bottom line is that MapServer finds all the items when it is rendering
the map by layer/class EXPRESSION, but the qstring in a URL using the exact
same EXPRESSION string misses some of the items.
I can also use ogrinfo from MAP4W to execute an SQL query directly on the
shapefile and the items in questions are certainly there.
In the image below, the green areas are result of the mapfile layer class
EXPRESSION - all are correctly rendered. However, several of them do not get
generated (HTML imagemap tags not generated) when using a URL and
itemnquery/qstring with the identical EXPRESSION.
How do I enable debug (enabling mapfile DEBUG does not seem to give any
useful info as to why GDAL is skipping certain items) Am I better off using
MAP4W or similar to get debug/trace info for shapefile queries?
john
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John Guineau
Sent: Thursday, December 03, 2009 3:11 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Shapefile, itemnquery and HTML image map
generation problem
I have a basic vector shapefile that I am trying to generate HTML clickable
maps from. It seems to work well for the most part, however there is a
problem where some items from the shapefile do not get processed from the
qstring in the browser, but they are processed fine in the mapfile layer (to
color them differently).
So the map that renders shows all the items colored properly as the layer
class defines. Using the exact same list of items in the HTTP query string
causes several items to be ignored (the HTML image map area is not
generated).
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105
,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,
114A,114B,115A,115B,115C")
Below is the layer section from the mapfile. I can post whatever else is
helpful.
Thanks for any help on this.
john
LAYER
NAME map_m
DATA "map_shape"
TEMPLATE "bodytemplate.html"
HEADER "imapheader.html"
FOOTER "imapfooter.html"
PROJECTION
"proj=latlong"
"ellps=GRS80"
"init=epsg:4326"
END
TYPE polygon
STATUS ON
TRANSPARENCY 70
CLASS
NAME "MLRA"
COLOR 0 200 0
OUTLINECOLOR 0 0 0
EXPRESSION( "[MLRARSYM]" in
"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,1
11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
END
METADATA
qstring_validation_pattern ".*"
END
END
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 26620 bytes
Desc: not available
URL:
From francesco.pirotti at unipd.it Mon Dec 7 02:50:51 2009
From: francesco.pirotti at unipd.it (francesco)
Date: Mon, 07 Dec 2009 11:50:51 +0100
Subject: [mapserver-users] mapscript does not use GRID information when
reprojecting rect object
In-Reply-To: <5CDE4E2F906F4CE9B22AFEDB42CD00F0@SkySource>
References: <5CDE4E2F906F4CE9B22AFEDB42CD00F0@SkySource>
Message-ID: <4B1CDE0B.8010703@unipd.it>
Hello I do not know if this it the right list to post, but I was
wandering if any of you had trouble when using the "project()" function
in mapscript (PHP). It does not use the grid file which is stated in the
EPSG line in the epsg file inside the ...proj/nad directory.
Reprojection of the map is wonderful, uses the grids, but script
reproject of a rectangle object does not make use of the grids. I made
sure of course that the epsg file which is read is the one I modified.
Anyone had the same problem?
Cheers,
--
*Francesco Pirotti*
Dep. TESAF
CIRGEO ? Interdepartmental Research Center on Cartography Photogrammetry
Remote Sensing and G.I.S.
University of Padova
Web: http://www.cirgeo.unipd.it/cirgeo/francescopirotti.htm
Email: francesco.pirotti at unipd.it
Phone: +39 049 827 2710
Phone: +39 349 55 39 261
From guineau at earthlink.net Mon Dec 7 07:08:19 2009
From: guineau at earthlink.net (guineau at earthlink.net)
Date: Mon, 07 Dec 2009 15:08:19 +0000
Subject: [mapserver-users] Shapefile,
itemnquery and HTML image map generation problem
Message-ID:
Hi Dave, the missing id's seem randomly distributed spatially. There is no obvious pattern to the id's - they are of the form NNN or NNNL (where N is a number, L is letter. I can even restrict the URL to a single (missing) id and it still does not emit the tag, but does render the class layer in the image.
john
----------
Sent from my Verizon Wireless mobile phone
------Original Message------
From: Fawcett, David (MPCA)
To: "mapserver-users at lists.osgeo.org" ,"Fawcett, David (MPCA)"
Date: Mon, Dec 7, 8:41 AM -0600
Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
John,
What features are not being rendered? Are they randomly distributed? located at the outside edges of the rendered features? Any pattern to the IDs?
David.
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John Guineau
Sent: Friday, December 04, 2009 8:12 AM
To: 'W.John Guineau'; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
How would I go about debugging this?
I think this is GDAL and its query of shapefiles, right?
The bottom line is that MapServer finds all the items when it is rendering the map by layer/class EXPRESSION, but the qstring in a URL using the exact same EXPRESSION string misses some of the items.
I can also use ogrinfo from MAP4W to execute an SQL query directly on the shapefile and the items in questions are certainly there.
In the image below, the green areas are result of the mapfile layer class EXPRESSION - all are correctly rendered. However, several of them do not get generated (HTML imagemap tags not generated) when using a URL and itemnquery/qstring with the identical EXPRESSION.
How do I enable debug (enabling mapfile DEBUG does not seem to give any useful info as to why GDAL is skipping certain items) Am I better off using MAP4W or similar to get debug/trace info for shapefile queries?
john
[cid:image001.png at 01CA7719.0F845920]
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John Guineau
Sent: Thursday, December 03, 2009 3:11 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
I have a basic vector shapefile that I am trying to generate HTML clickable maps from. It seems to work well for the most part, however there is a problem where some items from the shapefile do not get processed from the qstring in the browser, but they are processed fine in the mapfile layer (to color them differently).
So the map that renders shows all the items colored properly as the layer class defines. Using the exact same list of items in the HTTP query string causes several items to be ignored (the HTML image map area is not generated).
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,114A,114B,115A,115B,115C")
Below is the layer section from the mapfile. I can post whatever else is helpful.
Thanks for any help on this.
john
LAYER
NAME map_m
DATA "map_shape"
TEMPLATE "bodytemplate.html"
HEADER "imapheader.html"
FOOTER "imapfooter.html"
PROJECTION
"proj=latlong"
"ellps=GRS80"
"init=epsg:4326"
END
TYPE polygon
STATUS ON
TRANSPARENCY 70
CLASS
NAME "MLRA"
COLOR 0 200 0
OUTLINECOLOR 0 0 0
EXPRESSION( "[MLRARSYM]" in "102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
END
METADATA
qstring_validation_pattern ".*"
END
END
From dgwalton at gmail.com Mon Dec 7 07:46:16 2009
From: dgwalton at gmail.com (Daniel Walton)
Date: Mon, 7 Dec 2009 09:46:16 -0600
Subject: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank
images
Message-ID: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
Thanks to all who've been helping me along. I'm getting close to having x64
working now. I've worked through a slew of issues over the weekend, most
related to permissions. My latest issue is that mapserv.exe, when invoked
via IIS 7's FastCGI (classic mode) module, is returning blank images.
GetCapabilities is working fine, and the GetMap images are the right size
and format, but they're blank. Here's my setup: I downloaded and installed
the x64 binaries (from Tamas, thanks!) into a single directory (C
:\mapserver\). The IIS impersonated user has sufficient privileges on this
folder and all data folders. I am accessing mapserver's WMS service with
this URL:
http://www.fireimagery.com/ms/mapserv.exe?map=C%3A%2Fmaps%2FA091207074551.map&SERVICE=WMS&REQUEST=GetMap&WIDTH=1680&HEIGHT=536&FORMAT=image/png&LAYERS=ZZ&S0TYLE=&BGCOLOR=0x888888&TRANSPARENT=FALSE&VERSION=1.3.0&CRS=EPSG:4326&BBOX=36.0156802563091,-123.307040153269,37.2036688809148,-119.583493717938&EXCEPTIONS=XML
The corresponding mapfile text is as follows:
MAP
EXTENT 36.0992948502284 -121.822480778145 36.3421121497716
-121.520865221855
IMAGECOLOR 255 255 255
IMAGETYPE PNG
SIZE -1 -1
STATUS ON
UNITS DD
CONFIG PROJ_LIB "C:/mapserver/"
NAME "A091207074551"
OUTPUTFORMAT
NAME "aggpng24"
MIMETYPE "image/png"
DRIVER "AGG/PNG"
EXTENSION "PNG"
IMAGEMODE "RGBA"
TRANSPARENT TRUE
END
PROJECTION
"init=epsg:4326"
END
QUERYMAP
COLOR 255 255 0
SIZE -1 -1
STATUS OFF
STYLE HILITE
END
WEB
IMAGEPATH ""
IMAGEURL ""
METADATA
"wms_title" "A091207074551"
END
QUERYFORMAT text/html
LEGENDFORMAT text/html
BROWSEFORMAT text/html
END
LAYER
DATA
"C:\rawimages\A091207074551_output\A091207074551_0_config_PROCESS_RESULTS\BASINCOMPLEX_ftp.coloradoskye.com_2008_CA_Siege_080627_1200Local_SPOT_NIR_OUT.PNG"
EXTENT 36.0992948502284 -121.822480778145 36.3421121497716
-121.520865221855
METADATA
"wms_srs" "EPSG:4326"
"wms_extent" "36.1 -121.8 36.3 -121.5"
"wms_title"
"BASINCOMPLEX_FTP.COLORADOSKYE.COM_2008_CA_SIEGE_080627_1200LOCAL_SPOT_NIR"
END
NAME "ZZ"
PROJECTION
"init=epsg:4326"
END
STATUS ON
TYPE RASTER
UNITS DD
END
END
I have tried several different image formats and drivers, all produce blank
images. Any ideas what might be wrong? Any way to set up more helpful error
trapping?
Thanks,
Dan Walton
GIS Fire Tools
On Sun, Dec 6, 2009 at 4:04 PM, Tamas Szekeres wrote:
> Daniel,
>
> In bin/gdal/apps you can find the generic gdal/ogr applications, whereas
> the applications in bin/gdal/csharp have been implemented by using the gdal
> c# API. gdalinfo.exe and ogrinfo.exe provides similar functionalities in
> both cases.
>
> Best regards,
>
> Tamas
>
>
>
>
> 2009/12/6 Daniel Walton
>
> Tamas,
>>
>> In your binary distibutions there are 2 versions of gdalinfo.exe and
>> ogrinfo.exe, one in bin/gdal/apps and the other in bin/gdal/csharp. What is
>> the difference between the two versions?
>>
>> -Dan
>>
>>
>>
>> On Sat, Dec 5, 2009 at 3:31 AM, Tamas Szekeres wrote:
>>
>>> Have you configured mapping the .exe extension to this mapserv.exe with
>>> your IIS application?
>>> Make sure to enable CGI mode and copy all the x64 dll-s to the same
>>> directory as the mapserv.exe application.
>>> Set up the executing permissions to something like 'Scripts and
>>> Executables'
>>>
>>> Best regards,
>>>
>>> Tamas
>>>
>>>
>>>
>>> 2009/12/5 Daniel Walton
>>>
>>> Tamas,
>>>>
>>>> Update: I removed the CGI mapping and just used the default CGI hander
>>>> in IIS. Now the request returns a file named mapserv.exe. I attached it as a
>>>> text file. Again, thanks for any insights.
>>>>
>>>> -Dan
>>>>
>>>>
>>>>
>>>> On Fri, Dec 4, 2009 at 9:14 PM, Daniel Walton wrote:
>>>>
>>>>> Tamas,
>>>>>
>>>>> I installed the binaries from your website into c:\mapserver, added all
>>>>> the paths to the system path variable, and set up the IIS folders. Now I get
>>>>> a 500 internal error when trying to access mapserv.exe. The application log
>>>>> gives this error:
>>>>>
>>>>> *Faulting application mapserv.exe, version 0.0.0.0, time stamp
>>>>> 0x4b1893cb, faulting module libmap.dll, version 6.0.6001.18000, time stamp
>>>>> 0x4791adec, exception code 0xc0000135, fault offset 0x00000000000b1188,
>>>>> process id 0x4bc, application start time 0x01ca7557ca56f442.*
>>>>>
>>>>> Any idea what I'm doing wrong?
>>>>>
>>>>> Thanks,
>>>>> Dan
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Dec 4, 2009 at 2:22 PM, Tamas Szekeres wrote:
>>>>>
>>>>>> I've mostly used this with IIS6,but it should however work on IIS7 as
>>>>>> well.
>>>>>>
>>>>>> On IIS6 I configure a web server extensions to mapserv.exe (CGI mode)
>>>>>> and fcgiext.dll (for FastCGI).
>>>>>> Set up the executing permission (Scripts and Executables) and the
>>>>>> application extension mapping (.exe) to mapserv.exe or fcgiext.dll.
>>>>>>
>>>>>> Best regards,
>>>>>>
>>>>>> Tamas
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2009/12/4 Daniel Walton
>>>>>>
>>>>>>> Tamas,
>>>>>>> That's exactly what I was hoping you'd say! Which IIS module mapping
>>>>>>> should I use for *.exe?
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Dec 4, 2009 at 1:55 PM, Tamas Szekeres wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2009/12/4 Daniel Walton
>>>>>>>>
>>>>>>>>> Tamas,
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks for the reply. If I just want to use mapserver CGI as a WMS
>>>>>>>>> server, do I need PHP? Is there another way to interact with mapserv.exe for
>>>>>>>>> this limited purpose (e.g. an ASP.NET wrapper or something)?
>>>>>>>>>
>>>>>>>>> -Dan
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> Dan,
>>>>>>>>
>>>>>>>> If you use the MapServer CGI (mapserv.exe) you wouldn't require to
>>>>>>>> compile against PHP, the packages from http://vbkto.dyndns.org/sdk/could be used without any change.
>>>>>>>> Those packages also contain the MapScript C# interface
>>>>>>>> (mapscript_csharp.dll) which would support creating ASP.NETapplications around the MapServer codebase when you have further
>>>>>>>> requirements about the desired functionality.
>>>>>>>>
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>>
>>>>>>>> Tamas
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From thomas.ellett at statkart.no Mon Dec 7 08:16:38 2009
From: thomas.ellett at statkart.no (tellett)
Date: Mon, 7 Dec 2009 08:16:38 -0800 (PST)
Subject: [mapserver-users] Mapserver Expression Result Error
In-Reply-To: <4B1684EB.80704@gatewaygeomatics.com>
References: <1259764078523-4100026.post@n2.nabble.com>
<4B1684EB.80704@gatewaygeomatics.com>
Message-ID: <1260202598576-4126817.post@n2.nabble.com>
Hei Jeff, thanks for getting back to me, and so quickly! Haven't been able to work on this since I posted hence the slight delay for this. You're quite right of course, mapserver is rendering all the correct features, the problem I was having is to do with getfeatureinfo requests. If you set up a service with the mapfile and shp file (I've attached a new map file with no reference to fonts or symbols and less metadata!!) and access in gaia or quantum for instance (have to use utm32N, 32632), then click around the single polygon that agrees with the expression you'll notice that you still get getfeatureinfo information, which leads me to understand that the getfeatureinfo query runs at a layer level rather than a class level and does not inherit any of the getmap information? Is that right?
Another issue I've found now is that for some reason if you use the expression ('[BILDEMALES]' <= "5999") in the class, mapserver seems to return all the features, not just the ones that fit the expression. I queried the shp file in quantum and it came back with 73 matches. When I create an image using shp2img however (or use the wms service), mapserver returns all features. Its weird because you can use the expression (('[bildemales]' >= '8000') and ('[bildemales]' <= '9999')) (and many other expressions) instead and it'll return the correct number of features for the expression. I even tried (('[bildemales]' >= '1') and ('[bildemales]' <= '5999')) and it still returns all features instead of just the 73 it should. Is this a bug perhaps? I'm using mapserver 5.4.
Cheers
Tom
________________________________
From: Jeff McKenna [via OSGeo.org] [mailto:ml-node+4100329-1582451534 at n2.nabble.com]
Sent: Wednesday, December 02, 2009 4:23 PM
To: Thomas Ellett
Subject: Re: [mapserver-users] Mapserver Expression Result Error
tellett wrote:
> Hi all, I've come up against a problem that I just can't seem to fix, so I
> hope someone on here has the time to look into this and prove that I'm not
> going crazy!!
>
> I've attached a zip file with a stripped down map file with just one layer
> and one class and the associated shp file.
> http://n2.nabble.com/file/n4100026/flydekning.zip flydekning.zip
>
> The problem is that when I request features with the expression 'BILDEMALES'
> = "8000", a filter takes place but clearly not the right one because I just
> seem to get random features returned, some correct, most not (having a
> BILDEMALES value of 1000, 8000, 20000 etc). I originally tried this with
> postgis data and tried regex expressions, string comparisons and logical
> mapserver expressions, and with different values for the attribute.
> Everytime it returned some right and some wrong values.
>
> The attribute column in postgis was originally var char and I converted it
> to numeric, neither worked.
>
> So now I've tried with the original shp file and get the same results. The
> attribute in the shp file is of type char. Also, as you can see with the
> commented out time extents, originally (when connecting to postgis) I was
> just calling records from 1947 (filtering on the fotodato attribute which I
> changed to type date in postgis), but with the shp file I should be calling
> all records as there is no date filter in place anymore (the fotodato field
> in the shp file is of type char). However, even though the records returned
> seem to be random, they are all from 1947. This isn't so important, just a
> bit weird? I've checked the log file but I seem to just be getting the error
> message:
>
> 'msSearchDiskTree(): Search returned no results. Unable to open spatial
> index for /opt/maps/flyfoto_dekning/flightpass-1-999f.qix. In most cases you
> can safely ignore this message, otherwise check file names and permissions.'
>
> The data is in utm32N or epsg:32632
>
> Hope someones encountered this before and knows the fix!!
>
>
Hello,
Thanks for packaging a test case. Note that the package is missing font
and symbol files that your mapfile points to, so in the future your
test packages should contain no references to fonts or symbols, to make
it easier to run (I removed all references and extra metadata and
objects, to make it easier to read).
If I open your shapefile in QuantumGIS and do an advanced query for
'BILDEMALES = 8000' I get 29 records returned.
If I change your mapfile extents to the full extents of your shapefile,
and use shp2img to create a map image, those same 29 features are shown
in the MapServer map image.
If I use the ogrinfo utility to execute SQL to select 'BILDEMALES =
8000' values, ogr/gdal returns those same 29 features.
In other words, I cannot duplicate your problem. Maybe I don't
understand what your problem is exactly?
(using MapServer 5.6.0-rc1)
-jeff
--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/
_______________________________________________
mapserver-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
________________________________
View message @ http://n2.nabble.com/Mapserver-Expression-Result-Error-tp4100026p4100329.html
To unsubscribe from Mapserver Expression Result Error, click here < (link removed) => .
--
View this message in context: http://n2.nabble.com/Mapserver-Expression-Result-Error-tp4100026p4126817.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From alan.stratford at goodrich.com Mon Dec 7 08:36:00 2009
From: alan.stratford at goodrich.com (Alans)
Date: Mon, 7 Dec 2009 08:36:00 -0800 (PST)
Subject: [mapserver-users] Full CADRG and VPF support
In-Reply-To: <200807082016.28452.even.rouault@mines-paris.org>
References:
<200807082016.28452.even.rouault@mines-paris.org>
Message-ID: <1260203760380-4126971.post@n2.nabble.com>
Has anyone managed to get this to work, i.e. creating an index from an a.toc
file, or
directly refering to an a.toc file in the map file? or is it necessary to
generate an index
from the image files directly, as seems to be specified by others?
Even Rouault wrote:
>
> Or more simple, from GDAL 1.5, RPF products are directly supported.
>
> So you can do :
>
> gdaltindex tile_index.shp NITF_TOC_ENTRY:CADRG_JOG-A_250K_1_0:rpf/a.toc
> NITF_TOC_ENTRY:CADRG_JOG-A_250K_1_1:rpf/a.toc
>
> where those NITF_TOC_ENTRY values are the SUBDATASET_X_NAME values
> reported by
> gdalinfo on the A.TOC file.
>
> For VPF, you need to build OGR with OGDI support. After that, you can
> handle
> it directly in mapserver through an OGRConnection (but that may be slow as
> VPF reading is not fast), or use ogr2ogr to convert it into shapefiles
> before. I use the latest option in production environment for speed
> reasons,
> as you can use spatial indexing on shapefiles.
>
>
> Le Tuesday 08 July 2008 11:56:14 P?l Kristensen, vous avez ?crit?:
>> Hi!
>>
>> You can build a tileindex with the gdaltindex utility, and then reference
>> the tileindex in a raster layer. You have to run the tileindex utility
>> one
>> time for each sub folder
>>
>> gdaltindex rpf_jog.shp /RPF/CJGA/CJGAZ03/*.ja*
>> gdaltindex rpf_jog.shp /RPF/CJGA/CJGAZ04/*.ja*
>>
>> or for example make a small python script that runs recursively trough
>> all
>> sub folders and executes the gdaltindex utility.
>>
>> I have done this to serve out many JOG products (complete CD's) in on
>> layer. The layer could then look something like this.
>>
>> LAYER
>> NAME "JOG_Mosaic"
>> STATUS ON
>> DEBUG 5
>> TILEINDEX "rpf_jog.shp"
>> TILEITEM "Location"
>> TYPE RASTER
>> #MINSCALE 300000
>> MAXSCALE 600000
>> PROCESSING "RESAMPLE=AVERAGE"
>> #PROCESSING "RESAMPLE=BILINEAR"
>> PROCESSING "OVERSAMPLE_RATIO=8" # 8 improves the output image
>> greatly, could try other values
>> GROUP "JOG"
>> METADATA
>> "wms_title" "JOG Mosaic"
>> "wms_group_title" "JOG"
>> "wms_style" "Default"
>> END
>> PROJECTION
>> "init=epsg:4326"
>> END
>> END
>>
>> Admin-267 wrote:
>> > CADRG works only partialy, I have to add partial files with .ON2 or
>> .ON3
>> > extension as layers, not A.TOC file, which defines this files.
>> >
>> > For example:
>> >
>> > Now I have to write:
>> > LAYER
>> > NAME cadrg_1
>> > TYPE RASTER
>> > DATA 'ONZ03\0001P011.ON3'
>> > STATUS DEFAULT
>> > END
>> > .
>> > .
>> > .
>> > LAYER
>> > NAME cadrg_n
>> > TYPE RASTER
>> > DATA 'ONZ03\0001P0nn.ON3'
>> > STATUS DEFAULT
>> > END
>> >
>> > But I would like to write:
>> > LAYER
>> > NAME cadrg_all
>> > TYPE RASTER
>> > DATA 'A.TOC'
>> > STATUS DEFAULT
>> > END
>> >
>> > I read that mapserver have CADRG/RPF support for TOC files, but how to
>> > enable it?
>> > Also, how to enable VPF support? I know, that i can convert VPF to SHP,
>> > but is there other 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
>
>
--
View this message in context: http://n2.nabble.com/Full-CADRG-and-VPF-support-tp1972100p4126971.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
From jkapalczynski at ci.maple-grove.mn.us Mon Dec 7 10:38:12 2009
From: jkapalczynski at ci.maple-grove.mn.us (Jay Kapalczynski)
Date: Mon, 7 Dec 2009 12:38:12 -0600
Subject: [mapserver-users] aJAX
Message-ID:
I am trying to write some ajax here to run a query. I simplified this down so that no query is happening, rather just getting all the pages to work together and return some text.
I don't know whats going on here
1. I created a button that calls a javascript function
2. This function is calling and passing an ajax page some info.
function ReturnQueryResults() {
getRunquery('parcellinktest.php','1211922220012','S')
/* getResulthype('parcellinktest.php','1211922220012','S') */
}
3. Once there it (depending on what is commented out in the ajax page) it runs one of two functions (both of which are IDENTICAL)
But for some reason when I run the getRunquery I get errors....but when I run the getResulthype it works.
I am passing the same values to the same php page.
I just added the getRunquery to the ajax page.
function getResulthype(page,id,type){
var _target = 'content_details_form';
if (id.length == 0) {
document.getElementById(_target).innerHTML="No Information Available";
return;
}
xmlHttp = GetAJAXObject();
if (xmlHttp==null) {
alert ("Unable to process your request, your browser does not support AJAX!");
return;
}
var url = "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
xmlHttp.onreadystatechange = showResult;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function getRunquery(page,id,type){
var _target = 'content_details_form';
if (url.length == )) {
document.getElementById(_target_.innerHTML="No Information Available";
return;
}
xmlhttp = GetAJAXObject();
if {xmlHttp==null) {
alert ("Unable to process you request, your browser does not support AJAX");
return;
}
var url = "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
xmlHttp.onreadystatechange = showResult;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
I thought something might be hanging so I cleared all temp files, shut down, restarted Apache.
If the values are the same, and they are being sent to the same page how can I be getting errors....
Error:
getRunquery is not defined
[cid:image001.png at 01CA7739.FEAD4550]getRunquery('parcellinktest.php','1211922220012','S')
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 174 bytes
Desc: image001.png
URL:
From jkapalczynski at ci.maple-grove.mn.us Mon Dec 7 10:47:28 2009
From: jkapalczynski at ci.maple-grove.mn.us (Jay Kapalczynski)
Date: Mon, 7 Dec 2009 12:47:28 -0600
Subject: [mapserver-users] RE: aJAX
In-Reply-To:
References:
Message-ID:
I now went back and changed the ajax function (getRunquery, getResulthype) to "getResulthype" and not this function is getting the error "not defined" but it was working 20 seconds ago.
What can be hanging up here?
From: Jay Kapalczynski
Sent: Monday, December 07, 2009 12:38 PM
To: 'geomoose-developers at lists.sourceforge.net'; 'mapserver-users at lists.osgeo.org'
Subject: aJAX
I am trying to write some ajax here to run a query. I simplified this down so that no query is happening, rather just getting all the pages to work together and return some text.
I don't know whats going on here
1. I created a button that calls a javascript function
2. This function is calling and passing an ajax page some info.
function ReturnQueryResults() {
getRunquery('parcellinktest.php','1211922220012','S')
/* getResulthype('parcellinktest.php','1211922220012','S') */
}
3. Once there it (depending on what is commented out in the ajax page) it runs one of two functions (both of which are IDENTICAL)
But for some reason when I run the getRunquery I get errors....but when I run the getResulthype it works.
I am passing the same values to the same php page.
I just added the getRunquery to the ajax page.
function getResulthype(page,id,type){
var _target = 'content_details_form';
if (id.length == 0) {
document.getElementById(_target).innerHTML="No Information Available";
return;
}
xmlHttp = GetAJAXObject();
if (xmlHttp==null) {
alert ("Unable to process your request, your browser does not support AJAX!");
return;
}
var url = "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
xmlHttp.onreadystatechange = showResult;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function getRunquery(page,id,type){
var _target = 'content_details_form';
if (url.length == )) {
document.getElementById(_target_.innerHTML="No Information Available";
return;
}
xmlhttp = GetAJAXObject();
if {xmlHttp==null) {
alert ("Unable to process you request, your browser does not support AJAX");
return;
}
var url = "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
xmlHttp.onreadystatechange = showResult;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
I thought something might be hanging so I cleared all temp files, shut down, restarted Apache.
If the values are the same, and they are being sent to the same page how can I be getting errors....
Error:
getRunquery is not defined
[cid:image001.png at 01CA773B.6EF61FC0]getRunquery('parcellinktest.php','1211922220012','S')
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 174 bytes
Desc: image001.png
URL:
From woodbri at swoodbridge.com Mon Dec 7 10:47:36 2009
From: woodbri at swoodbridge.com (Stephen Woodbridge)
Date: Mon, 07 Dec 2009 13:47:36 -0500
Subject: [mapserver-users] aJAX
In-Reply-To:
References:
Message-ID: <4B1D4DC8.9000903@swoodbridge.com>
You have:
if (url.length == )) {
which looks like a typo.
-Steve
Jay Kapalczynski wrote:
>
>
> I am trying to write some ajax here to run a query. I simplified this
> down so that no query is happening, rather just getting all the pages to
> work together and return some text.
>
> I don?t know whats going on here
>
>
>
> 1. I created a button that calls a javascript function
>
>
>
> onClick="ReturnQueryResults();">
>
>
>
>
>
> 2. This function is calling and passing an ajax page some info.
>
>
>
> function ReturnQueryResults() {
>
>
>
> getRunquery('parcellinktest.php','1211922220012','S')
>
>
>
> /*
> getResulthype('parcellinktest.php','1211922220012','S') */
>
> }
>
>
>
> 3. Once there it (depending on what is commented out in the ajax
> page) it runs one of two functions (both of which are IDENTICAL)
>
> But for some reason when I run the getRunquery I get errors?.but when I
> run the getResulthype it works.
>
> I am passing the same values to the same php page.
>
> I just added the getRunquery to the ajax page.
>
>
>
>
>
> *function getResulthype(page,id,type){ *
>
>
>
> var _target = 'content_details_form';
>
>
>
> if (id.length == 0) {
>
> document.getElementById(_target).innerHTML="No Information
> Available";
>
> return;
>
> }
>
> xmlHttp = GetAJAXObject();
>
> if (xmlHttp==null) {
>
> alert ("Unable to process your request, your browser does not
> support AJAX!");
>
> return;
>
> }
>
> var url =
> "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
>
>
>
> xmlHttp.onreadystatechange = showResult;
>
> xmlHttp.open("GET",url,true);
>
> xmlHttp.send(null);
>
> }
>
>
>
> *function getRunquery(page,id,type){ *
>
> var _target = 'content_details_form';
>
>
>
> if (url.length == )) {
>
> document.getElementById(_target_.innerHTML="No Information
> Available";
>
> return;
>
> }
>
> xmlhttp = GetAJAXObject();
>
> if {xmlHttp==null) {
>
> alert ("Unable to process you request, your browser does
> not support AJAX");
>
> return;
>
> }
>
> var url =
> "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
>
>
>
> xmlHttp.onreadystatechange = showResult;
>
> xmlHttp.open("GET",url,true);
>
> xmlHttp.send(null);
>
> }
>
>
>
>
>
>
>
>
>
> I thought something might be hanging so I cleared all temp files, shut
> down, restarted Apache.
>
>
>
> If the values are the same, and they are being sent to the same page how
> can I be getting errors?.
>
>
>
> Error:
>
> getRunquery is not defined
>
> getRunquery('parcellinktest.php','1211922220012','S')
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
From bfraser at geoanalytic.com Mon Dec 7 10:53:54 2009
From: bfraser at geoanalytic.com (Brent Fraser)
Date: Mon, 07 Dec 2009 11:53:54 -0700
Subject: [mapserver-users] Re: [Geomoose-developers] aJAX
In-Reply-To:
References:
Message-ID: <4B1D4F42.9080703@geoanalytic.com>
Actually they are not identical (there's an extra ")" in getRunquery. And there
could be other syntax problems...
Jay Kapalczynski wrote:
> I am trying to write some ajax here to run a query. I simplified this
> down so that no query is happening, rather just getting all the pages to
> work together and return some text.
>
> I don?t know whats going on here
>
>
>
> 1. I created a button that calls a javascript function
>
>
>
> onClick="ReturnQueryResults();">
>
>
>
>
>
> 2. This function is calling and passing an ajax page some info.
>
>
>
> function ReturnQueryResults() {
>
>
>
> getRunquery('parcellinktest.php','1211922220012','S')
>
>
>
> /*
> getResulthype('parcellinktest.php','1211922220012','S') */
>
> }
>
>
>
> 3. Once there it (depending on what is commented out in the ajax
> page) it runs one of two functions (both of which are IDENTICAL)
>
> But for some reason when I run the getRunquery I get errors?.but when I
> run the getResulthype it works.
>
> I am passing the same values to the same php page.
>
> I just added the getRunquery to the ajax page.
>
>
>
>
>
> *function getResulthype(page,id,type){*
>
>
>
> var _target = 'content_details_form';
>
>
>
> if (id.length == 0) {
>
> document.getElementById(_target).innerHTML="No Information
> Available";
>
> return;
>
> }
>
> xmlHttp = GetAJAXObject();
>
> if (xmlHttp==null) {
>
> alert ("Unable to process your request, your browser does not
> support AJAX!");
>
> return;
>
> }
>
> var url =
> "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
>
>
>
> xmlHttp.onreadystatechange = showResult;
>
> xmlHttp.open("GET",url,true);
>
> xmlHttp.send(null);
>
> }
>
>
>
> *function getRunquery(page,id,type){*
>
> var _target = 'content_details_form';
>
>
>
> if (url.length == )) {
>
> document.getElementById(_target_.innerHTML="No Information
> Available";
>
> return;
>
> }
>
> xmlhttp = GetAJAXObject();
>
> if {xmlHttp==null) {
>
> alert ("Unable to process you request, your browser does
> not support AJAX");
>
> return;
>
> }
>
> var url =
> "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
>
>
>
> xmlHttp.onreadystatechange = showResult;
>
> xmlHttp.open("GET",url,true);
>
> xmlHttp.send(null);
>
> }
>
>
>
>
>
>
>
>
>
> I thought something might be hanging so I cleared all temp files, shut
> down, restarted Apache.
>
>
>
> If the values are the same, and they are being sent to the same page how
> can I be getting errors?.
>
>
>
> Error:
>
> getRunquery is not defined
>
> getRunquery('parcellinktest.php','1211922220012','S')
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geomoose-developers mailing list
> Geomoose-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geomoose-developers
From dgwalton at gmail.com Mon Dec 7 12:00:00 2009
From: dgwalton at gmail.com (Daniel Walton)
Date: Mon, 7 Dec 2009 14:00:00 -0600
Subject: [mapserver-users] Re: Mapserver WMS under IIS 7 x64 serving up
blank images
In-Reply-To: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
References: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
Message-ID: <8ab83e650912071200g25acd857mc52336206dee29e0@mail.gmail.com>
Update: Same problem happens with the x86 binaries all other things being
equal. Also, I have trimmed the set of files in my mapserver binary folder
to these:
epsg
fribidi.dll
gdal16.dll
geos_c.dll
iconv.dll
libcurl.dll
libexpat.dll
libfcgi.dll
libmap.dll
libpq.dll
libxml2.dll
mapserv.exe
pdflib.dll
proj.dll
spatialite.dll
web.config
xerces-c_2_8.dll
zlib1.dll
On Mon, Dec 7, 2009 at 9:46 AM, Daniel Walton wrote:
> Thanks to all who've been helping me along. I'm getting close to having x64
> working now. I've worked through a slew of issues over the weekend, most
> related to permissions. My latest issue is that mapserv.exe, when invoked
> via IIS 7's FastCGI (classic mode) module, is returning blank images.
> GetCapabilities is working fine, and the GetMap images are the right size
> and format, but they're blank. Here's my setup: I downloaded and installed
> the x64 binaries (from Tamas, thanks!) into a single directory (C
> :\mapserver\). The IIS impersonated user has sufficient privileges on this
> folder and all data folders. I am accessing mapserver's WMS service with
> this URL:
>
>
> http://www.fireimagery.com/ms/mapserv.exe?map=C%3A%2Fmaps%2FA091207074551.map&SERVICE=WMS&REQUEST=GetMap&WIDTH=1680&HEIGHT=536&FORMAT=image/png&LAYERS=ZZ&S0TYLE=&BGCOLOR=0x888888&TRANSPARENT=FALSE&VERSION=1.3.0&CRS=EPSG:4326&BBOX=36.0156802563091,-123.307040153269,37.2036688809148,-119.583493717938&EXCEPTIONS=XML
>
> The corresponding mapfile text is as follows:
>
> MAP
> EXTENT 36.0992948502284 -121.822480778145 36.3421121497716
> -121.520865221855
> IMAGECOLOR 255 255 255
> IMAGETYPE PNG
> SIZE -1 -1
> STATUS ON
> UNITS DD
> CONFIG PROJ_LIB "C:/mapserver/"
> NAME "A091207074551"
>
> OUTPUTFORMAT
> NAME "aggpng24"
> MIMETYPE "image/png"
> DRIVER "AGG/PNG"
> EXTENSION "PNG"
> IMAGEMODE "RGBA"
> TRANSPARENT TRUE
> END
>
> PROJECTION
> "init=epsg:4326"
> END
>
> QUERYMAP
> COLOR 255 255 0
> SIZE -1 -1
> STATUS OFF
> STYLE HILITE
> END
>
> WEB
> IMAGEPATH ""
> IMAGEURL ""
> METADATA
> "wms_title" "A091207074551"
> END
> QUERYFORMAT text/html
> LEGENDFORMAT text/html
> BROWSEFORMAT text/html
> END
>
> LAYER
> DATA
> "C:\rawimages\A091207074551_output\A091207074551_0_config_PROCESS_RESULTS\BASINCOMPLEX_ftp.coloradoskye.com_2008_CA_Siege_080627_1200Local_SPOT_NIR_OUT.PNG"
> EXTENT 36.0992948502284 -121.822480778145 36.3421121497716
> -121.520865221855
> METADATA
> "wms_srs" "EPSG:4326"
> "wms_extent" "36.1 -121.8 36.3 -121.5"
> "wms_title"
> "BASINCOMPLEX_FTP.COLORADOSKYE.COM_2008_CA_SIEGE_080627_1200LOCAL_SPOT_NIR"
> END
> NAME "ZZ"
> PROJECTION
> "init=epsg:4326"
> END
> STATUS ON
> TYPE RASTER
> UNITS DD
> END
>
> END
>
> I have tried several different image formats and drivers, all produce blank
> images. Any ideas what might be wrong? Any way to set up more helpful error
> trapping?
>
> Thanks,
> Dan Walton
> GIS Fire Tools
>
>
> On Sun, Dec 6, 2009 at 4:04 PM, Tamas Szekeres wrote:
>
>> Daniel,
>>
>> In bin/gdal/apps you can find the generic gdal/ogr applications, whereas
>> the applications in bin/gdal/csharp have been implemented by using the gdal
>> c# API. gdalinfo.exe and ogrinfo.exe provides similar functionalities in
>> both cases.
>>
>> Best regards,
>>
>> Tamas
>>
>>
>>
>>
>> 2009/12/6 Daniel Walton
>>
>> Tamas,
>>>
>>> In your binary distibutions there are 2 versions of gdalinfo.exe and
>>> ogrinfo.exe, one in bin/gdal/apps and the other in bin/gdal/csharp. What is
>>> the difference between the two versions?
>>>
>>> -Dan
>>>
>>>
>>>
>>> On Sat, Dec 5, 2009 at 3:31 AM, Tamas Szekeres wrote:
>>>
>>>> Have you configured mapping the .exe extension to this mapserv.exe with
>>>> your IIS application?
>>>> Make sure to enable CGI mode and copy all the x64 dll-s to the same
>>>> directory as the mapserv.exe application.
>>>> Set up the executing permissions to something like 'Scripts and
>>>> Executables'
>>>>
>>>> Best regards,
>>>>
>>>> Tamas
>>>>
>>>>
>>>>
>>>> 2009/12/5 Daniel Walton
>>>>
>>>> Tamas,
>>>>>
>>>>> Update: I removed the CGI mapping and just used the default CGI hander
>>>>> in IIS. Now the request returns a file named mapserv.exe. I attached it as a
>>>>> text file. Again, thanks for any insights.
>>>>>
>>>>> -Dan
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Dec 4, 2009 at 9:14 PM, Daniel Walton wrote:
>>>>>
>>>>>> Tamas,
>>>>>>
>>>>>> I installed the binaries from your website into c:\mapserver, added
>>>>>> all the paths to the system path variable, and set up the IIS folders. Now I
>>>>>> get a 500 internal error when trying to access mapserv.exe. The application
>>>>>> log gives this error:
>>>>>>
>>>>>> *Faulting application mapserv.exe, version 0.0.0.0, time stamp
>>>>>> 0x4b1893cb, faulting module libmap.dll, version 6.0.6001.18000, time stamp
>>>>>> 0x4791adec, exception code 0xc0000135, fault offset 0x00000000000b1188,
>>>>>> process id 0x4bc, application start time 0x01ca7557ca56f442.*
>>>>>>
>>>>>> Any idea what I'm doing wrong?
>>>>>>
>>>>>> Thanks,
>>>>>> Dan
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Dec 4, 2009 at 2:22 PM, Tamas Szekeres wrote:
>>>>>>
>>>>>>> I've mostly used this with IIS6,but it should however work on IIS7 as
>>>>>>> well.
>>>>>>>
>>>>>>> On IIS6 I configure a web server extensions to mapserv.exe (CGI mode)
>>>>>>> and fcgiext.dll (for FastCGI).
>>>>>>> Set up the executing permission (Scripts and Executables) and the
>>>>>>> application extension mapping (.exe) to mapserv.exe or fcgiext.dll.
>>>>>>>
>>>>>>> Best regards,
>>>>>>>
>>>>>>> Tamas
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2009/12/4 Daniel Walton
>>>>>>>
>>>>>>>> Tamas,
>>>>>>>> That's exactly what I was hoping you'd say! Which IIS module mapping
>>>>>>>> should I use for *.exe?
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Dec 4, 2009 at 1:55 PM, Tamas Szekeres >>>>>>> > wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2009/12/4 Daniel Walton
>>>>>>>>>
>>>>>>>>>> Tamas,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Thanks for the reply. If I just want to use mapserver CGI as a WMS
>>>>>>>>>> server, do I need PHP? Is there another way to interact with mapserv.exe for
>>>>>>>>>> this limited purpose (e.g. an ASP.NET wrapper or something)?
>>>>>>>>>>
>>>>>>>>>> -Dan
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> Dan,
>>>>>>>>>
>>>>>>>>> If you use the MapServer CGI (mapserv.exe) you wouldn't require to
>>>>>>>>> compile against PHP, the packages from
>>>>>>>>> http://vbkto.dyndns.org/sdk/ could be used without any change.
>>>>>>>>> Those packages also contain the MapScript C# interface
>>>>>>>>> (mapscript_csharp.dll) which would support creating ASP.NETapplications around the MapServer codebase when you have further
>>>>>>>>> requirements about the desired functionality.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Best regards,
>>>>>>>>>
>>>>>>>>> Tamas
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dmorissette at mapgears.com Mon Dec 7 12:09:35 2009
From: dmorissette at mapgears.com (Daniel Morissette)
Date: Mon, 07 Dec 2009 15:09:35 -0500
Subject: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank
images
In-Reply-To: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
References: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
Message-ID: <4B1D60FF.6030403@mapgears.com>
Daniel Walton wrote:
> Thanks to all who've been helping me along. I'm getting close to having
> x64 working now. I've worked through a slew of issues over the weekend,
> most related to permissions. My latest issue is that mapserv.exe, when
> invoked via IIS 7's FastCGI (classic mode) module, is returning blank
> images. GetCapabilities is working fine, and the GetMap images are the
> right size and format, but they're blank. Here's my setup: I downloaded
> and installed the x64 binaries (from Tamas, thanks!) into a single
> directory (C :\mapserver\).
Why do you think the problems are related to IIS7/x64? Have you verified
that the same mapfile produces valid maps under MS4W or another server
environment?
>
> LAYER
> DATA
> "C:\rawimages\A091207074551_output\A091207074551_0_config_PROCESS_RESULTS\BASINCOMPLEX_ftp.coloradoskye.com_2008_CA_Siege_080627_1200Local_SPOT_NIR_OUT.PNG"
> EXTENT 36.0992948502284 -121.822480778145 36.3421121497716
> -121.520865221855
Your DATA statement points to a PNG file. PNGs do not carry any
georeferencing information by default, and the EXTENT line is not a
replacement for missing image referencing info. Did you create a world
file (.wld) for your PNG to specify the geographical extents of the
image? That could very well explain the blank map.
See: http://mapserver.org/input/raster.html#georeference-with-world-files
Daniel
--
Daniel Morissette
http://www.mapgears.com/
From jkapalczynski at ci.maple-grove.mn.us Mon Dec 7 12:21:26 2009
From: jkapalczynski at ci.maple-grove.mn.us (Jay Kapalczynski)
Date: Mon, 7 Dec 2009 14:21:26 -0600
Subject: [mapserver-users] RE: [Geomoose-developers] aJAX
In-Reply-To: <4B1D4F42.9080703@geoanalytic.com>
References:
<4B1D4F42.9080703@geoanalytic.com>
Message-ID:
Brent and Stephen.....
thank for the extra set of eyes...that was it...there were actually a couple things wrong I thank you for pointing me in the right direction.
I did a copy and paste, like I should have done before, and changed the functions name and it works....
Thank you both for your help
Thanks
-----Original Message-----
From: Brent Fraser [mailto:bfraser at geoanalytic.com]
Sent: Monday, December 07, 2009 12:54 PM
To: Jay Kapalczynski
Cc: 'geomoose-developers at lists.sourceforge.net'; 'mapserver-users at lists.osgeo.org'
Subject: Re: [Geomoose-developers] aJAX
Actually they are not identical (there's an extra ")" in getRunquery. And there
could be other syntax problems...
Jay Kapalczynski wrote:
> I am trying to write some ajax here to run a query. I simplified this
> down so that no query is happening, rather just getting all the pages to
> work together and return some text.
>
> I don't know whats going on here
>
>
>
> 1. I created a button that calls a javascript function
>
>
>
> onClick="ReturnQueryResults();">
>
>
>
>
>
> 2. This function is calling and passing an ajax page some info.
>
>
>
> function ReturnQueryResults() {
>
>
>
> getRunquery('parcellinktest.php','1211922220012','S')
>
>
>
> /*
> getResulthype('parcellinktest.php','1211922220012','S') */
>
> }
>
>
>
> 3. Once there it (depending on what is commented out in the ajax
> page) it runs one of two functions (both of which are IDENTICAL)
>
> But for some reason when I run the getRunquery I get errors....but when I
> run the getResulthype it works.
>
> I am passing the same values to the same php page.
>
> I just added the getRunquery to the ajax page.
>
>
>
>
>
> *function getResulthype(page,id,type){*
>
>
>
> var _target = 'content_details_form';
>
>
>
> if (id.length == 0) {
>
> document.getElementById(_target).innerHTML="No Information
> Available";
>
> return;
>
> }
>
> xmlHttp = GetAJAXObject();
>
> if (xmlHttp==null) {
>
> alert ("Unable to process your request, your browser does not
> support AJAX!");
>
> return;
>
> }
>
> var url =
> "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
>
>
>
> xmlHttp.onreadystatechange = showResult;
>
> xmlHttp.open("GET",url,true);
>
> xmlHttp.send(null);
>
> }
>
>
>
> *function getRunquery(page,id,type){*
>
> var _target = 'content_details_form';
>
>
>
> if (url.length == )) {
>
> document.getElementById(_target_.innerHTML="No Information
> Available";
>
> return;
>
> }
>
> xmlhttp = GetAJAXObject();
>
> if {xmlHttp==null) {
>
> alert ("Unable to process you request, your browser does
> not support AJAX");
>
> return;
>
> }
>
> var url =
> "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
>
>
>
> xmlHttp.onreadystatechange = showResult;
>
> xmlHttp.open("GET",url,true);
>
> xmlHttp.send(null);
>
> }
>
>
>
>
>
>
>
>
>
> I thought something might be hanging so I cleared all temp files, shut
> down, restarted Apache.
>
>
>
> If the values are the same, and they are being sent to the same page how
> can I be getting errors....
>
>
>
> Error:
>
> getRunquery is not defined
>
> getRunquery('parcellinktest.php','1211922220012','S')
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geomoose-developers mailing list
> Geomoose-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geomoose-developers
From dgwalton at gmail.com Mon Dec 7 12:22:48 2009
From: dgwalton at gmail.com (Daniel Walton)
Date: Mon, 7 Dec 2009 14:22:48 -0600
Subject: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank
images
In-Reply-To: <4B1D60FF.6030403@mapgears.com>
References: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
<4B1D60FF.6030403@mapgears.com>
Message-ID: <8ab83e650912071222u1edcb4efx63a758610e734ea4@mail.gmail.com>
Daniel,
Yes, the same mapfile worked under MS4W on a 32-bit machine. I have verified
that this same problem occurs using the x86 binaries from Tamas' site run in
the current x64 environment. The source image is in PNG format in order to
make transparency work well on the client. (My client is Silverlight-based,
and PNG is the only supported format that supports transparency). The source
image does have a world (*.WLD) file which contains these values (file is
generated by running gdal_translate on a geotiff image):
0.0002148680
0.0000000000
0.0000000000
-0.0002148680
-121.7870074149
36.3421302860
Thanks,
Dan
On Mon, Dec 7, 2009 at 2:09 PM, Daniel Morissette
wrote:
> Daniel Walton wrote:
>
>> Thanks to all who've been helping me along. I'm getting close to having
>> x64 working now. I've worked through a slew of issues over the weekend, most
>> related to permissions. My latest issue is that mapserv.exe, when invoked
>> via IIS 7's FastCGI (classic mode) module, is returning blank images.
>> GetCapabilities is working fine, and the GetMap images are the
>> right size and format, but they're blank. Here's my setup: I downloaded
>> and installed the x64 binaries (from Tamas, thanks!) into a single directory
>> (C :\mapserver\).
>>
>
>
> Why do you think the problems are related to IIS7/x64? Have you verified
> that the same mapfile produces valid maps under MS4W or another server
> environment?
>
>
>
>> LAYER
>> DATA
>> "C:\rawimages\A091207074551_output\A091207074551_0_config_PROCESS_RESULTS\BASINCOMPLEX_ftp.coloradoskye.com_2008_CA_Siege_080627_1200Local_SPOT_NIR_OUT.PNG"
>> EXTENT 36.0992948502284 -121.822480778145 36.3421121497716
>> -121.520865221855
>>
>
>
> Your DATA statement points to a PNG file. PNGs do not carry any
> georeferencing information by default, and the EXTENT line is not a
> replacement for missing image referencing info. Did you create a world file
> (.wld) for your PNG to specify the geographical extents of the image? That
> could very well explain the blank map.
>
> See: http://mapserver.org/input/raster.html#georeference-with-world-files
>
> Daniel
> --
> Daniel Morissette
> http://www.mapgears.com/
> _______________________________________________
> 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:
From jkapalczynski at ci.maple-grove.mn.us Mon Dec 7 12:31:27 2009
From: jkapalczynski at ci.maple-grove.mn.us (Jay Kapalczynski)
Date: Mon, 7 Dec 2009 14:31:27 -0600
Subject: [mapserver-users] RE: [Geomoose-developers] aJAX
In-Reply-To: <4B1D4F42.9080703@geoanalytic.com>
References:
<4B1D4F42.9080703@geoanalytic.com>
Message-ID:
One last syntax question....
When I call the ajax page to send the values to:
getRunquery('parcellinktest.php','1211922220012','S')
Whats the syntax to replace the '1211922220012' with a variable?
I tried this:
getRunquery('parcellinktest.php', .'varaible'. ,'S')
thanks again
-----Original Message-----
From: Brent Fraser [mailto:bfraser at geoanalytic.com]
Sent: Monday, December 07, 2009 12:54 PM
To: Jay Kapalczynski
Cc: 'geomoose-developers at lists.sourceforge.net'; 'mapserver-users at lists.osgeo.org'
Subject: Re: [Geomoose-developers] aJAX
Actually they are not identical (there's an extra ")" in getRunquery. And there
could be other syntax problems...
Jay Kapalczynski wrote:
> I am trying to write some ajax here to run a query. I simplified this
> down so that no query is happening, rather just getting all the pages to
> work together and return some text.
>
> I don't know whats going on here
>
>
>
> 1. I created a button that calls a javascript function
>
>
>
> onClick="ReturnQueryResults();">
>
>
>
>
>
> 2. This function is calling and passing an ajax page some info.
>
>
>
> function ReturnQueryResults() {
>
>
>
> getRunquery('parcellinktest.php','1211922220012','S')
>
>
>
> /*
> getResulthype('parcellinktest.php','1211922220012','S') */
>
> }
>
>
>
> 3. Once there it (depending on what is commented out in the ajax
> page) it runs one of two functions (both of which are IDENTICAL)
>
> But for some reason when I run the getRunquery I get errors....but when I
> run the getResulthype it works.
>
> I am passing the same values to the same php page.
>
> I just added the getRunquery to the ajax page.
>
>
>
>
>
> *function getResulthype(page,id,type){*
>
>
>
> var _target = 'content_details_form';
>
>
>
> if (id.length == 0) {
>
> document.getElementById(_target).innerHTML="No Information
> Available";
>
> return;
>
> }
>
> xmlHttp = GetAJAXObject();
>
> if (xmlHttp==null) {
>
> alert ("Unable to process your request, your browser does not
> support AJAX!");
>
> return;
>
> }
>
> var url =
> "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
>
>
>
> xmlHttp.onreadystatechange = showResult;
>
> xmlHttp.open("GET",url,true);
>
> xmlHttp.send(null);
>
> }
>
>
>
> *function getRunquery(page,id,type){*
>
> var _target = 'content_details_form';
>
>
>
> if (url.length == )) {
>
> document.getElementById(_target_.innerHTML="No Information
> Available";
>
> return;
>
> }
>
> xmlhttp = GetAJAXObject();
>
> if {xmlHttp==null) {
>
> alert ("Unable to process you request, your browser does
> not support AJAX");
>
> return;
>
> }
>
> var url =
> "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
>
>
>
> xmlHttp.onreadystatechange = showResult;
>
> xmlHttp.open("GET",url,true);
>
> xmlHttp.send(null);
>
> }
>
>
>
>
>
>
>
>
>
> I thought something might be hanging so I cleared all temp files, shut
> down, restarted Apache.
>
>
>
> If the values are the same, and they are being sent to the same page how
> can I be getting errors....
>
>
>
> Error:
>
> getRunquery is not defined
>
> getRunquery('parcellinktest.php','1211922220012','S')
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geomoose-developers mailing list
> Geomoose-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geomoose-developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jkapalczynski at ci.maple-grove.mn.us Mon Dec 7 12:32:33 2009
From: jkapalczynski at ci.maple-grove.mn.us (Jay Kapalczynski)
Date: Mon, 7 Dec 2009 14:32:33 -0600
Subject: [mapserver-users] RE: [Geomoose-developers] aJAX
In-Reply-To:
References:
<4B1D4F42.9080703@geoanalytic.com>
Message-ID:
NEVER MIND GOT IT.....just took the ' ' off.....
getRunquery('parcellinktest.php',varaible,'S')
From: Jay Kapalczynski
Sent: Monday, December 07, 2009 2:31 PM
To: 'Brent Fraser'
Cc: 'geomoose-developers at lists.sourceforge.net'; 'mapserver-users at lists.osgeo.org'
Subject: RE: [Geomoose-developers] aJAX
One last syntax question....
When I call the ajax page to send the values to:
getRunquery('parcellinktest.php','1211922220012','S')
Whats the syntax to replace the '1211922220012' with a variable?
I tried this:
getRunquery('parcellinktest.php', .'varaible'. ,'S')
thanks again
-----Original Message-----
From: Brent Fraser [mailto:bfraser at geoanalytic.com]
Sent: Monday, December 07, 2009 12:54 PM
To: Jay Kapalczynski
Cc: 'geomoose-developers at lists.sourceforge.net'; 'mapserver-users at lists.osgeo.org'
Subject: Re: [Geomoose-developers] aJAX
Actually they are not identical (there's an extra ")" in getRunquery. And there
could be other syntax problems...
Jay Kapalczynski wrote:
> I am trying to write some ajax here to run a query. I simplified this
> down so that no query is happening, rather just getting all the pages to
> work together and return some text.
>
> I don't know whats going on here
>
>
>
> 1. I created a button that calls a javascript function
>
>
>
> onClick="ReturnQueryResults();">
>
>
>
>
>
> 2. This function is calling and passing an ajax page some info.
>
>
>
> function ReturnQueryResults() {
>
>
>
> getRunquery('parcellinktest.php','1211922220012','S')
>
>
>
> /*
> getResulthype('parcellinktest.php','1211922220012','S') */
>
> }
>
>
>
> 3. Once there it (depending on what is commented out in the ajax
> page) it runs one of two functions (both of which are IDENTICAL)
>
> But for some reason when I run the getRunquery I get errors....but when I
> run the getResulthype it works.
>
> I am passing the same values to the same php page.
>
> I just added the getRunquery to the ajax page.
>
>
>
>
>
> *function getResulthype(page,id,type){*
>
>
>
> var _target = 'content_details_form';
>
>
>
> if (id.length == 0) {
>
> document.getElementById(_target).innerHTML="No Information
> Available";
>
> return;
>
> }
>
> xmlHttp = GetAJAXObject();
>
> if (xmlHttp==null) {
>
> alert ("Unable to process your request, your browser does not
> support AJAX!");
>
> return;
>
> }
>
> var url =
> "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
>
>
>
> xmlHttp.onreadystatechange = showResult;
>
> xmlHttp.open("GET",url,true);
>
> xmlHttp.send(null);
>
> }
>
>
>
> *function getRunquery(page,id,type){*
>
> var _target = 'content_details_form';
>
>
>
> if (url.length == )) {
>
> document.getElementById(_target_.innerHTML="No Information
> Available";
>
> return;
>
> }
>
> xmlhttp = GetAJAXObject();
>
> if {xmlHttp==null) {
>
> alert ("Unable to process you request, your browser does
> not support AJAX");
>
> return;
>
> }
>
> var url =
> "http://127.0.0.1:80/geomoose/php/"+page+"?id="+id+"&type="+type;
>
>
>
> xmlHttp.onreadystatechange = showResult;
>
> xmlHttp.open("GET",url,true);
>
> xmlHttp.send(null);
>
> }
>
>
>
>
>
>
>
>
>
> I thought something might be hanging so I cleared all temp files, shut
> down, restarted Apache.
>
>
>
> If the values are the same, and they are being sent to the same page how
> can I be getting errors....
>
>
>
> Error:
>
> getRunquery is not defined
>
> getRunquery('parcellinktest.php','1211922220012','S')
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geomoose-developers mailing list
> Geomoose-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geomoose-developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dmorissette at mapgears.com Mon Dec 7 12:38:01 2009
From: dmorissette at mapgears.com (Daniel Morissette)
Date: Mon, 07 Dec 2009 15:38:01 -0500
Subject: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank
images
In-Reply-To: <8ab83e650912071222u1edcb4efx63a758610e734ea4@mail.gmail.com>
References: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
<4B1D60FF.6030403@mapgears.com>
<8ab83e650912071222u1edcb4efx63a758610e734ea4@mail.gmail.com>
Message-ID: <4B1D67A9.8040506@mapgears.com>
Daniel Walton wrote:
>
> Yes, the same mapfile worked under MS4W on a 32-bit machine. I have
> verified that this same problem occurs using the x86 binaries from
> Tamas' site run in the current x64 environment. The source image is in
> PNG format in order to make transparency work well on the client. (My
> client is Silverlight-based, and PNG is the only supported format that
> supports transparency). The source image does have a world (*.WLD) file
> which contains these values (file is generated by running gdal_translate
> on a geotiff image):
>
Um... perhaps try using DEBUG/MS_ERRORFILE and look for hints in the log
output, if you haven't tried that already.
--
Daniel Morissette
http://www.mapgears.com/
From dgwalton at gmail.com Mon Dec 7 12:47:39 2009
From: dgwalton at gmail.com (Daniel Walton)
Date: Mon, 7 Dec 2009 14:47:39 -0600
Subject: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank
images
In-Reply-To: <4B1D67A9.8040506@mapgears.com>
References: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
<4B1D60FF.6030403@mapgears.com>
<8ab83e650912071222u1edcb4efx63a758610e734ea4@mail.gmail.com>
<4B1D67A9.8040506@mapgears.com>
Message-ID: <8ab83e650912071247w7b93cb8bt90fe0c6a7a460785@mail.gmail.com>
Thanks Daniel. No dice, though, log is empty.
On Mon, Dec 7, 2009 at 2:38 PM, Daniel Morissette
wrote:
> Daniel Walton wrote:
>
>>
>> Yes, the same mapfile worked under MS4W on a 32-bit machine. I have
>> verified that this same problem occurs using the x86 binaries from Tamas'
>> site run in the current x64 environment. The source image is in PNG format
>> in order to make transparency work well on the client. (My client is
>> Silverlight-based, and PNG is the only supported format that supports
>> transparency). The source image does have a world (*.WLD) file which
>> contains these values (file is generated by running gdal_translate on a
>> geotiff image):
>>
>>
> Um... perhaps try using DEBUG/MS_ERRORFILE and look for hints in the log
> output, if you haven't tried that already.
>
>
> --
> Daniel Morissette
> http://www.mapgears.com/
> _______________________________________________
> 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:
From bjorn.harrtell at gmail.com Mon Dec 7 13:07:27 2009
From: bjorn.harrtell at gmail.com (=?UTF-8?Q?Bj=C3=B6rn_Harrtell?=)
Date: Mon, 7 Dec 2009 22:07:27 +0100
Subject: [mapserver-users] Raster layer data sources multiple projections
Message-ID:
Can one raster layer be served from multiple data sources for the same
geographical area but in different projections? Cannot find any
indication if so but I was hoping for undocumented features.. :)
The use case is that we want one layer with optimal performance for
several projections. On-the-fly reprojection is too slow and we don't
want to split into several layers.
Regards,
Bj?rn Harrtell
From bjorn.harrtell at gmail.com Mon Dec 7 13:11:36 2009
From: bjorn.harrtell at gmail.com (=?UTF-8?Q?Bj=C3=B6rn_Harrtell?=)
Date: Mon, 7 Dec 2009 22:11:36 +0100
Subject: [mapserver-users] Dynamically update layers without service
interruption
Message-ID:
Is it possible to dynamically add and/or update layer definitions that
also might involve updates to the underlying data without *any*
service interruption? I'm primarily interested in this use case when
using raster layers.
I have indications that service interruptions can happen but cannot
verify yet. I found
http://www.mapserver.org/development/rfc/ms-rfc-44.html#rfc44
describing the feature of dynamic updates (I assume?) but no mention
about if service interruption can be expected and/or how to avoid it.
Regards,
Bj?rn Harrtell
From warmerdam at pobox.com Mon Dec 7 13:11:21 2009
From: warmerdam at pobox.com (Frank Warmerdam)
Date: Mon, 07 Dec 2009 16:11:21 -0500
Subject: [mapserver-users] Raster layer data sources multiple projections
In-Reply-To:
References:
Message-ID: <4B1D6F79.9010906@pobox.com>
Bj?rn Harrtell wrote:
> Can one raster layer be served from multiple data sources for the same
> geographical area but in different projections? Cannot find any
> indication if so but I was hoping for undocumented features.. :)
>
> The use case is that we want one layer with optimal performance for
> several projections. On-the-fly reprojection is too slow and we don't
> want to split into several layers.
Bj?rn,
I am not aware of any way to accomplish this within MapServer.
Potentially you could write an URL request interpreter that would
utilize different mapfiles depending on the coordinate system of the
request, or possible adapt the selected layer based on the coordinate
system. But this is "front end" and not something MapServer is providing
any specific support for.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
From Steve.Lime at state.mn.us Mon Dec 7 13:14:00 2009
From: Steve.Lime at state.mn.us (Steve Lime)
Date: Mon, 07 Dec 2009 15:14:00 -0600
Subject: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up
blank images
In-Reply-To: <8ab83e650912071247w7b93cb8bt90fe0c6a7a460785@mail.gmail.com>
References: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
<4B1D60FF.6030403@mapgears.com>
<8ab83e650912071222u1edcb4efx63a758610e734ea4@mail.gmail.com>
<4B1D67A9.8040506@mapgears.com>
<8ab83e650912071247w7b93cb8bt90fe0c6a7a460785@mail.gmail.com>
Message-ID: <4B1D1B37.5157.008F.0@dnr.state.mn.us>
If I take the request out of WMS context to straight CGI with this request:
http://www.fireimagery.com/ms/mapserv.exe?map=C:\maps\A091207074551.map&mode=map&mapsize=300+300&layer=ZZ
I get the following error:
msDrawMap(): Image handling error. Failed to draw layer named 'ZZ'. msDrawRaster(): Image handling error. Unrecognized or unsupported image format drawEPP(): Image handling error. EPPL7 support is not available.
Typically you'll see that when GDAL failed to identify the filetype. EPPL7 is the last thing checked so that's not relevant by itself. I guess I'd start
by making sure the image is valid.
Steve
>>> On 12/7/2009 at 2:47 PM, in message
<8ab83e650912071247w7b93cb8bt90fe0c6a7a460785 at mail.gmail.com>, Daniel Walton
wrote:
> Thanks Daniel. No dice, though, log is empty.
>
> On Mon, Dec 7, 2009 at 2:38 PM, Daniel Morissette
> wrote:
>
>> Daniel Walton wrote:
>>
>>>
>>> Yes, the same mapfile worked under MS4W on a 32-bit machine. I have
>>> verified that this same problem occurs using the x86 binaries from Tamas'
>>> site run in the current x64 environment. The source image is in PNG format
>>> in order to make transparency work well on the client. (My client is
>>> Silverlight-based, and PNG is the only supported format that supports
>>> transparency). The source image does have a world (*.WLD) file which
>>> contains these values (file is generated by running gdal_translate on a
>>> geotiff image):
>>>
>>>
>> Um... perhaps try using DEBUG/MS_ERRORFILE and look for hints in the log
>> output, if you haven't tried that already.
>>
>>
>> --
>> Daniel Morissette
>> http://www.mapgears.com/
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
From dgwalton at gmail.com Mon Dec 7 13:18:09 2009
From: dgwalton at gmail.com (Daniel Walton)
Date: Mon, 7 Dec 2009 15:18:09 -0600
Subject: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank
images
In-Reply-To: <4B1D1B37.5157.008F.0@dnr.state.mn.us>
References: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
<4B1D60FF.6030403@mapgears.com>
<8ab83e650912071222u1edcb4efx63a758610e734ea4@mail.gmail.com>
<4B1D67A9.8040506@mapgears.com>
<8ab83e650912071247w7b93cb8bt90fe0c6a7a460785@mail.gmail.com>
<4B1D1B37.5157.008F.0@dnr.state.mn.us>
Message-ID: <8ab83e650912071318r3f35074anb9d6c9b64393a0c4@mail.gmail.com>
I'm creating the PNG image from a GeoTIFF using:
gdal_translate -of PNG -quiet -scale -co worldfile=yes
[Geotiff_filename].tif [PNG_filename].PNG.
Also, these PNG source images were working fine under MS4W x86.
-Dan
On Mon, Dec 7, 2009 at 3:14 PM, Steve Lime wrote:
> If I take the request out of WMS context to straight CGI with this request:
>
> http://www.fireimagery.com/ms/mapserv.exe?map=C
> :\maps\A091207074551.map&mode=map&mapsize=300+300&layer=ZZ
>
> I get the following error:
>
> msDrawMap(): Image handling error. Failed to draw layer named 'ZZ'.
> msDrawRaster(): Image handling error. Unrecognized or unsupported image
> format drawEPP(): Image handling error. EPPL7 support is not available.
>
> Typically you'll see that when GDAL failed to identify the filetype. EPPL7
> is the last thing checked so that's not relevant by itself. I guess I'd
> start
> by making sure the image is valid.
>
> Steve
>
> >>> On 12/7/2009 at 2:47 PM, in message
> <8ab83e650912071247w7b93cb8bt90fe0c6a7a460785 at mail.gmail.com>, Daniel
> Walton
> wrote:
> > Thanks Daniel. No dice, though, log is empty.
> >
> > On Mon, Dec 7, 2009 at 2:38 PM, Daniel Morissette
> > wrote:
> >
> >> Daniel Walton wrote:
> >>
> >>>
> >>> Yes, the same mapfile worked under MS4W on a 32-bit machine. I have
> >>> verified that this same problem occurs using the x86 binaries from
> Tamas'
> >>> site run in the current x64 environment. The source image is in PNG
> format
> >>> in order to make transparency work well on the client. (My client is
> >>> Silverlight-based, and PNG is the only supported format that supports
> >>> transparency). The source image does have a world (*.WLD) file which
> >>> contains these values (file is generated by running gdal_translate on a
> >>> geotiff image):
> >>>
> >>>
> >> Um... perhaps try using DEBUG/MS_ERRORFILE and look for hints in the log
> >> output, if you haven't tried that already.
> >>
> >>
> >> --
> >> Daniel Morissette
> >> http://www.mapgears.com/
> >> _______________________________________________
> >> 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:
From szekerest at gmail.com Mon Dec 7 13:22:07 2009
From: szekerest at gmail.com (Tamas Szekeres)
Date: Mon, 7 Dec 2009 22:22:07 +0100
Subject: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank
images
In-Reply-To: <4B1D1B37.5157.008F.0@dnr.state.mn.us>
References: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
<4B1D60FF.6030403@mapgears.com>
<8ab83e650912071222u1edcb4efx63a758610e734ea4@mail.gmail.com>
<4B1D67A9.8040506@mapgears.com>
<8ab83e650912071247w7b93cb8bt90fe0c6a7a460785@mail.gmail.com>
<4B1D1B37.5157.008F.0@dnr.state.mn.us>
Message-ID:
Daniel,
This may also be an issue if GDAL couldn't actually open this file bacause
of any reason (permission?).
Make sure about this, by using a file monitoring tool, like SysInternals
filemon for instance.
Best regards,
Tamas
2009/12/7 Steve Lime
> If I take the request out of WMS context to straight CGI with this request:
>
> http://www.fireimagery.com/ms/mapserv.exe?map=C
> :\maps\A091207074551.map&mode=map&mapsize=300+300&layer=ZZ
>
> I get the following error:
>
> msDrawMap(): Image handling error. Failed to draw layer named 'ZZ'.
> msDrawRaster(): Image handling error. Unrecognized or unsupported image
> format drawEPP(): Image handling error. EPPL7 support is not available.
>
> Typically you'll see that when GDAL failed to identify the filetype. EPPL7
> is the last thing checked so that's not relevant by itself. I guess I'd
> start
> by making sure the image is valid.
>
> Steve
>
> >>> On 12/7/2009 at 2:47 PM, in message
> <8ab83e650912071247w7b93cb8bt90fe0c6a7a460785 at mail.gmail.com>, Daniel
> Walton
> wrote:
> > Thanks Daniel. No dice, though, log is empty.
> >
> > On Mon, Dec 7, 2009 at 2:38 PM, Daniel Morissette
> > wrote:
> >
> >> Daniel Walton wrote:
> >>
> >>>
> >>> Yes, the same mapfile worked under MS4W on a 32-bit machine. I have
> >>> verified that this same problem occurs using the x86 binaries from
> Tamas'
> >>> site run in the current x64 environment. The source image is in PNG
> format
> >>> in order to make transparency work well on the client. (My client is
> >>> Silverlight-based, and PNG is the only supported format that supports
> >>> transparency). The source image does have a world (*.WLD) file which
> >>> contains these values (file is generated by running gdal_translate on a
> >>> geotiff image):
> >>>
> >>>
> >> Um... perhaps try using DEBUG/MS_ERRORFILE and look for hints in the log
> >> output, if you haven't tried that already.
> >>
> >>
> >> --
> >> Daniel Morissette
> >> http://www.mapgears.com/
> >> _______________________________________________
> >> 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:
From Steve.Lime at state.mn.us Mon Dec 7 13:22:48 2009
From: Steve.Lime at state.mn.us (Steve Lime)
Date: Mon, 07 Dec 2009 15:22:48 -0600
Subject: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up
blank images
In-Reply-To: <8ab83e650912071318r3f35074anb9d6c9b64393a0c4@mail.gmail.com>
References: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
<4B1D60FF.6030403@mapgears.com>
<8ab83e650912071222u1edcb4efx63a758610e734ea4@mail.gmail.com>
<4B1D67A9.8040506@mapgears.com>
<8ab83e650912071247w7b93cb8bt90fe0c6a7a460785@mail.gmail.com>
<4B1D1B37.5157.008F.0@dnr.state.mn.us>
<8ab83e650912071318r3f35074anb9d6c9b64393a0c4@mail.gmail.com>
Message-ID: <4B1D1D46.5157.008F.0@dnr.state.mn.us>
The error still indicates a problem recognizing the file type. Can you hit the source GeoTIFF?
>>> On 12/7/2009 at 3:18 PM, in message
<8ab83e650912071318r3f35074anb9d6c9b64393a0c4 at mail.gmail.com>, Daniel Walton
wrote:
> I'm creating the PNG image from a GeoTIFF using:
>
> gdal_translate -of PNG -quiet -scale -co worldfile=yes
> [Geotiff_filename].tif [PNG_filename].PNG.
>
> Also, these PNG source images were working fine under MS4W x86.
>
> -Dan
>
>
>
> On Mon, Dec 7, 2009 at 3:14 PM, Steve Lime wrote:
>
>> If I take the request out of WMS context to straight CGI with this request:
>>
>> http://www.fireimagery.com/ms/mapserv.exe?map=C
>> :\maps\A091207074551.map&mode=map&mapsize=300+300&layer=ZZ
>>
>> I get the following error:
>>
>> msDrawMap(): Image handling error. Failed to draw layer named 'ZZ'.
>> msDrawRaster(): Image handling error. Unrecognized or unsupported image
>> format drawEPP(): Image handling error. EPPL7 support is not available.
>>
>> Typically you'll see that when GDAL failed to identify the filetype. EPPL7
>> is the last thing checked so that's not relevant by itself. I guess I'd
>> start
>> by making sure the image is valid.
>>
>> Steve
>>
>> >>> On 12/7/2009 at 2:47 PM, in message
>> <8ab83e650912071247w7b93cb8bt90fe0c6a7a460785 at mail.gmail.com>, Daniel
>> Walton
>> wrote:
>> > Thanks Daniel. No dice, though, log is empty.
>> >
>> > On Mon, Dec 7, 2009 at 2:38 PM, Daniel Morissette
>> > wrote:
>> >
>> >> Daniel Walton wrote:
>> >>
>> >>>
>> >>> Yes, the same mapfile worked under MS4W on a 32-bit machine. I have
>> >>> verified that this same problem occurs using the x86 binaries from
>> Tamas'
>> >>> site run in the current x64 environment. The source image is in PNG
>> format
>> >>> in order to make transparency work well on the client. (My client is
>> >>> Silverlight-based, and PNG is the only supported format that supports
>> >>> transparency). The source image does have a world (*.WLD) file which
>> >>> contains these values (file is generated by running gdal_translate on a
>> >>> geotiff image):
>> >>>
>> >>>
>> >> Um... perhaps try using DEBUG/MS_ERRORFILE and look for hints in the log
>> >> output, if you haven't tried that already.
>> >>
>> >>
>> >> --
>> >> Daniel Morissette
>> >> http://www.mapgears.com/
>> >> _______________________________________________
>> >> mapserver-users mailing list
>> >> mapserver-users at lists.osgeo.org
>> >> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>> >>
>>
>>
From dgwalton at gmail.com Mon Dec 7 14:06:58 2009
From: dgwalton at gmail.com (Daniel Walton)
Date: Mon, 7 Dec 2009 16:06:58 -0600
Subject: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank
images
In-Reply-To: <4B1D1D46.5157.008F.0@dnr.state.mn.us>
References: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
<4B1D60FF.6030403@mapgears.com>
<8ab83e650912071222u1edcb4efx63a758610e734ea4@mail.gmail.com>
<4B1D67A9.8040506@mapgears.com>
<8ab83e650912071247w7b93cb8bt90fe0c6a7a460785@mail.gmail.com>
<4B1D1B37.5157.008F.0@dnr.state.mn.us>
<8ab83e650912071318r3f35074anb9d6c9b64393a0c4@mail.gmail.com>
<4B1D1D46.5157.008F.0@dnr.state.mn.us>
Message-ID: <8ab83e650912071406v26b6bfben5c5f11e59ab1ac5e@mail.gmail.com>
Layer YY now references the GeoTIFF, same problem.
http://www.fireimagery.com/ms/mapserv.exe?map=C:\maps\A091207074551.map&mode=map&mapsize=150+150&layer=YY
Here is the error file content from this request:
[Mon Dec 07 16:03:32 2009].406000 CGI Request 4 on process 2508
[Mon Dec 07 16:03:32 2009].406000 msWMSLoadGetMapParams(): enabling
non-square pixels.
[Mon Dec 07 16:03:32 2009].406000 msDrawMap(): kicking into non-square pixel
preserving mode.
[Mon Dec 07 16:03:32 2009].406000 msLayerIsVisible(): Skipping layer (YY)
because LAYER.EXTENT does not intersect MAP.EXTENT
[Mon Dec 07 16:03:32 2009].406000 msLayerIsVisible(): Skipping layer (YY)
because LAYER.EXTENT does not intersect MAP.EXTENT
[Mon Dec 07 16:03:32 2009].406000 msDrawMap(): Drawing Label Cache, 0.000s
[Mon Dec 07 16:03:32 2009].406000 msDrawMap() total time: 0.000s
[Mon Dec 07 16:03:32 2009].531000 msSaveImage() total time: 0.125s
[Mon Dec 07 16:03:32 2009].531000 mapserv request processing time (msLoadMap
not incl.): 0.125s
[Mon Dec 07 16:03:32 2009].531000 msFreeMap(): freeing map at
00000000017CFFB0.
[Mon Dec 07 16:03:32 2009].531000 freeLayer(): freeing layer at
0000000003240D60.
[Mon Dec 07 16:03:32 2009].531000 freeLayer(): freeing layer at
0000000001808290.
[Mon Dec 07 16:04:25 2009].937000 CGI Request 5 on process 2508
[Mon Dec 07 16:04:25 2009].937000 msDrawRasterLayerLow(YY): entering.
[Mon Dec 07 16:04:25 2009].937000 msDrawMap(): Layer 1 (YY), 0.000s
[Mon Dec 07 16:04:25 2009].937000 msDrawMap(): Drawing Label Cache, 0.000s
[Mon Dec 07 16:04:25 2009].937000 msDrawMap() total time: 0.000s
[Mon Dec 07 16:04:25 2009].937000 msSaveImage() total time: 0.000s
[Mon Dec 07 16:04:25 2009].937000 mapserv request processing time (loadmap
not incl.): 0.000s
[Mon Dec 07 16:04:25 2009
On Mon, Dec 7, 2009 at 3:22 PM, Steve Lime wrote:
> The error still indicates a problem recognizing the file type. Can you hit
> the source GeoTIFF?
>
> >>> On 12/7/2009 at 3:18 PM, in message
> <8ab83e650912071318r3f35074anb9d6c9b64393a0c4 at mail.gmail.com>, Daniel
> Walton
> wrote:
> > I'm creating the PNG image from a GeoTIFF using:
> >
> > gdal_translate -of PNG -quiet -scale -co worldfile=yes
> > [Geotiff_filename].tif [PNG_filename].PNG.
> >
> > Also, these PNG source images were working fine under MS4W x86.
> >
> > -Dan
> >
> >
> >
> > On Mon, Dec 7, 2009 at 3:14 PM, Steve Lime
> wrote:
> >
> >> If I take the request out of WMS context to straight CGI with this
> request:
> >>
> >> http://www.fireimagery.com/ms/mapserv.exe?map=C
> >> :\maps\A091207074551.map&mode=map&mapsize=300+300&layer=ZZ
> >>
> >> I get the following error:
> >>
> >> msDrawMap(): Image handling error. Failed to draw layer named 'ZZ'.
> >> msDrawRaster(): Image handling error. Unrecognized or unsupported image
> >> format drawEPP(): Image handling error. EPPL7 support is not available.
> >>
> >> Typically you'll see that when GDAL failed to identify the filetype.
> EPPL7
> >> is the last thing checked so that's not relevant by itself. I guess I'd
> >> start
> >> by making sure the image is valid.
> >>
> >> Steve
> >>
> >> >>> On 12/7/2009 at 2:47 PM, in message
> >> <8ab83e650912071247w7b93cb8bt90fe0c6a7a460785 at mail.gmail.com>, Daniel
> >> Walton
> >> wrote:
> >> > Thanks Daniel. No dice, though, log is empty.
> >> >
> >> > On Mon, Dec 7, 2009 at 2:38 PM, Daniel Morissette
> >> > wrote:
> >> >
> >> >> Daniel Walton wrote:
> >> >>
> >> >>>
> >> >>> Yes, the same mapfile worked under MS4W on a 32-bit machine. I have
> >> >>> verified that this same problem occurs using the x86 binaries from
> >> Tamas'
> >> >>> site run in the current x64 environment. The source image is in PNG
> >> format
> >> >>> in order to make transparency work well on the client. (My client is
> >> >>> Silverlight-based, and PNG is the only supported format that
> supports
> >> >>> transparency). The source image does have a world (*.WLD) file which
> >> >>> contains these values (file is generated by running gdal_translate
> on a
> >> >>> geotiff image):
> >> >>>
> >> >>>
> >> >> Um... perhaps try using DEBUG/MS_ERRORFILE and look for hints in the
> log
> >> >> output, if you haven't tried that already.
> >> >>
> >> >>
> >> >> --
> >> >> Daniel Morissette
> >> >> http://www.mapgears.com/
> >> >> _______________________________________________
> >> >> 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:
From dgwalton at gmail.com Mon Dec 7 14:25:10 2009
From: dgwalton at gmail.com (Daniel Walton)
Date: Mon, 7 Dec 2009 16:25:10 -0600
Subject: [mapserver-users] Mapserver WMS under IIS 7 x64 serving up blank
images
In-Reply-To:
References: <8ab83e650912070746i4b916b98mfc03307e6677d844@mail.gmail.com>
<4B1D60FF.6030403@mapgears.com>
<8ab83e650912071222u1edcb4efx63a758610e734ea4@mail.gmail.com>
<4B1D67A9.8040506@mapgears.com>
<8ab83e650912071247w7b93cb8bt90fe0c6a7a460785@mail.gmail.com>
<4B1D1B37.5157.008F.0@dnr.state.mn.us>
Message-ID: <8ab83e650912071425r292dd743v3118224b23c476a0@mail.gmail.com>
Tamas,
Thanks for the tip. I used process monitor and everything looks OK in the
permissions department. I think the problem relates to the fact that
mapserver doesn't calculate an overlap between map and layer. I'm not sure
what would cause this.
-Dan
On Mon, Dec 7, 2009 at 3:22 PM, Tamas Szekeres wrote:
> Daniel,
>
> This may also be an issue if GDAL couldn't actually open this file bacause
> of any reason (permission?).
> Make sure about this, by using a file monitoring tool, like SysInternals
> filemon for instance.
>
> Best regards,
>
> Tamas
>
>
>
> 2009/12/7 Steve Lime
>
> If I take the request out of WMS context to straight CGI with this request:
>>
>> http://www.fireimagery.com/ms/mapserv.exe?map=C
>> :\maps\A091207074551.map&mode=map&mapsize=300+300&layer=ZZ
>>
>> I get the following error:
>>
>> msDrawMap(): Image handling error. Failed to draw layer named 'ZZ'.
>> msDrawRaster(): Image handling error. Unrecognized or unsupported image
>> format drawEPP(): Image handling error. EPPL7 support is not available.
>>
>> Typically you'll see that when GDAL failed to identify the filetype. EPPL7
>> is the last thing checked so that's not relevant by itself. I guess I'd
>> start
>> by making sure the image is valid.
>>
>> Steve
>>
>> >>> On 12/7/2009 at 2:47 PM, in message
>> <8ab83e650912071247w7b93cb8bt90fe0c6a7a460785 at mail.gmail.com>, Daniel
>> Walton
>> wrote:
>> > Thanks Daniel. No dice, though, log is empty.
>> >
>> > On Mon, Dec 7, 2009 at 2:38 PM, Daniel Morissette
>> > wrote:
>> >
>> >> Daniel Walton wrote:
>> >>
>> >>>
>> >>> Yes, the same mapfile worked under MS4W on a 32-bit machine. I have
>> >>> verified that this same problem occurs using the x86 binaries from
>> Tamas'
>> >>> site run in the current x64 environment. The source image is in PNG
>> format
>> >>> in order to make transparency work well on the client. (My client is
>> >>> Silverlight-based, and PNG is the only supported format that supports
>> >>> transparency). The source image does have a world (*.WLD) file which
>> >>> contains these values (file is generated by running gdal_translate on
>> a
>> >>> geotiff image):
>> >>>
>> >>>
>> >> Um... perhaps try using DEBUG/MS_ERRORFILE and look for hints in the
>> log
>> >> output, if you haven't tried that already.
>> >>
>> >>
>> >> --
>> >> Daniel Morissette
>> >> http://www.mapgears.com/
>> >> _______________________________________________
>> >> 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:
From Steve.Lime at state.mn.us Mon Dec 7 15:40:12 2009
From: Steve.Lime at state.mn.us (Steve Lime)
Date: Mon, 07 Dec 2009 17:40:12 -0600
Subject: [mapserver-users] Shapefile,itemnquery and HTML image map
generation problem
In-Reply-To: <04e001ca74eb$bc473400$34d59c00$@net>
References: <042101ca7454$bfc62830$3f527890$@net>
<04e001ca74eb$bc473400$34d59c00$@net>
Message-ID: <4B1D3D7A.5157.008F.0@dnr.state.mn.us>
GDAL's not in play here at all. If you generate a query map instead of an html image map does
the output map look ok? What version are you using?
Steve
>>> On 12/4/2009 at 8:11 AM, in message <04e001ca74eb$bc473400$34d59c00$@net>,
W.John Guineau wrote:
> How would I go about debugging this?
>
>
>
> I think this is GDAL and its query of shapefiles, right?
>
>
>
> The bottom line is that MapServer finds all the items when it is rendering
> the map by layer/class EXPRESSION, but the qstring in a URL using the exact
> same EXPRESSION string misses some of the items.
>
>
>
> I can also use ogrinfo from MAP4W to execute an SQL query directly on the
> shapefile and the items in questions are certainly there.
>
>
>
> In the image below, the green areas are result of the mapfile layer class
> EXPRESSION - all are correctly rendered. However, several of them do not get
> generated (HTML imagemap tags not generated) when using a URL and
> itemnquery/qstring with the identical EXPRESSION.
>
>
>
> How do I enable debug (enabling mapfile DEBUG does not seem to give any
> useful info as to why GDAL is skipping certain items) Am I better off using
> MAP4W or similar to get debug/trace info for shapefile queries?
>
>
>
> john
>
>
>
>
>
>
>
>
>
> From: mapserver-users-bounces at lists.osgeo.org
> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John Guineau
> Sent: Thursday, December 03, 2009 3:11 PM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] Shapefile, itemnquery and HTML image map
> generation problem
>
>
>
> I have a basic vector shapefile that I am trying to generate HTML clickable
> maps from. It seems to work well for the most part, however there is a
> problem where some items from the shapefile do not get processed from the
> qstring in the browser, but they are processed fine in the mapfile layer (to
> color them differently).
>
>
>
> So the map that renders shows all the items colored properly as the layer
> class defines. Using the exact same list of items in the HTTP query string
> causes several items to be ignored (the HTML image map area is not
> generated).
>
>
>
> http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
> mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
> +400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105
> ,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,
> 114A,114B,115A,115B,115C")
>
>
>
> Below is the layer section from the mapfile. I can post whatever else is
> helpful.
>
>
>
> Thanks for any help on this.
>
>
>
> john
>
>
>
> LAYER
>
> NAME map_m
>
> DATA "map_shape"
>
> TEMPLATE "bodytemplate.html"
>
> HEADER "imapheader.html"
>
> FOOTER "imapfooter.html"
>
> PROJECTION
>
> "proj=latlong"
>
> "ellps=GRS80"
>
> "init=epsg:4326"
>
> END
>
> TYPE polygon
>
> STATUS ON
>
> TRANSPARENCY 70
>
> CLASS
>
> NAME "MLRA"
>
> COLOR 0 200 0
>
> OUTLINECOLOR 0 0 0
>
> EXPRESSION( "[MLRARSYM]" in
> "102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,1
> 11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
>
> END
>
> METADATA
>
> qstring_validation_pattern ".*"
>
> END
>
> END
From guineau at earthlink.net Mon Dec 7 15:56:15 2009
From: guineau at earthlink.net (W.John Guineau)
Date: Mon, 7 Dec 2009 18:56:15 -0500
Subject: [mapserver-users] Shapefile,
itemnquery and HTML image map generation problem
In-Reply-To: <4B1D3D7A.5157.008F.0@dnr.state.mn.us>
References: <042101ca7454$bfc62830$3f527890$@net>
<04e001ca74eb$bc473400$34d59c00$@net>
<4B1D3D7A.5157.008F.0@dnr.state.mn.us>
Message-ID: <01ce01ca7798$dd4b89d0$97e29d70$@net>
I'm new to mapserver, how do I quickly generate a querymap?
I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've also
tried 5.2.1 that I compiled myself.
john
-----Original Message-----
From: Steve Lime [mailto:Steve.Lime at state.mn.us]
Sent: Monday, December 07, 2009 6:40 PM
To: 'W.John Guineau'; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
generation problem
GDAL's not in play here at all. If you generate a query map instead of an
html image map does
the output map look ok? What version are you using?
Steve
>>> On 12/4/2009 at 8:11 AM, in message
<04e001ca74eb$bc473400$34d59c00$@net>,
W.John Guineau wrote:
> How would I go about debugging this?
>
>
>
> I think this is GDAL and its query of shapefiles, right?
>
>
>
> The bottom line is that MapServer finds all the items when it is rendering
> the map by layer/class EXPRESSION, but the qstring in a URL using the
exact
> same EXPRESSION string misses some of the items.
>
>
>
> I can also use ogrinfo from MAP4W to execute an SQL query directly on the
> shapefile and the items in questions are certainly there.
>
>
>
> In the image below, the green areas are result of the mapfile layer class
> EXPRESSION - all are correctly rendered. However, several of them do not
get
> generated (HTML imagemap tags not generated) when using a URL and
> itemnquery/qstring with the identical EXPRESSION.
>
>
>
> How do I enable debug (enabling mapfile DEBUG does not seem to give any
> useful info as to why GDAL is skipping certain items) Am I better off
using
> MAP4W or similar to get debug/trace info for shapefile queries?
>
>
>
> john
>
>
>
>
>
>
>
>
>
> From: mapserver-users-bounces at lists.osgeo.org
> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John
Guineau
> Sent: Thursday, December 03, 2009 3:11 PM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] Shapefile, itemnquery and HTML image map
> generation problem
>
>
>
> I have a basic vector shapefile that I am trying to generate HTML
clickable
> maps from. It seems to work well for the most part, however there is a
> problem where some items from the shapefile do not get processed from the
> qstring in the browser, but they are processed fine in the mapfile layer
(to
> color them differently).
>
>
>
> So the map that renders shows all the items colored properly as the layer
> class defines. Using the exact same list of items in the HTTP query string
> causes several items to be ignored (the HTML image map area is not
> generated).
>
>
>
>
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
>
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
>
+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105
>
,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,
> 114A,114B,115A,115B,115C")
>
>
>
> Below is the layer section from the mapfile. I can post whatever else is
> helpful.
>
>
>
> Thanks for any help on this.
>
>
>
> john
>
>
>
> LAYER
>
> NAME map_m
>
> DATA "map_shape"
>
> TEMPLATE "bodytemplate.html"
>
> HEADER "imapheader.html"
>
> FOOTER "imapfooter.html"
>
> PROJECTION
>
> "proj=latlong"
>
> "ellps=GRS80"
>
> "init=epsg:4326"
>
> END
>
> TYPE polygon
>
> STATUS ON
>
> TRANSPARENCY 70
>
> CLASS
>
> NAME "MLRA"
>
> COLOR 0 200 0
>
> OUTLINECOLOR 0 0 0
>
> EXPRESSION( "[MLRARSYM]" in
>
"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,1
> 11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
>
> END
>
> METADATA
>
> qstring_validation_pattern ".*"
>
> END
>
> END
From Steve.Lime at state.mn.us Mon Dec 7 16:04:02 2009
From: Steve.Lime at state.mn.us (Steve Lime)
Date: Mon, 07 Dec 2009 18:04:02 -0600
Subject: [mapserver-users] Shapefile,itemnquery and HTML image
map generation problem
In-Reply-To: <01ce01ca7798$dd4b89d0$97e29d70$@net>
References: <042101ca7454$bfc62830$3f527890$@net>
<04e001ca74eb$bc473400$34d59c00$@net>
<4B1D3D7A.5157.008F.0@dnr.state.mn.us>
<01ce01ca7798$dd4b89d0$97e29d70$@net>
Message-ID: <4B1D4310.5157.008F.0@dnr.state.mn.us>
Just add a querymap object to your mapfile, like so:
QUERYMAP
STATUS ON
END
Then change your URL to use the mode itemnquerymap and that should return just an image with the
selected features highlighted in yellow.
Steve
>>> On 12/7/2009 at 5:56 PM, in message <01ce01ca7798$dd4b89d0$97e29d70$@net>,
W.John Guineau wrote:
> I'm new to mapserver, how do I quickly generate a querymap?
>
> I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've also
> tried 5.2.1 that I compiled myself.
>
> john
>
>
> -----Original Message-----
> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
> Sent: Monday, December 07, 2009 6:40 PM
> To: 'W.John Guineau'; mapserver-users at lists.osgeo.org
> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
> generation problem
>
> GDAL's not in play here at all. If you generate a query map instead of an
> html image map does
> the output map look ok? What version are you using?
>
> Steve
>
>>>> On 12/4/2009 at 8:11 AM, in message
> <04e001ca74eb$bc473400$34d59c00$@net>,
> W.John Guineau wrote:
>> How would I go about debugging this?
>>
>>
>>
>> I think this is GDAL and its query of shapefiles, right?
>>
>>
>>
>> The bottom line is that MapServer finds all the items when it is rendering
>> the map by layer/class EXPRESSION, but the qstring in a URL using the
> exact
>> same EXPRESSION string misses some of the items.
>>
>>
>>
>> I can also use ogrinfo from MAP4W to execute an SQL query directly on the
>> shapefile and the items in questions are certainly there.
>>
>>
>>
>> In the image below, the green areas are result of the mapfile layer class
>> EXPRESSION - all are correctly rendered. However, several of them do not
> get
>> generated (HTML imagemap tags not generated) when using a URL and
>> itemnquery/qstring with the identical EXPRESSION.
>>
>>
>>
>> How do I enable debug (enabling mapfile DEBUG does not seem to give any
>> useful info as to why GDAL is skipping certain items) Am I better off
> using
>> MAP4W or similar to get debug/trace info for shapefile queries?
>>
>>
>>
>> john
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> From: mapserver-users-bounces at lists.osgeo.org
>> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John
> Guineau
>> Sent: Thursday, December 03, 2009 3:11 PM
>> To: mapserver-users at lists.osgeo.org
>> Subject: [mapserver-users] Shapefile, itemnquery and HTML image map
>> generation problem
>>
>>
>>
>> I have a basic vector shapefile that I am trying to generate HTML
> clickable
>> maps from. It seems to work well for the most part, however there is a
>> problem where some items from the shapefile do not get processed from the
>> qstring in the browser, but they are processed fine in the mapfile layer
> (to
>> color them differently).
>>
>>
>>
>> So the map that renders shows all the items colored properly as the layer
>> class defines. Using the exact same list of items in the HTTP query string
>> causes several items to be ignored (the HTML image map area is not
>> generated).
>>
>>
>>
>>
> http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
>
>>
> mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
>>
> +400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105
>>
> ,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,
>> 114A,114B,115A,115B,115C")
>>
>>
>>
>> Below is the layer section from the mapfile. I can post whatever else is
>> helpful.
>>
>>
>>
>> Thanks for any help on this.
>>
>>
>>
>> john
>>
>>
>>
>> LAYER
>>
>> NAME map_m
>>
>> DATA "map_shape"
>>
>> TEMPLATE "bodytemplate.html"
>>
>> HEADER "imapheader.html"
>>
>> FOOTER "imapfooter.html"
>>
>> PROJECTION
>>
>> "proj=latlong"
>>
>> "ellps=GRS80"
>>
>> "init=epsg:4326"
>>
>> END
>>
>> TYPE polygon
>>
>> STATUS ON
>>
>> TRANSPARENCY 70
>>
>> CLASS
>>
>> NAME "MLRA"
>>
>> COLOR 0 200 0
>>
>> OUTLINECOLOR 0 0 0
>>
>> EXPRESSION( "[MLRARSYM]" in
>>
> "102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,1
>> 11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
>>
>> END
>>
>> METADATA
>>
>> qstring_validation_pattern ".*"
>>
>> END
>>
>> END
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
From Steve.Lime at state.mn.us Mon Dec 7 16:56:54 2009
From: Steve.Lime at state.mn.us (Steve Lime)
Date: Mon, 07 Dec 2009 18:56:54 -0600
Subject: [mapserver-users] Shapefile,itemnquery and HTML
image map generation problem
In-Reply-To: <01dc01ca779c$2c19eae0$844dc0a0$@net>
References: <042101ca7454$bfc62830$3f527890$@net>
<04e001ca74eb$bc473400$34d59c00$@net>
<4B1D3D7A.5157.008F.0@dnr.state.mn.us>
<01ce01ca7798$dd4b89d0$97e29d70$@net>
<4B1D4310.5157.008F.0@dnr.state.mn.us>
<01dc01ca779c$2c19eae0$844dc0a0$@net>
Message-ID: <4B1D4F74.5157.008F.0@dnr.state.mn.us>
Do the ones not selected fall at the end of your qstring? I'm wondering if something is getting truncated. I'd think
you'd get a parsing error in that case, but perhaps not. Can you label the polygons with the value for MLRARSYM?
Steve
>>> On 12/7/2009 at 6:19 PM, in message <01dc01ca779c$2c19eae0$844dc0a0$@net>,
W.John Guineau wrote:
> Hi Steve,
>
>
>
> OK, I added the QUERYMAP section and changed the URL:
>
>
>
> http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map
> &mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize
> =600+400&qitem=MLRARSYM&qstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10
> 2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D
> ,111E,112,113,114A,114B,115A,115B,115C%22)>
> &qlayer=coe_m&mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-
> 89+49&mapsize=600+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B
> ,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1
> 11D,111E,112,113,114A,114B,115A,115B,115C")
>
>
>
>
>
> Now I get the map with some of the items highlighted in yellow, and the rest
> green:
>
>
>
>
>
>
>
> -----Original Message-----
> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
> Sent: Monday, December 07, 2009 7:04 PM
> To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
> generation problem
>
>
>
> Just add a querymap object to your mapfile, like so:
>
>
>
> QUERYMAP
>
> STATUS ON
>
> END
>
>
>
> Then change your URL to use the mode itemnquerymap and that should return
> just an image with the
>
> selected features highlighted in yellow.
>
>
>
> Steve
>
>
>
>>>> On 12/7/2009 at 5:56 PM, in message
> <01ce01ca7798$dd4b89d0$97e29d70$@net>,
>
> W.John Guineau wrote:
>
>> I'm new to mapserver, how do I quickly generate a querymap?
>
>>
>
>> I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've also
>
>> tried 5.2.1 that I compiled myself.
>
>>
>
>> john
>
>>
>
>>
>
>> -----Original Message-----
>
>> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
>
>> Sent: Monday, December 07, 2009 6:40 PM
>
>> To: 'W.John Guineau'; mapserver-users at lists.osgeo.org
>
>> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
>
>> generation problem
>
>>
>
>> GDAL's not in play here at all. If you generate a query map instead of an
>
>> html image map does
>
>> the output map look ok? What version are you using?
>
>>
>
>> Steve
>
>>
>
>>>>> On 12/4/2009 at 8:11 AM, in message
>
>> <04e001ca74eb$bc473400$34d59c00$@net>,
>
>> W.John Guineau wrote:
>
>>> How would I go about debugging this?
>
>>>
>
>>>
>
>>>
>
>>> I think this is GDAL and its query of shapefiles, right?
>
>>>
>
>>>
>
>>>
>
>>> The bottom line is that MapServer finds all the items when it is
> rendering
>
>>> the map by layer/class EXPRESSION, but the qstring in a URL using the
>
>> exact
>
>>> same EXPRESSION string misses some of the items.
>
>>>
>
>>>
>
>>>
>
>>> I can also use ogrinfo from MAP4W to execute an SQL query directly on the
>
>>> shapefile and the items in questions are certainly there.
>
>>>
>
>>>
>
>>>
>
>>> In the image below, the green areas are result of the mapfile layer class
>
>>> EXPRESSION - all are correctly rendered. However, several of them do not
>
>> get
>
>>> generated (HTML imagemap tags not generated) when using a URL and
>
>>> itemnquery/qstring with the identical EXPRESSION.
>
>>>
>
>>>
>
>>>
>
>>> How do I enable debug (enabling mapfile DEBUG does not seem to give any
>
>>> useful info as to why GDAL is skipping certain items) Am I better off
>
>> using
>
>>> MAP4W or similar to get debug/trace info for shapefile queries?
>
>>>
>
>>>
>
>>>
>
>>> john
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>> From: mapserver-users-bounces at lists.osgeo.org
>
>>> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John
>
>> Guineau
>
>>> Sent: Thursday, December 03, 2009 3:11 PM
>
>>> To: mapserver-users at lists.osgeo.org
>
>>> Subject: [mapserver-users] Shapefile, itemnquery and HTML image map
>
>>> generation problem
>
>>>
>
>>>
>
>>>
>
>>> I have a basic vector shapefile that I am trying to generate HTML
>
>> clickable
>
>>> maps from. It seems to work well for the most part, however there is a
>
>>> problem where some items from the shapefile do not get processed from the
>
>>> qstring in the browser, but they are processed fine in the mapfile layer
>
>> (to
>
>>> color them differently).
>
>>>
>
>>>
>
>>>
>
>>> So the map that renders shows all the items colored properly as the layer
>
>>> class defines. Using the exact same list of items in the HTTP query
> string
>
>>> causes several items to be ignored (the HTML image map area is not
>
>>> generated).
>
>>>
>
>>>
>
>>>
>
>>>
>
>>
> http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
>
>
>>
>
>>>
>
>>
> mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
>
>>>
>
>>
> +400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105
>
>>>
>
>>
> ,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,
>
>>> 114A,114B,115A,115B,115C")
>
>>>
>
>>>
>
>>>
>
>>> Below is the layer section from the mapfile. I can post whatever else is
>
>>> helpful.
>
>>>
>
>>>
>
>>>
>
>>> Thanks for any help on this.
>
>>>
>
>>>
>
>>>
>
>>> john
>
>>>
>
>>>
>
>>>
>
>>> LAYER
>
>>>
>
>>> NAME map_m
>
>>>
>
>>> DATA "map_shape"
>
>>>
>
>>> TEMPLATE "bodytemplate.html"
>
>>>
>
>>> HEADER "imapheader.html"
>
>>>
>
>>> FOOTER "imapfooter.html"
>
>>>
>
>>> PROJECTION
>
>>>
>
>>> "proj=latlong"
>
>>>
>
>>> "ellps=GRS80"
>
>>>
>
>>> "init=epsg:4326"
>
>>>
>
>>> END
>
>>>
>
>>> TYPE polygon
>
>>>
>
>>> STATUS ON
>
>>>
>
>>> TRANSPARENCY 70
>
>>>
>
>>> CLASS
>
>>>
>
>>> NAME "MLRA"
>
>>>
>
>>> COLOR 0 200 0
>
>>>
>
>>> OUTLINECOLOR 0 0 0
>
>>>
>
>>> EXPRESSION( "[MLRARSYM]" in
>
>>>
>
>>
> "102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,1
>
>>> 11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
>
>>>
>
>>> END
>
>>>
>
>>> METADATA
>
>>>
>
>>> qstring_validation_pattern ".*"
>
>>>
>
>>> END
>
>>>
>
>>> END
>
>>
>
>> _______________________________________________
>
>> mapserver-users mailing list
>
>> mapserver-users at lists.osgeo.org
>
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
From guineau at earthlink.net Mon Dec 7 17:49:37 2009
From: guineau at earthlink.net (W.John Guineau)
Date: Mon, 7 Dec 2009 20:49:37 -0500
Subject: [mapserver-users] Shapefile,
itemnquery and HTML image map generation problem
In-Reply-To: <4B1D4F74.5157.008F.0@dnr.state.mn.us>
References: <042101ca7454$bfc62830$3f527890$@net>
<04e001ca74eb$bc473400$34d59c00$@net>
<4B1D3D7A.5157.008F.0@dnr.state.mn.us>
<01ce01ca7798$dd4b89d0$97e29d70$@net>
<4B1D4310.5157.008F.0@dnr.state.mn.us>
<01dc01ca779c$2c19eae0$844dc0a0$@net>
<4B1D4F74.5157.008F.0@dnr.state.mn.us>
Message-ID: <020f01ca77a8$b34bc9a0$19e35ce0$@net>
I think the missing ones are from random places n the query string. I have
tried putting just one of the missing MLRA in the query string and it still
does not generate
How do I label? (I am really new to MapServer!)
john
-----Original Message-----
From: Steve Lime [mailto:Steve.Lime at state.mn.us]
Sent: Monday, December 07, 2009 7:57 PM
To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
generation problem
Do the ones not selected fall at the end of your qstring? I'm wondering if
something is getting truncated. I'd think
you'd get a parsing error in that case, but perhaps not. Can you label the
polygons with the value for MLRARSYM?
Steve
>>> On 12/7/2009 at 6:19 PM, in message
<01dc01ca779c$2c19eae0$844dc0a0$@net>,
W.John Guineau wrote:
> Hi Steve,
>
>
>
> OK, I added the QUERYMAP section and changed the URL:
>
>
>
> http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map
>
&mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize
>
=600+400&qitem=MLRARSYM&qstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10
>
2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D
> ,111E,112,113,114A,114B,115A,115B,115C%22)>
>
&qlayer=coe_m&mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-
>
89+49&mapsize=600+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B
>
,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1
> 11D,111E,112,113,114A,114B,115A,115B,115C")
>
>
>
>
>
> Now I get the map with some of the items highlighted in yellow, and the
rest
> green:
>
>
>
>
>
>
>
> -----Original Message-----
> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
> Sent: Monday, December 07, 2009 7:04 PM
> To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
> generation problem
>
>
>
> Just add a querymap object to your mapfile, like so:
>
>
>
> QUERYMAP
>
> STATUS ON
>
> END
>
>
>
> Then change your URL to use the mode itemnquerymap and that should return
> just an image with the
>
> selected features highlighted in yellow.
>
>
>
> Steve
>
>
>
>>>> On 12/7/2009 at 5:56 PM, in message
> <01ce01ca7798$dd4b89d0$97e29d70$@net>,
>
> W.John Guineau wrote:
>
>> I'm new to mapserver, how do I quickly generate a querymap?
>
>>
>
>> I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've
also
>
>> tried 5.2.1 that I compiled myself.
>
>>
>
>> john
>
>>
>
>>
>
>> -----Original Message-----
>
>> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
>
>> Sent: Monday, December 07, 2009 6:40 PM
>
>> To: 'W.John Guineau'; mapserver-users at lists.osgeo.org
>
>> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
>
>> generation problem
>
>>
>
>> GDAL's not in play here at all. If you generate a query map instead of an
>
>> html image map does
>
>> the output map look ok? What version are you using?
>
>>
>
>> Steve
>
>>
>
>>>>> On 12/4/2009 at 8:11 AM, in message
>
>> <04e001ca74eb$bc473400$34d59c00$@net>,
>
>> W.John Guineau wrote:
>
>>> How would I go about debugging this?
>
>>>
>
>>>
>
>>>
>
>>> I think this is GDAL and its query of shapefiles, right?
>
>>>
>
>>>
>
>>>
>
>>> The bottom line is that MapServer finds all the items when it is
> rendering
>
>>> the map by layer/class EXPRESSION, but the qstring in a URL using the
>
>> exact
>
>>> same EXPRESSION string misses some of the items.
>
>>>
>
>>>
>
>>>
>
>>> I can also use ogrinfo from MAP4W to execute an SQL query directly on
the
>
>>> shapefile and the items in questions are certainly there.
>
>>>
>
>>>
>
>>>
>
>>> In the image below, the green areas are result of the mapfile layer
class
>
>>> EXPRESSION - all are correctly rendered. However, several of them do not
>
>> get
>
>>> generated (HTML imagemap tags not generated) when using a URL and
>
>>> itemnquery/qstring with the identical EXPRESSION.
>
>>>
>
>>>
>
>>>
>
>>> How do I enable debug (enabling mapfile DEBUG does not seem to give any
>
>>> useful info as to why GDAL is skipping certain items) Am I better off
>
>> using
>
>>> MAP4W or similar to get debug/trace info for shapefile queries?
>
>>>
>
>>>
>
>>>
>
>>> john
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>> From: mapserver-users-bounces at lists.osgeo.org
>
>>> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John
>
>> Guineau
>
>>> Sent: Thursday, December 03, 2009 3:11 PM
>
>>> To: mapserver-users at lists.osgeo.org
>
>>> Subject: [mapserver-users] Shapefile, itemnquery and HTML image map
>
>>> generation problem
>
>>>
>
>>>
>
>>>
>
>>> I have a basic vector shapefile that I am trying to generate HTML
>
>> clickable
>
>>> maps from. It seems to work well for the most part, however there is a
>
>>> problem where some items from the shapefile do not get processed from
the
>
>>> qstring in the browser, but they are processed fine in the mapfile layer
>
>> (to
>
>>> color them differently).
>
>>>
>
>>>
>
>>>
>
>>> So the map that renders shows all the items colored properly as the
layer
>
>>> class defines. Using the exact same list of items in the HTTP query
> string
>
>>> causes several items to be ignored (the HTML image map area is not
>
>>> generated).
>
>>>
>
>>>
>
>>>
>
>>>
>
>>
>
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
>
>
>>
>
>>>
>
>>
>
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
>
>>>
>
>>
>
+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105
>
>>>
>
>>
>
,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,
>
>>> 114A,114B,115A,115B,115C")
>
>>>
>
>>>
>
>>>
>
>>> Below is the layer section from the mapfile. I can post whatever else is
>
>>> helpful.
>
>>>
>
>>>
>
>>>
>
>>> Thanks for any help on this.
>
>>>
>
>>>
>
>>>
>
>>> john
>
>>>
>
>>>
>
>>>
>
>>> LAYER
>
>>>
>
>>> NAME map_m
>
>>>
>
>>> DATA "map_shape"
>
>>>
>
>>> TEMPLATE "bodytemplate.html"
>
>>>
>
>>> HEADER "imapheader.html"
>
>>>
>
>>> FOOTER "imapfooter.html"
>
>>>
>
>>> PROJECTION
>
>>>
>
>>> "proj=latlong"
>
>>>
>
>>> "ellps=GRS80"
>
>>>
>
>>> "init=epsg:4326"
>
>>>
>
>>> END
>
>>>
>
>>> TYPE polygon
>
>>>
>
>>> STATUS ON
>
>>>
>
>>> TRANSPARENCY 70
>
>>>
>
>>> CLASS
>
>>>
>
>>> NAME "MLRA"
>
>>>
>
>>> COLOR 0 200 0
>
>>>
>
>>> OUTLINECOLOR 0 0 0
>
>>>
>
>>> EXPRESSION( "[MLRARSYM]" in
>
>>>
>
>>
>
"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,1
>
>>> 11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
>
>>>
>
>>> END
>
>>>
>
>>> METADATA
>
>>>
>
>>> qstring_validation_pattern ".*"
>
>>>
>
>>> END
>
>>>
>
>>> END
>
>>
>
>> _______________________________________________
>
>> mapserver-users mailing list
>
>> mapserver-users at lists.osgeo.org
>
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
From alans at cuervo.stanford.edu Mon Dec 7 17:53:00 2009
From: alans at cuervo.stanford.edu (Alan Swithenbank)
Date: Mon, 7 Dec 2009 17:53:00 -0800 (PST)
Subject: [mapserver-users] perl Geo::Shapelib save method problem
Message-ID:
Hi,
I have curious and annoying problem, (mapserver version 5.0.3 on Ubuntu
9.10). Rather than launch into it by immediately posting a bunch of
convoluted perl code, I thought I would try and describe it briefly first
and see if that rings a bell for anyone.
I have been using the Geo::Shapelib perl module to create ESRI
shapefiles, which work fine when loaded by a cgi-bin perl mapscript
routine. The problem is if I attempt to create shapefiles "on the fly"
from the running cgi-bin routine, the Geo::Shapelib $shapefile -> save( )
method does not create the shapefiles. The routine does not crash, the
files simply never are generated. If the same routine is run from the
command line, the files are generated. I express the full path to the
shape file directory, and have gone so far as to launch a separate
creation routine via the perl system command and even to fork the
cgi-bin process and launch the separate creation routine via exec. No
luck. And, both the separate system command program launch and the process
fork work to create viable shapefiles when the main cgi-bin routine is
launched from the commandline. If anyone else has seen something like this
I'd be interested to hear about it. (BTW, I do not have any problems
creating the associated .map files on the fly from the routine running as
cgi-bin, but, those I generate completely from my own code.)
I dug through the Geo::Shapelib source code for the save method a bit,
and the problem seems related to it's custom create routines for
generating file handles balking in the cgi environment. I REALLY don't
want to go there if I don't have too...;^) In fact, I'm not wedded to
Geo::Shapelib. I'd be happy to use the mapscript API directly from perl to
generate shapefiles. But, by my Googling expeditions, it looks as if as
time goes on, less and less information about perl mapscript becomes
available. (I can't even dredge the old and often mentioned perl mapscript
wiki out of the internet archives.)
Perhaps I just need a pointer to a bit more detail on generating
shapefiles from peal mapscript. For some obligatory code, below are the
guts of what I have done to create shapefiles using the Geo::Shapefile
module. The required information are all availble in a hash generated
from a previous database query at this point. Thanks for any thoughts!
Alan Swithenbank
Research Programmer
Stanford University
Tagging of Pacific Pelagics Project
#==============================================================================
# GENERATE ESRI SHAPEFILE
#==============================================================================
# Get indexes in hash key array for lon and lat:
my $lonidx;
my $latidx;
my $i = 0;
foreach (@hashkeys) {
if ($_ =~ m/lon/) {
$lonidx = $i;
}
if ($_ =~ m/lat/) {
$latidx = $i;
}
$i++;
}
# Get indexes in hash key array for all elements except lon and lat:
my @fieldidxs = ();
foreach my $i (0..scalar(@hashkeys)-1) {
if ($i != $lonidx && $i != $latidx) {
push(@fieldidxs,$i);
}
}
# Get key value names for all elements except lon and lat:
my @Fieldnames = (); # array of names for fields except lon lat
@Fieldnames = @hashkeys[@fieldidxs];
my @Fieldtypes = (); # array of types for fields except lon lat
$i = 0;
foreach (2..scalar(@hashkeys)-1) {
$Fieldtypes[$i++] = "String:15";
}
my $shapefile = new Geo::Shapelib;
$shapefile->{Name} = $savefile;
$shapefile->{Shapetype} = $shapetype; # polyline = 3
$shapefile->{FieldNames} = \@Fieldnames; # array reference!
$shapefile->{FieldTypes} = \@Fieldtypes; # array reference!
# Create a reference record from the start date of the query data:
my @record = ();
my $j = 0;
foreach my $key (@Fieldnames) {
$record[$j++] = $datahash{$key}[0];
}
# Create line string for current shape element:
my @vertices = ();
my $shapeid = 0;
my $lastptt = $datahash{ptt}[0]; # get first PTT value for splitting
tracks
foreach my $i (0..$rowcnt-1) {
my $lon = $datahash{$hashkeys[$lonidx]}[$i];
my $lat = $datahash{$hashkeys[$latidx]}[$i];
my $currentptt = $datahash{ptt}[$i];
if ($currentptt != $lastptt) {
# add current PTT shape element:
add_new_shape($shapefile,$shapeid,$shapetype,\@record,\@vertices);
# do updates for next PTT shape element:
$lastptt = $currentptt;
$shapeid++;
@record = ();
$j = 0;
foreach my $key (@Fieldnames) {
$record[$j++] = $datahash{$key}[$i];
}
@vertices = ();
}
push(@vertices,[$lon,$lat]); # push after possible update so don't lose one
}
# make sure at least one shape gets added!
add_new_shape($shapefile,$shapeid,$shapetype,\@record,\@vertices);
# Save shapefile and return filename:
$shapefile -> save($savefile);
# The print print below does not show up when the save method is called
# from cgi-bin, so, apparently the save method heads off into limbo.
print "hello: $savefile \n";
exit;
#==============================================================================
# SUBROUTINES
#==============================================================================
#------------------------------ add new shape ---------------------------------
sub add_new_shape {
# Add a new shape section to current shapefile under construction.
my $shapefile = $_[0];
my $shapeid = $_[1];
my $shapetype = $_[2];
my $recordref = $_[3];
my $verticesref = $_[4];
my @record = ();
@record = @$recordref;
my @vertices = ();
@vertices = @$verticesref;
return unless scalar(@vertices) > 2; # don't add a degenerate shape
push @{$shapefile->{ShapeRecords}},\@record; # array reference!
push @{$shapefile->{Shapes}}, {
SHPType => $shapetype,
ShapeId => $shapeid,
NVertices => scalar(@vertices),
Vertices => [@vertices] # array reference!
};
return;
}
From guineau at earthlink.net Mon Dec 7 18:08:01 2009
From: guineau at earthlink.net (W.John Guineau)
Date: Mon, 7 Dec 2009 21:08:01 -0500
Subject: [mapserver-users] Shapefile,
itemnquery and HTML image map generation problem
In-Reply-To: <020f01ca77a8$b34bc9a0$19e35ce0$@net>
References: <042101ca7454$bfc62830$3f527890$@net> <04e001ca74eb$bc473400$34d59c00$@net> <4B1D3D7A.5157.008F.0@dnr.state.mn.us> <01ce01ca7798$dd4b89d0$97e29d70$@net> <4B1D4310.5157.008F.0@dnr.state.mn.us> <01dc01ca779c$2c19eae0$844dc0a0$@net> <4B1D4F74.5157.008F.0@dnr.state.mn.us>
<020f01ca77a8$b34bc9a0$19e35ce0$@net>
Message-ID: <021601ca77ab$4592c500$d0b84f00$@net>
If I reduce the query string to just one that does work:
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
+400&qitem=MLRARSYM&qstring=(%22[MLRARSYM]%22%20in%20%22105%22)
I get a map with jus the one MLRA (#105) in yellow.
If I select on that does not work (#112):
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
+400&qitem=MLRARSYM&qstring=(%22[MLRARSYM]%22%20in%20%22112%22)
I get this error in the browser:
msQueryByAttributes(): Search returned no results. No matching record(s)
found. msSearchDiskTree(): Search returned no results. Unable to open
spatial index for c:\shape\MLRA_42_low_res/mlra_v42.qix. In most cases you
can safely ignore this message, otherwise check file names and permissions
But 112 is clearly rendering in the CLASS of the LAYER.
john
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John Guineau
Sent: Monday, December 07, 2009 8:50 PM
To: 'Steve Lime'; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map
generation problem
I think the missing ones are from random places n the query string. I have
tried putting just one of the missing MLRA in the query string and it still
does not generate
How do I label? (I am really new to MapServer!)
john
-----Original Message-----
From: Steve Lime [mailto:Steve.Lime at state.mn.us]
Sent: Monday, December 07, 2009 7:57 PM
To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
generation problem
Do the ones not selected fall at the end of your qstring? I'm wondering if
something is getting truncated. I'd think
you'd get a parsing error in that case, but perhaps not. Can you label the
polygons with the value for MLRARSYM?
Steve
>>> On 12/7/2009 at 6:19 PM, in message
<01dc01ca779c$2c19eae0$844dc0a0$@net>,
W.John Guineau wrote:
> Hi Steve,
>
>
>
> OK, I added the QUERYMAP section and changed the URL:
>
>
>
> http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map
>
&mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize
>
=600+400&qitem=MLRARSYM&qstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10
>
2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D
> ,111E,112,113,114A,114B,115A,115B,115C%22)>
>
&qlayer=coe_m&mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-
>
89+49&mapsize=600+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B
>
,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1
> 11D,111E,112,113,114A,114B,115A,115B,115C")
>
>
>
>
>
> Now I get the map with some of the items highlighted in yellow, and the
rest
> green:
>
>
>
>
>
>
>
> -----Original Message-----
> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
> Sent: Monday, December 07, 2009 7:04 PM
> To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
> generation problem
>
>
>
> Just add a querymap object to your mapfile, like so:
>
>
>
> QUERYMAP
>
> STATUS ON
>
> END
>
>
>
> Then change your URL to use the mode itemnquerymap and that should return
> just an image with the
>
> selected features highlighted in yellow.
>
>
>
> Steve
>
>
>
>>>> On 12/7/2009 at 5:56 PM, in message
> <01ce01ca7798$dd4b89d0$97e29d70$@net>,
>
> W.John Guineau wrote:
>
>> I'm new to mapserver, how do I quickly generate a querymap?
>
>>
>
>> I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've
also
>
>> tried 5.2.1 that I compiled myself.
>
>>
>
>> john
>
>>
>
>>
>
>> -----Original Message-----
>
>> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
>
>> Sent: Monday, December 07, 2009 6:40 PM
>
>> To: 'W.John Guineau'; mapserver-users at lists.osgeo.org
>
>> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
>
>> generation problem
>
>>
>
>> GDAL's not in play here at all. If you generate a query map instead of an
>
>> html image map does
>
>> the output map look ok? What version are you using?
>
>>
>
>> Steve
>
>>
>
>>>>> On 12/4/2009 at 8:11 AM, in message
>
>> <04e001ca74eb$bc473400$34d59c00$@net>,
>
>> W.John Guineau wrote:
>
>>> How would I go about debugging this?
>
>>>
>
>>>
>
>>>
>
>>> I think this is GDAL and its query of shapefiles, right?
>
>>>
>
>>>
>
>>>
>
>>> The bottom line is that MapServer finds all the items when it is
> rendering
>
>>> the map by layer/class EXPRESSION, but the qstring in a URL using the
>
>> exact
>
>>> same EXPRESSION string misses some of the items.
>
>>>
>
>>>
>
>>>
>
>>> I can also use ogrinfo from MAP4W to execute an SQL query directly on
the
>
>>> shapefile and the items in questions are certainly there.
>
>>>
>
>>>
>
>>>
>
>>> In the image below, the green areas are result of the mapfile layer
class
>
>>> EXPRESSION - all are correctly rendered. However, several of them do not
>
>> get
>
>>> generated (HTML imagemap tags not generated) when using a URL and
>
>>> itemnquery/qstring with the identical EXPRESSION.
>
>>>
>
>>>
>
>>>
>
>>> How do I enable debug (enabling mapfile DEBUG does not seem to give any
>
>>> useful info as to why GDAL is skipping certain items) Am I better off
>
>> using
>
>>> MAP4W or similar to get debug/trace info for shapefile queries?
>
>>>
>
>>>
>
>>>
>
>>> john
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>> From: mapserver-users-bounces at lists.osgeo.org
>
>>> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John
>
>> Guineau
>
>>> Sent: Thursday, December 03, 2009 3:11 PM
>
>>> To: mapserver-users at lists.osgeo.org
>
>>> Subject: [mapserver-users] Shapefile, itemnquery and HTML image map
>
>>> generation problem
>
>>>
>
>>>
>
>>>
>
>>> I have a basic vector shapefile that I am trying to generate HTML
>
>> clickable
>
>>> maps from. It seems to work well for the most part, however there is a
>
>>> problem where some items from the shapefile do not get processed from
the
>
>>> qstring in the browser, but they are processed fine in the mapfile layer
>
>> (to
>
>>> color them differently).
>
>>>
>
>>>
>
>>>
>
>>> So the map that renders shows all the items colored properly as the
layer
>
>>> class defines. Using the exact same list of items in the HTTP query
> string
>
>>> causes several items to be ignored (the HTML image map area is not
>
>>> generated).
>
>>>
>
>>>
>
>>>
>
>>>
>
>>
>
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
>
>
>>
>
>>>
>
>>
>
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
>
>>>
>
>>
>
+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105
>
>>>
>
>>
>
,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,
>
>>> 114A,114B,115A,115B,115C")
>
>>>
>
>>>
>
>>>
>
>>> Below is the layer section from the mapfile. I can post whatever else is
>
>>> helpful.
>
>>>
>
>>>
>
>>>
>
>>> Thanks for any help on this.
>
>>>
>
>>>
>
>>>
>
>>> john
>
>>>
>
>>>
>
>>>
>
>>> LAYER
>
>>>
>
>>> NAME map_m
>
>>>
>
>>> DATA "map_shape"
>
>>>
>
>>> TEMPLATE "bodytemplate.html"
>
>>>
>
>>> HEADER "imapheader.html"
>
>>>
>
>>> FOOTER "imapfooter.html"
>
>>>
>
>>> PROJECTION
>
>>>
>
>>> "proj=latlong"
>
>>>
>
>>> "ellps=GRS80"
>
>>>
>
>>> "init=epsg:4326"
>
>>>
>
>>> END
>
>>>
>
>>> TYPE polygon
>
>>>
>
>>> STATUS ON
>
>>>
>
>>> TRANSPARENCY 70
>
>>>
>
>>> CLASS
>
>>>
>
>>> NAME "MLRA"
>
>>>
>
>>> COLOR 0 200 0
>
>>>
>
>>> OUTLINECOLOR 0 0 0
>
>>>
>
>>> EXPRESSION( "[MLRARSYM]" in
>
>>>
>
>>
>
"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,1
>
>>> 11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
>
>>>
>
>>> END
>
>>>
>
>>> METADATA
>
>>>
>
>>> qstring_validation_pattern ".*"
>
>>>
>
>>> END
>
>>>
>
>>> END
>
>>
>
>> _______________________________________________
>
>> 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
From guineau at earthlink.net Mon Dec 7 18:27:21 2009
From: guineau at earthlink.net (W.John Guineau)
Date: Mon, 7 Dec 2009 21:27:21 -0500
Subject: [mapserver-users] Shapefile,
itemnquery and HTML image map generation problem
In-Reply-To: <021601ca77ab$4592c500$d0b84f00$@net>
References: <042101ca7454$bfc62830$3f527890$@net> <04e001ca74eb$bc473400$34d59c00$@net> <4B1D3D7A.5157.008F.0@dnr.state.mn.us> <01ce01ca7798$dd4b89d0$97e29d70$@net> <4B1D4310.5157.008F.0@dnr.state.mn.us> <01dc01ca779c$2c19eae0$844dc0a0$@net> <4B1D4F74.5157.008F.0@dnr.state.mn.us>
<020f01ca77a8$b34bc9a0$19e35ce0$@net>
<021601ca77ab$4592c500$d0b84f00$@net>
Message-ID: <021d01ca77ad$f95f9980$ec1ecc80$@net>
Using the MS4W tools:
C:\> ogrinfo mlra_v42.shx -sql "select LRR_NAME,MLRARSYM FROM mlra_v42 where
MLRARSYM in ('105','112')
Returns data for both regions.
C:\> ogrinfo -summary mlra_v42.shp mlra_v42
INFO: Open of `mlra_v42.shp'
using driver `ESRI Shapefile' successful.
Layer name: mlra_v42
Geometry: Polygon
Feature Count: 2748
Extent: (-179.130478, -14.381652) - (179.788041, 71.397535)
Layer SRS WKT:
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]]
MLRARSYM: String (4.0)
MLRA_ID: Integer (3.0)
MLRA_NAME: String (200.0)
LRRSYM: String (2.0)
LRR_NAME: String (135.0)
-----Original Message-----
From: W.John Guineau [mailto:guineau at earthlink.net]
Sent: Monday, December 07, 2009 9:08 PM
To: 'W.John Guineau'; 'Steve Lime'; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map
generation problem
If I reduce the query string to just one that does work:
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
+400&qitem=MLRARSYM&qstring=(%22[MLRARSYM]%22%20in%20%22105%22)
I get a map with jus the one MLRA (#105) in yellow.
If I select on that does not work (#112):
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
+400&qitem=MLRARSYM&qstring=(%22[MLRARSYM]%22%20in%20%22112%22)
I get this error in the browser:
msQueryByAttributes(): Search returned no results. No matching record(s)
found. msSearchDiskTree(): Search returned no results. Unable to open
spatial index for c:\shape\MLRA_42_low_res/mlra_v42.qix. In most cases you
can safely ignore this message, otherwise check file names and permissions
But 112 is clearly rendering in the CLASS of the LAYER.
john
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John Guineau
Sent: Monday, December 07, 2009 8:50 PM
To: 'Steve Lime'; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map
generation problem
I think the missing ones are from random places n the query string. I have
tried putting just one of the missing MLRA in the query string and it still
does not generate
How do I label? (I am really new to MapServer!)
john
-----Original Message-----
From: Steve Lime [mailto:Steve.Lime at state.mn.us]
Sent: Monday, December 07, 2009 7:57 PM
To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
generation problem
Do the ones not selected fall at the end of your qstring? I'm wondering if
something is getting truncated. I'd think
you'd get a parsing error in that case, but perhaps not. Can you label the
polygons with the value for MLRARSYM?
Steve
>>> On 12/7/2009 at 6:19 PM, in message
<01dc01ca779c$2c19eae0$844dc0a0$@net>,
W.John Guineau wrote:
> Hi Steve,
>
>
>
> OK, I added the QUERYMAP section and changed the URL:
>
>
>
> http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map
>
&mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize
>
=600+400&qitem=MLRARSYM&qstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10
>
2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D
> ,111E,112,113,114A,114B,115A,115B,115C%22)>
>
&qlayer=coe_m&mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-
>
89+49&mapsize=600+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B
>
,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1
> 11D,111E,112,113,114A,114B,115A,115B,115C")
>
>
>
>
>
> Now I get the map with some of the items highlighted in yellow, and the
rest
> green:
>
>
>
>
>
>
>
> -----Original Message-----
> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
> Sent: Monday, December 07, 2009 7:04 PM
> To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
> generation problem
>
>
>
> Just add a querymap object to your mapfile, like so:
>
>
>
> QUERYMAP
>
> STATUS ON
>
> END
>
>
>
> Then change your URL to use the mode itemnquerymap and that should return
> just an image with the
>
> selected features highlighted in yellow.
>
>
>
> Steve
>
>
>
>>>> On 12/7/2009 at 5:56 PM, in message
> <01ce01ca7798$dd4b89d0$97e29d70$@net>,
>
> W.John Guineau wrote:
>
>> I'm new to mapserver, how do I quickly generate a querymap?
>
>>
>
>> I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've
also
>
>> tried 5.2.1 that I compiled myself.
>
>>
>
>> john
>
>>
>
>>
>
>> -----Original Message-----
>
>> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
>
>> Sent: Monday, December 07, 2009 6:40 PM
>
>> To: 'W.John Guineau'; mapserver-users at lists.osgeo.org
>
>> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
>
>> generation problem
>
>>
>
>> GDAL's not in play here at all. If you generate a query map instead of an
>
>> html image map does
>
>> the output map look ok? What version are you using?
>
>>
>
>> Steve
>
>>
>
>>>>> On 12/4/2009 at 8:11 AM, in message
>
>> <04e001ca74eb$bc473400$34d59c00$@net>,
>
>> W.John Guineau wrote:
>
>>> How would I go about debugging this?
>
>>>
>
>>>
>
>>>
>
>>> I think this is GDAL and its query of shapefiles, right?
>
>>>
>
>>>
>
>>>
>
>>> The bottom line is that MapServer finds all the items when it is
> rendering
>
>>> the map by layer/class EXPRESSION, but the qstring in a URL using the
>
>> exact
>
>>> same EXPRESSION string misses some of the items.
>
>>>
>
>>>
>
>>>
>
>>> I can also use ogrinfo from MAP4W to execute an SQL query directly on
the
>
>>> shapefile and the items in questions are certainly there.
>
>>>
>
>>>
>
>>>
>
>>> In the image below, the green areas are result of the mapfile layer
class
>
>>> EXPRESSION - all are correctly rendered. However, several of them do not
>
>> get
>
>>> generated (HTML imagemap tags not generated) when using a URL and
>
>>> itemnquery/qstring with the identical EXPRESSION.
>
>>>
>
>>>
>
>>>
>
>>> How do I enable debug (enabling mapfile DEBUG does not seem to give any
>
>>> useful info as to why GDAL is skipping certain items) Am I better off
>
>> using
>
>>> MAP4W or similar to get debug/trace info for shapefile queries?
>
>>>
>
>>>
>
>>>
>
>>> john
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>> From: mapserver-users-bounces at lists.osgeo.org
>
>>> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John
>
>> Guineau
>
>>> Sent: Thursday, December 03, 2009 3:11 PM
>
>>> To: mapserver-users at lists.osgeo.org
>
>>> Subject: [mapserver-users] Shapefile, itemnquery and HTML image map
>
>>> generation problem
>
>>>
>
>>>
>
>>>
>
>>> I have a basic vector shapefile that I am trying to generate HTML
>
>> clickable
>
>>> maps from. It seems to work well for the most part, however there is a
>
>>> problem where some items from the shapefile do not get processed from
the
>
>>> qstring in the browser, but they are processed fine in the mapfile layer
>
>> (to
>
>>> color them differently).
>
>>>
>
>>>
>
>>>
>
>>> So the map that renders shows all the items colored properly as the
layer
>
>>> class defines. Using the exact same list of items in the HTTP query
> string
>
>>> causes several items to be ignored (the HTML image map area is not
>
>>> generated).
>
>>>
>
>>>
>
>>>
>
>>>
>
>>
>
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
>
>
>>
>
>>>
>
>>
>
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
>
>>>
>
>>
>
+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105
>
>>>
>
>>
>
,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,
>
>>> 114A,114B,115A,115B,115C")
>
>>>
>
>>>
>
>>>
>
>>> Below is the layer section from the mapfile. I can post whatever else is
>
>>> helpful.
>
>>>
>
>>>
>
>>>
>
>>> Thanks for any help on this.
>
>>>
>
>>>
>
>>>
>
>>> john
>
>>>
>
>>>
>
>>>
>
>>> LAYER
>
>>>
>
>>> NAME map_m
>
>>>
>
>>> DATA "map_shape"
>
>>>
>
>>> TEMPLATE "bodytemplate.html"
>
>>>
>
>>> HEADER "imapheader.html"
>
>>>
>
>>> FOOTER "imapfooter.html"
>
>>>
>
>>> PROJECTION
>
>>>
>
>>> "proj=latlong"
>
>>>
>
>>> "ellps=GRS80"
>
>>>
>
>>> "init=epsg:4326"
>
>>>
>
>>> END
>
>>>
>
>>> TYPE polygon
>
>>>
>
>>> STATUS ON
>
>>>
>
>>> TRANSPARENCY 70
>
>>>
>
>>> CLASS
>
>>>
>
>>> NAME "MLRA"
>
>>>
>
>>> COLOR 0 200 0
>
>>>
>
>>> OUTLINECOLOR 0 0 0
>
>>>
>
>>> EXPRESSION( "[MLRARSYM]" in
>
>>>
>
>>
>
"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,1
>
>>> 11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
>
>>>
>
>>> END
>
>>>
>
>>> METADATA
>
>>>
>
>>> qstring_validation_pattern ".*"
>
>>>
>
>>> END
>
>>>
>
>>> END
>
>>
>
>> _______________________________________________
>
>> 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
From jeremiahosullivan at gmail.com Tue Dec 8 01:41:37 2009
From: jeremiahosullivan at gmail.com (Jerry O'Sullivan)
Date: Tue, 08 Dec 2009 01:41:37 -0800 (PST)
Subject: [mapserver-users] Raster Image Quality
Message-ID: <7f666d17d7464fe991a95746659eca63@c7e2783a99cd4ba3951c244a6db7bfc0>
Hi,
Can anyone give me a few tips on producing better quality images from my raster maps. I chopped it up using maptiler - http://www.maptiler.org - and the image quality is top notch. When I use MapServer shp2img the quality isn't as good. I looked at the images in IfranView and the MapTiler image has a lot more unique colors
Here is the gdalinfo for one of the tiles
Image Structure Metadata:
COMPRESSION=LZW
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 316000.000, 271000.000) ( 6d14'39.88"W, 53d40'33.00"N)
Lower Left ( 316000.000, 268000.000) ( 6d14'43.91"W, 53d38'56.00"N)
Upper Right ( 320000.000, 271000.000) ( 6d11'2.06"W, 53d40'29.75"N)
Lower Right ( 320000.000, 268000.000) ( 6d11'6.23"W, 53d38'52.75"N)
Center ( 318000.000, 269500.000) ( 6d12'53.02"W, 53d39'42.89"N)
Band 1 Block=20000x1 Type=Byte, ColorInterp=Palette
Color Table (RGB with 256 entries)
0: 255,255,255,255
1: 0,0,0,255
2: 0,0,0,255
3: 0,0,0,255
4: 0,0,0,255
5: 0,0,0,255
6: 0,0,0,255
7: 0,0,0,255
8: 0,0,0,255
9: 0,0,0,255
10: 0,0,0,255
11: 0,0,0,255
12: 0,0,0,255
13: 0,0,0,255
14: 0,0,0,255
15: 0,0,0,255
16: 0,0,0,255
17: 0,0,0,255
18: 0,0,0,255
19: 0,0,0,255
20: 0,0,0,255
21: 0,0,0,255
22: 0,0,0,255
23: 0,0,0,255
24: 0,0,0,255
25: 0,0,0,255
26: 0,0,0,255
27: 0,0,0,255
28: 0,0,0,255
29: 0,0,0,255
30: 0,0,0,255
31: 0,0,0,255
32: 0,0,0,255
33: 0,0,0,255
34: 0,0,0,255
35: 0,0,0,255
36: 0,0,0,255
37: 0,0,0,255
38: 0,0,0,255
39: 0,0,0,255
40: 0,0,0,255
41: 0,0,0,255
42: 0,0,0,255
43: 0,0,0,255
44: 0,0,0,255
45: 0,0,0,255
46: 0,0,0,255
47: 0,0,0,255
48: 0,0,0,255
49: 0,0,0,255
50: 0,0,0,255
51: 0,0,0,255
52: 0,0,0,255
53: 0,0,0,255
54: 0,0,0,255
55: 0,0,0,255
56: 0,0,0,255
57: 0,0,0,255
58: 0,0,0,255
59: 0,0,0,255
60: 0,0,0,255
61: 0,0,0,255
62: 0,0,0,255
63: 0,0,0,255
64: 0,0,0,255
65: 0,0,0,255
66: 0,0,0,255
67: 0,0,0,255
68: 0,0,0,255
69: 0,0,0,255
70: 0,0,0,255
71: 0,0,0,255
72: 0,0,0,255
73: 0,0,0,255
74: 0,0,0,255
75: 0,0,0,255
76: 0,0,0,255
77: 0,0,0,255
78: 0,0,0,255
79: 0,0,0,255
80: 0,0,0,255
81: 0,0,0,255
82: 0,0,0,255
83: 0,0,0,255
84: 0,0,0,255
85: 0,0,0,255
86: 0,0,0,255
87: 0,0,0,255
88: 0,0,0,255
89: 0,0,0,255
90: 0,0,0,255
91: 0,0,0,255
92: 0,0,0,255
93: 0,0,0,255
94: 0,0,0,255
95: 0,0,0,255
96: 0,0,0,255
97: 0,0,0,255
98: 0,0,0,255
99: 0,0,0,255
100: 0,0,0,255
101: 0,0,0,255
102: 0,0,0,255
103: 0,0,0,255
104: 0,0,0,255
105: 0,0,0,255
106: 0,0,0,255
107: 0,0,0,255
108: 0,0,0,255
109: 0,0,0,255
110: 0,0,0,255
111: 0,0,0,255
112: 0,0,0,255
113: 0,0,0,255
114: 0,0,0,255
115: 0,0,0,255
116: 0,0,0,255
117: 0,0,0,255
118: 0,0,0,255
119: 0,0,0,255
120: 0,0,0,255
121: 0,0,0,255
122: 0,0,0,255
123: 0,0,0,255
124: 0,0,0,255
125: 0,0,0,255
126: 0,0,0,255
127: 0,0,0,255
128: 0,0,0,255
129: 0,0,0,255
130: 0,0,0,255
131: 0,0,0,255
132: 0,0,0,255
133: 0,0,0,255
134: 0,0,0,255
135: 0,0,0,255
136: 0,0,0,255
137: 0,0,0,255
138: 0,0,0,255
139: 0,0,0,255
140: 0,0,0,255
141: 0,0,0,255
142: 0,0,0,255
143: 0,0,0,255
144: 0,0,0,255
145: 0,0,0,255
146: 0,0,0,255
147: 0,0,0,255
148: 0,0,0,255
149: 0,0,0,255
150: 0,0,0,255
151: 0,0,0,255
152: 0,0,0,255
153: 0,0,0,255
154: 0,0,0,255
155: 0,0,0,255
156: 0,0,0,255
157: 0,0,0,255
158: 0,0,0,255
159: 0,0,0,255
160: 0,0,0,255
161: 0,0,0,255
162: 0,0,0,255
163: 0,0,0,255
164: 0,0,0,255
165: 0,0,0,255
166: 0,0,0,255
167: 0,0,0,255
168: 0,0,0,255
169: 0,0,0,255
170: 0,0,0,255
171: 0,0,0,255
172: 0,0,0,255
173: 0,0,0,255
174: 0,0,0,255
175: 0,0,0,255
176: 0,0,0,255
177: 0,0,0,255
178: 0,0,0,255
179: 0,0,0,255
180: 0,0,0,255
181: 0,0,0,255
182: 0,0,0,255
183: 0,0,0,255
184: 0,0,0,255
185: 0,0,0,255
186: 0,0,0,255
187: 0,0,0,255
188: 0,0,0,255
189: 0,0,0,255
190: 0,0,0,255
191: 0,0,0,255
192: 0,0,0,255
193: 0,0,0,255
194: 0,0,0,255
195: 0,0,0,255
196: 0,0,0,255
197: 0,0,0,255
198: 0,0,0,255
199: 0,0,0,255
200: 0,0,0,255
201: 0,0,0,255
202: 0,0,0,255
203: 0,0,0,255
204: 0,0,0,255
205: 0,0,0,255
206: 0,0,0,255
207: 0,0,0,255
208: 0,0,0,255
209: 0,0,0,255
210: 0,0,0,255
211: 0,0,0,255
212: 0,0,0,255
213: 0,0,0,255
214: 0,0,0,255
215: 0,0,0,255
216: 0,0,0,255
217: 0,0,0,255
218: 0,0,0,255
219: 0,0,0,255
220: 0,0,0,255
221: 0,0,0,255
222: 0,0,0,255
223: 0,0,0,255
224: 0,0,0,255
225: 0,0,0,255
226: 0,0,0,255
227: 0,0,0,255
228: 0,0,0,255
229: 0,0,0,255
230: 0,0,0,255
231: 0,0,0,255
232: 0,0,0,255
233: 0,0,0,255
234: 0,0,0,255
235: 0,0,0,255
236: 0,0,0,255
237: 0,0,0,255
238: 0,0,0,255
239: 0,0,0,255
240: 0,0,0,255
241: 0,0,0,255
242: 0,0,0,255
243: 0,0,0,255
244: 0,0,0,255
245: 0,0,0,255
246: 0,0,0,255
247: 0,0,0,255
248: 0,0,0,255
249: 0,0,0,255
250: 0,0,0,255
251: 0,0,0,255
252: 0,0,0,255
253: 0,0,0,255
254: 0,0,0,255
255: 0,0,0,255
Thanks,
Jerry
From francesco.pirotti at unipd.it Tue Dec 8 02:11:29 2009
From: francesco.pirotti at unipd.it (francesco)
Date: Tue, 08 Dec 2009 11:11:29 +0100
Subject: [mapserver-users] Raster Image Quality
In-Reply-To: <7f666d17d7464fe991a95746659eca63@c7e2783a99cd4ba3951c244a6db7bfc0>
References: <7f666d17d7464fe991a95746659eca63@c7e2783a99cd4ba3951c244a6db7bfc0>
Message-ID: <4B1E2651.3070800@unipd.it>
Jerry , your color table looks like it is of a black and white image
(255,255,255,255 is white, 0,0,0,255 is black) looks very strange to me.
Your problem could also be that you use 8-bit color images, you could
try to use RGB images which help when having to resample the tiles
(which is what shp2img does when it draws your image)
Cheers,
Francesco Pirotti
Jerry O'Sullivan ha scritto:
> Hi,
>
> Can anyone give me a few tips on producing better quality images from my raster maps. I chopped it up using maptiler - http://www.maptiler.org - and the image quality is top notch. When I use MapServer shp2img the quality isn't as good. I looked at the images in IfranView and the MapTiler image has a lot more unique colors
>
> Here is the gdalinfo for one of the tiles
>
> Image Structure Metadata:
> COMPRESSION=LZW
> INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left ( 316000.000, 271000.000) ( 6d14'39.88"W, 53d40'33.00"N)
> Lower Left ( 316000.000, 268000.000) ( 6d14'43.91"W, 53d38'56.00"N)
> Upper Right ( 320000.000, 271000.000) ( 6d11'2.06"W, 53d40'29.75"N)
> Lower Right ( 320000.000, 268000.000) ( 6d11'6.23"W, 53d38'52.75"N)
> Center ( 318000.000, 269500.000) ( 6d12'53.02"W, 53d39'42.89"N)
> Band 1 Block=20000x1 Type=Byte, ColorInterp=Palette
> Color Table (RGB with 256 entries)
> 0: 255,255,255,255
> 1: 0,0,0,255
> 2: 0,0,0,255
> 3: 0,0,0,255
> 4: 0,0,0,255
> 5: 0,0,0,255
> 6: 0,0,0,255
> 7: 0,0,0,255
> 8: 0,0,0,255
> 9: 0,0,0,255
> 10: 0,0,0,255
> 11: 0,0,0,255
> 12: 0,0,0,255
> 13: 0,0,0,255
> 14: 0,0,0,255
> 15: 0,0,0,255
> 16: 0,0,0,255
> 17: 0,0,0,255
> 18: 0,0,0,255
> 19: 0,0,0,255
> 20: 0,0,0,255
> 21: 0,0,0,255
> 22: 0,0,0,255
> 23: 0,0,0,255
> 24: 0,0,0,255
> 25: 0,0,0,255
> 26: 0,0,0,255
> 27: 0,0,0,255
> 28: 0,0,0,255
> 29: 0,0,0,255
> 30: 0,0,0,255
> 31: 0,0,0,255
> 32: 0,0,0,255
> 33: 0,0,0,255
> 34: 0,0,0,255
> 35: 0,0,0,255
> 36: 0,0,0,255
> 37: 0,0,0,255
> 38: 0,0,0,255
> 39: 0,0,0,255
> 40: 0,0,0,255
> 41: 0,0,0,255
> 42: 0,0,0,255
> 43: 0,0,0,255
> 44: 0,0,0,255
> 45: 0,0,0,255
> 46: 0,0,0,255
> 47: 0,0,0,255
> 48: 0,0,0,255
> 49: 0,0,0,255
> 50: 0,0,0,255
> 51: 0,0,0,255
> 52: 0,0,0,255
> 53: 0,0,0,255
> 54: 0,0,0,255
> 55: 0,0,0,255
> 56: 0,0,0,255
> 57: 0,0,0,255
> 58: 0,0,0,255
> 59: 0,0,0,255
> 60: 0,0,0,255
> 61: 0,0,0,255
> 62: 0,0,0,255
> 63: 0,0,0,255
> 64: 0,0,0,255
> 65: 0,0,0,255
> 66: 0,0,0,255
> 67: 0,0,0,255
> 68: 0,0,0,255
> 69: 0,0,0,255
> 70: 0,0,0,255
> 71: 0,0,0,255
> 72: 0,0,0,255
> 73: 0,0,0,255
> 74: 0,0,0,255
> 75: 0,0,0,255
> 76: 0,0,0,255
> 77: 0,0,0,255
> 78: 0,0,0,255
> 79: 0,0,0,255
> 80: 0,0,0,255
> 81: 0,0,0,255
> 82: 0,0,0,255
> 83: 0,0,0,255
> 84: 0,0,0,255
> 85: 0,0,0,255
> 86: 0,0,0,255
> 87: 0,0,0,255
> 88: 0,0,0,255
> 89: 0,0,0,255
> 90: 0,0,0,255
> 91: 0,0,0,255
> 92: 0,0,0,255
> 93: 0,0,0,255
> 94: 0,0,0,255
> 95: 0,0,0,255
> 96: 0,0,0,255
> 97: 0,0,0,255
> 98: 0,0,0,255
> 99: 0,0,0,255
> 100: 0,0,0,255
> 101: 0,0,0,255
> 102: 0,0,0,255
> 103: 0,0,0,255
> 104: 0,0,0,255
> 105: 0,0,0,255
> 106: 0,0,0,255
> 107: 0,0,0,255
> 108: 0,0,0,255
> 109: 0,0,0,255
> 110: 0,0,0,255
> 111: 0,0,0,255
> 112: 0,0,0,255
> 113: 0,0,0,255
> 114: 0,0,0,255
> 115: 0,0,0,255
> 116: 0,0,0,255
> 117: 0,0,0,255
> 118: 0,0,0,255
> 119: 0,0,0,255
> 120: 0,0,0,255
> 121: 0,0,0,255
> 122: 0,0,0,255
> 123: 0,0,0,255
> 124: 0,0,0,255
> 125: 0,0,0,255
> 126: 0,0,0,255
> 127: 0,0,0,255
> 128: 0,0,0,255
> 129: 0,0,0,255
> 130: 0,0,0,255
> 131: 0,0,0,255
> 132: 0,0,0,255
> 133: 0,0,0,255
> 134: 0,0,0,255
> 135: 0,0,0,255
> 136: 0,0,0,255
> 137: 0,0,0,255
> 138: 0,0,0,255
> 139: 0,0,0,255
> 140: 0,0,0,255
> 141: 0,0,0,255
> 142: 0,0,0,255
> 143: 0,0,0,255
> 144: 0,0,0,255
> 145: 0,0,0,255
> 146: 0,0,0,255
> 147: 0,0,0,255
> 148: 0,0,0,255
> 149: 0,0,0,255
> 150: 0,0,0,255
> 151: 0,0,0,255
> 152: 0,0,0,255
> 153: 0,0,0,255
> 154: 0,0,0,255
> 155: 0,0,0,255
> 156: 0,0,0,255
> 157: 0,0,0,255
> 158: 0,0,0,255
> 159: 0,0,0,255
> 160: 0,0,0,255
> 161: 0,0,0,255
> 162: 0,0,0,255
> 163: 0,0,0,255
> 164: 0,0,0,255
> 165: 0,0,0,255
> 166: 0,0,0,255
> 167: 0,0,0,255
> 168: 0,0,0,255
> 169: 0,0,0,255
> 170: 0,0,0,255
> 171: 0,0,0,255
> 172: 0,0,0,255
> 173: 0,0,0,255
> 174: 0,0,0,255
> 175: 0,0,0,255
> 176: 0,0,0,255
> 177: 0,0,0,255
> 178: 0,0,0,255
> 179: 0,0,0,255
> 180: 0,0,0,255
> 181: 0,0,0,255
> 182: 0,0,0,255
> 183: 0,0,0,255
> 184: 0,0,0,255
> 185: 0,0,0,255
> 186: 0,0,0,255
> 187: 0,0,0,255
> 188: 0,0,0,255
> 189: 0,0,0,255
> 190: 0,0,0,255
> 191: 0,0,0,255
> 192: 0,0,0,255
> 193: 0,0,0,255
> 194: 0,0,0,255
> 195: 0,0,0,255
> 196: 0,0,0,255
> 197: 0,0,0,255
> 198: 0,0,0,255
> 199: 0,0,0,255
> 200: 0,0,0,255
> 201: 0,0,0,255
> 202: 0,0,0,255
> 203: 0,0,0,255
> 204: 0,0,0,255
> 205: 0,0,0,255
> 206: 0,0,0,255
> 207: 0,0,0,255
> 208: 0,0,0,255
> 209: 0,0,0,255
> 210: 0,0,0,255
> 211: 0,0,0,255
> 212: 0,0,0,255
> 213: 0,0,0,255
> 214: 0,0,0,255
> 215: 0,0,0,255
> 216: 0,0,0,255
> 217: 0,0,0,255
> 218: 0,0,0,255
> 219: 0,0,0,255
> 220: 0,0,0,255
> 221: 0,0,0,255
> 222: 0,0,0,255
> 223: 0,0,0,255
> 224: 0,0,0,255
> 225: 0,0,0,255
> 226: 0,0,0,255
> 227: 0,0,0,255
> 228: 0,0,0,255
> 229: 0,0,0,255
> 230: 0,0,0,255
> 231: 0,0,0,255
> 232: 0,0,0,255
> 233: 0,0,0,255
> 234: 0,0,0,255
> 235: 0,0,0,255
> 236: 0,0,0,255
> 237: 0,0,0,255
> 238: 0,0,0,255
> 239: 0,0,0,255
> 240: 0,0,0,255
> 241: 0,0,0,255
> 242: 0,0,0,255
> 243: 0,0,0,255
> 244: 0,0,0,255
> 245: 0,0,0,255
> 246: 0,0,0,255
> 247: 0,0,0,255
> 248: 0,0,0,255
> 249: 0,0,0,255
> 250: 0,0,0,255
> 251: 0,0,0,255
> 252: 0,0,0,255
> 253: 0,0,0,255
> 254: 0,0,0,255
> 255: 0,0,0,255
>
> Thanks,
> Jerry
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
--
*Francesco Pirotti*
Dep. TESAF
CIRGEO ? Interdepartmental Research Center on Cartography Photogrammetry
Remote Sensing and G.I.S.
University of Padova
Web: http://www.cirgeo.unipd.it/cirgeo/francescopirotti.htm
Email: francesco.pirotti at unipd.it
Phone: +39 049 827 2710
Phone: +39 349 55 39 261
From francesco.pirotti at unipd.it Tue Dec 8 02:04:49 2009
From: francesco.pirotti at unipd.it (francesco)
Date: Tue, 08 Dec 2009 11:04:49 +0100
Subject: [mapserver-users] mapscript does not use GRID information when
reprojecting rect object
In-Reply-To: <5CDE4E2F906F4CE9B22AFEDB42CD00F0@SkySource>
References: <5CDE4E2F906F4CE9B22AFEDB42CD00F0@SkySource>
Message-ID: <4B1E24C1.5070309@unipd.it>
Hello I do not know if this it the right list to post, but I was
wandering if any of you had trouble when using the "project()" function
in mapscript (PHP). It does not use the grid file which is stated in the
EPSG line in the epsg file inside the ...proj/nad directory.
Reprojection of the map is wonderful, uses the grids, but script
reproject of a rectangle object does not make use of the grids. I made
sure of course that the epsg file which is read is the one I modified.
Anyone had the same problem?
Cheers,
--
*Francesco Pirotti*
Dep. TESAF
CIRGEO ? Interdepartmental Research Center on Cartography Photogrammetry
Remote Sensing and G.I.S.
University of Padova
Web: http://www.cirgeo.unipd.it/cirgeo/francescopirotti.htm
Email: francesco.pirotti at unipd.it
Phone: +39 049 827 2710
Phone: +39 349 55 39 261
From graeme.gould at grandunionhousing.co.uk Tue Dec 8 03:14:52 2009
From: graeme.gould at grandunionhousing.co.uk (GGould)
Date: Tue, 8 Dec 2009 03:14:52 -0800 (PST)
Subject: [mapserver-users] Leading zeros removed from variabel when
passed to map file
In-Reply-To: <1260186378116-4125557.post@n2.nabble.com>
References: <1260186378116-4125557.post@n2.nabble.com>
Message-ID: <1260270892350-4131812.post@n2.nabble.com>
Hi
Solved the problem by adding quote marks at the beginning and end of each
ref_no so that the variable is seem by the map file as a string rather than
an integer.
Graeme
GGould wrote:
>
> Hi
>
> Im just starting out with MapServer and have a bit of a stumbling block.
> The following script should identify a property based on the "ref_no"
> string variable passed to the map file.
>
> DATA "geometry from snh_properties"
> FILTER "placeref = %ref_no%"
>
> This works for all ref_no's beginning with a whole number, however if the
> re_no begins with a zero then it does not work. Has anyone come across
> this before and is there a solution that hopefully wont tax my brain too
> much.
>
> Cheers
>
> Graeme
>
>
>
>
--
View this message in context: http://n2.nabble.com/Leading-zeros-removed-from-variabel-when-passed-to-map-file-tp4125557p4131812.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
From jeremiahosullivan at gmail.com Tue Dec 8 04:53:34 2009
From: jeremiahosullivan at gmail.com (Jerry O'Sullivan)
Date: Tue, 08 Dec 2009 04:53:34 -0800 (PST)
Subject: [mapserver-users] Raster Image Quality
Message-ID: <4bb67801c667468db5234112961985b2@3497221ec4e848408137570c37e3fc8e>
Francesco,
They are black & white images.
Are you suggesting doing some processing with GDAL first or use some directives in the map file to improve image quality?
Thanks
Jerry
>Jerry , your color table looks like it is of a black and white image
>(255,255,255,255 is white, 0,0,0,255 is black) looks very strange to me.
>Your problem could also be that you use 8-bit color images, you could
>try to use RGB images which help when having to resample the tiles
>(which is what shp2img does when it draws your image)
>Cheers,
>Francesco Pirotti
>
>Jerry O'Sullivan ha scritto:
>> Hi,
>>
>> Can anyone give me a few tips on producing better quality images from my raster maps. I chopped it up using maptiler - http://www.maptiler.org - and the image quality is top notch. When I use MapServer shp2img the quality isn't as good. I looked at the images in IfranView and the MapTiler image has a lot more unique colors
>>
>> Here is the gdalinfo for one of the tiles
>>
>> Image Structure Metadata:
>> COMPRESSION=LZW
>> INTERLEAVE=BAND
>> Corner Coordinates:
>> Upper Left ( 316000.000, 271000.000) ( 6d14'39.88"W, 53d40'33.00"N)
>> Lower Left ( 316000.000, 268000.000) ( 6d14'43.91"W, 53d38'56.00"N)
>> Upper Right ( 320000.000, 271000.000) ( 6d11'2.06"W, 53d40'29.75"N)
>> Lower Right ( 320000.000, 268000.000) ( 6d11'6.23"W, 53d38'52.75"N)
>> Center ( 318000.000, 269500.000) ( 6d12'53.02"W, 53d39'42.89"N)
>> Band 1 Block=20000x1 Type=Byte, ColorInterp=Palette
>> Color Table (RGB with 256 entries)
>> 0: 255,255,255,255
>> 1: 0,0,0,255
>> 2: 0,0,0,255
>> 3: 0,0,0,255
>> 4: 0,0,0,255
>> 5: 0,0,0,255
>> 6: 0,0,0,255
>> 7: 0,0,0,255
>> 8: 0,0,0,255
>> 9: 0,0,0,255
>> 10: 0,0,0,255
>> 11: 0,0,0,255
>> 12: 0,0,0,255
>> 13: 0,0,0,255
>> 14: 0,0,0,255
>> 15: 0,0,0,255
>> 16: 0,0,0,255
>> 17: 0,0,0,255
>> 18: 0,0,0,255
>> 19: 0,0,0,255
>> 20: 0,0,0,255
>> 21: 0,0,0,255
>> 22: 0,0,0,255
>> 23: 0,0,0,255
>> 24: 0,0,0,255
>> 25: 0,0,0,255
>> 26: 0,0,0,255
>> 27: 0,0,0,255
>> 28: 0,0,0,255
>> 29: 0,0,0,255
>> 30: 0,0,0,255
>> 31: 0,0,0,255
>> 32: 0,0,0,255
>> 33: 0,0,0,255
>> 34: 0,0,0,255
>> 35: 0,0,0,255
>> 36: 0,0,0,255
>> 37: 0,0,0,255
>> 38: 0,0,0,255
>> 39: 0,0,0,255
>> 40: 0,0,0,255
>> 41: 0,0,0,255
>> 42: 0,0,0,255
>> 43: 0,0,0,255
>> 44: 0,0,0,255
>> 45: 0,0,0,255
>> 46: 0,0,0,255
>> 47: 0,0,0,255
>> 48: 0,0,0,255
>> 49: 0,0,0,255
>> 50: 0,0,0,255
>> 51: 0,0,0,255
>> 52: 0,0,0,255
>> 53: 0,0,0,255
>> 54: 0,0,0,255
>> 55: 0,0,0,255
>> 56: 0,0,0,255
>> 57: 0,0,0,255
>> 58: 0,0,0,255
>> 59: 0,0,0,255
>> 60: 0,0,0,255
>> 61: 0,0,0,255
>> 62: 0,0,0,255
>> 63: 0,0,0,255
>> 64: 0,0,0,255
>> 65: 0,0,0,255
>> 66: 0,0,0,255
>> 67: 0,0,0,255
>> 68: 0,0,0,255
>> 69: 0,0,0,255
>> 70: 0,0,0,255
>> 71: 0,0,0,255
>> 72: 0,0,0,255
>> 73: 0,0,0,255
>> 74: 0,0,0,255
>> 75: 0,0,0,255
>> 76: 0,0,0,255
>> 77: 0,0,0,255
>> 78: 0,0,0,255
>> 79: 0,0,0,255
>> 80: 0,0,0,255
>> 81: 0,0,0,255
>> 82: 0,0,0,255
>> 83: 0,0,0,255
>> 84: 0,0,0,255
>> 85: 0,0,0,255
>> 86: 0,0,0,255
>> 87: 0,0,0,255
>> 88: 0,0,0,255
>> 89: 0,0,0,255
>> 90: 0,0,0,255
>> 91: 0,0,0,255
>> 92: 0,0,0,255
>> 93: 0,0,0,255
>> 94: 0,0,0,255
>> 95: 0,0,0,255
>> 96: 0,0,0,255
>> 97: 0,0,0,255
>> 98: 0,0,0,255
>> 99: 0,0,0,255
>> 100: 0,0,0,255
>> 101: 0,0,0,255
>> 102: 0,0,0,255
>> 103: 0,0,0,255
>> 104: 0,0,0,255
>> 105: 0,0,0,255
>> 106: 0,0,0,255
>> 107: 0,0,0,255
>> 108: 0,0,0,255
>> 109: 0,0,0,255
>> 110: 0,0,0,255
>> 111: 0,0,0,255
>> 112: 0,0,0,255
>> 113: 0,0,0,255
>> 114: 0,0,0,255
>> 115: 0,0,0,255
>> 116: 0,0,0,255
>> 117: 0,0,0,255
>> 118: 0,0,0,255
>> 119: 0,0,0,255
>> 120: 0,0,0,255
>> 121: 0,0,0,255
>> 122: 0,0,0,255
>> 123: 0,0,0,255
>> 124: 0,0,0,255
>> 125: 0,0,0,255
>> 126: 0,0,0,255
>> 127: 0,0,0,255
>> 128: 0,0,0,255
>> 129: 0,0,0,255
>> 130: 0,0,0,255
>> 131: 0,0,0,255
>> 132: 0,0,0,255
>> 133: 0,0,0,255
>> 134: 0,0,0,255
>> 135: 0,0,0,255
>> 136: 0,0,0,255
>> 137: 0,0,0,255
>> 138: 0,0,0,255
>> 139: 0,0,0,255
>> 140: 0,0,0,255
>> 141: 0,0,0,255
>> 142: 0,0,0,255
>> 143: 0,0,0,255
>> 144: 0,0,0,255
>> 145: 0,0,0,255
>> 146: 0,0,0,255
>> 147: 0,0,0,255
>> 148: 0,0,0,255
>> 149: 0,0,0,255
>> 150: 0,0,0,255
>> 151: 0,0,0,255
>> 152: 0,0,0,255
>> 153: 0,0,0,255
>> 154: 0,0,0,255
>> 155: 0,0,0,255
>> 156: 0,0,0,255
>> 157: 0,0,0,255
>> 158: 0,0,0,255
>> 159: 0,0,0,255
>> 160: 0,0,0,255
>> 161: 0,0,0,255
>> 162: 0,0,0,255
>> 163: 0,0,0,255
>> 164: 0,0,0,255
>> 165: 0,0,0,255
>> 166: 0,0,0,255
>> 167: 0,0,0,255
>> 168: 0,0,0,255
>> 169: 0,0,0,255
>> 170: 0,0,0,255
>> 171: 0,0,0,255
>> 172: 0,0,0,255
>> 173: 0,0,0,255
>> 174: 0,0,0,255
>> 175: 0,0,0,255
>> 176: 0,0,0,255
>> 177: 0,0,0,255
>> 178: 0,0,0,255
>> 179: 0,0,0,255
>> 180: 0,0,0,255
>> 181: 0,0,0,255
>> 182: 0,0,0,255
>> 183: 0,0,0,255
>> 184: 0,0,0,255
>> 185: 0,0,0,255
>> 186: 0,0,0,255
>> 187: 0,0,0,255
>> 188: 0,0,0,255
>> 189: 0,0,0,255
>> 190: 0,0,0,255
>> 191: 0,0,0,255
>> 192: 0,0,0,255
>> 193: 0,0,0,255
>> 194: 0,0,0,255
>> 195: 0,0,0,255
>> 196: 0,0,0,255
>> 197: 0,0,0,255
>> 198: 0,0,0,255
>> 199: 0,0,0,255
>> 200: 0,0,0,255
>> 201: 0,0,0,255
>> 202: 0,0,0,255
>> 203: 0,0,0,255
>> 204: 0,0,0,255
>> 205: 0,0,0,255
>> 206: 0,0,0,255
>> 207: 0,0,0,255
>> 208: 0,0,0,255
>> 209: 0,0,0,255
>> 210: 0,0,0,255
>> 211: 0,0,0,255
>> 212: 0,0,0,255
>> 213: 0,0,0,255
>> 214: 0,0,0,255
>> 215: 0,0,0,255
>> 216: 0,0,0,255
>> 217: 0,0,0,255
>> 218: 0,0,0,255
>> 219: 0,0,0,255
>> 220: 0,0,0,255
>> 221: 0,0,0,255
>> 222: 0,0,0,255
>> 223: 0,0,0,255
>> 224: 0,0,0,255
>> 225: 0,0,0,255
>> 226: 0,0,0,255
>> 227: 0,0,0,255
>> 228: 0,0,0,255
>> 229: 0,0,0,255
>> 230: 0,0,0,255
>> 231: 0,0,0,255
>> 232: 0,0,0,255
>> 233: 0,0,0,255
>> 234: 0,0,0,255
>> 235: 0,0,0,255
>> 236: 0,0,0,255
>> 237: 0,0,0,255
>> 238: 0,0,0,255
>> 239: 0,0,0,255
>> 240: 0,0,0,255
>> 241: 0,0,0,255
>> 242: 0,0,0,255
>> 243: 0,0,0,255
>> 244: 0,0,0,255
>> 245: 0,0,0,255
>> 246: 0,0,0,255
>> 247: 0,0,0,255
>> 248: 0,0,0,255
>> 249: 0,0,0,255
>> 250: 0,0,0,255
>> 251: 0,0,0,255
>> 252: 0,0,0,255
>> 253: 0,0,0,255
>> 254: 0,0,0,255
>> 255: 0,0,0,255
>>
>> Thanks,
>> Jerry
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>>
>
>
>--
>*Francesco Pirotti*
>Dep. TESAF
>CIRGEO ? Interdepartmental Research Center on Cartography Photogrammetry
>Remote Sensing and G.I.S.
>University of Padova
>Web: http://www.cirgeo.unipd.it/cirgeo/francescopirotti.htm
>Email: francesco.pirotti at unipd.it
>Phone: +39 049 827 2710
>Phone: +39 349 55 39 261
>
>
>
From David.Fawcett at state.mn.us Mon Dec 7 06:41:30 2009
From: David.Fawcett at state.mn.us (Fawcett, David (MPCA))
Date: Mon, 7 Dec 2009 08:41:30 -0600
Subject: [mapserver-users] Shapefile, itemnquery and HTML image map
generation problem
In-Reply-To: <04e001ca74eb$bc473400$34d59c00$@net>
References: <042101ca7454$bfc62830$3f527890$@net>
<04e001ca74eb$bc473400$34d59c00$@net>
Message-ID:
John,
What features are not being rendered? Are they randomly distributed? located at the outside edges of the rendered features? Any pattern to the IDs?
David.
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John Guineau
Sent: Friday, December 04, 2009 8:12 AM
To: 'W.John Guineau'; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
How would I go about debugging this?
I think this is GDAL and its query of shapefiles, right?
The bottom line is that MapServer finds all the items when it is rendering the map by layer/class EXPRESSION, but the qstring in a URL using the exact same EXPRESSION string misses some of the items.
I can also use ogrinfo from MAP4W to execute an SQL query directly on the shapefile and the items in questions are certainly there.
In the image below, the green areas are result of the mapfile layer class EXPRESSION - all are correctly rendered. However, several of them do not get generated (HTML imagemap tags not generated) when using a URL and itemnquery/qstring with the identical EXPRESSION.
How do I enable debug (enabling mapfile DEBUG does not seem to give any useful info as to why GDAL is skipping certain items) Am I better off using MAP4W or similar to get debug/trace info for shapefile queries?
john
[cid:image001.png at 01CA7719.0F845920]
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John Guineau
Sent: Thursday, December 03, 2009 3:11 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Shapefile, itemnquery and HTML image map generation problem
I have a basic vector shapefile that I am trying to generate HTML clickable maps from. It seems to work well for the most part, however there is a problem where some items from the shapefile do not get processed from the qstring in the browser, but they are processed fine in the mapfile layer (to color them differently).
So the map that renders shows all the items colored properly as the layer class defines. Using the exact same list of items in the HTTP query string causes several items to be ignored (the HTML image map area is not generated).
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,114A,114B,115A,115B,115C")
Below is the layer section from the mapfile. I can post whatever else is helpful.
Thanks for any help on this.
john
LAYER
NAME map_m
DATA "map_shape"
TEMPLATE "bodytemplate.html"
HEADER "imapheader.html"
FOOTER "imapfooter.html"
PROJECTION
"proj=latlong"
"ellps=GRS80"
"init=epsg:4326"
END
TYPE polygon
STATUS ON
TRANSPARENCY 70
CLASS
NAME "MLRA"
COLOR 0 200 0
OUTLINECOLOR 0 0 0
EXPRESSION( "[MLRARSYM]" in "102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
END
METADATA
qstring_validation_pattern ".*"
END
END
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 26620 bytes
Desc: image001.png
URL:
From guineau at earthlink.net Mon Dec 7 16:19:56 2009
From: guineau at earthlink.net (W.John Guineau)
Date: Mon, 7 Dec 2009 19:19:56 -0500
Subject: [mapserver-users] Shapefile,
itemnquery and HTML image map generation problem
In-Reply-To: <4B1D4310.5157.008F.0@dnr.state.mn.us>
References: <042101ca7454$bfc62830$3f527890$@net>
<04e001ca74eb$bc473400$34d59c00$@net>
<4B1D3D7A.5157.008F.0@dnr.state.mn.us>
<01ce01ca7798$dd4b89d0$97e29d70$@net>
<4B1D4310.5157.008F.0@dnr.state.mn.us>
Message-ID: <01dc01ca779c$2c19eae0$844dc0a0$@net>
Hi Steve,
OK, I added the QUERYMAP section and changed the URL:
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map
&qlayer=coe_m&mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-
89+49&mapsize=600+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B
,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1
11D,111E,112,113,114A,114B,115A,115B,115C")
Now I get the map with some of the items highlighted in yellow, and the rest
green:
-----Original Message-----
From: Steve Lime [mailto:Steve.Lime at state.mn.us]
Sent: Monday, December 07, 2009 7:04 PM
To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
generation problem
Just add a querymap object to your mapfile, like so:
QUERYMAP
STATUS ON
END
Then change your URL to use the mode itemnquerymap and that should return
just an image with the
selected features highlighted in yellow.
Steve
>>> On 12/7/2009 at 5:56 PM, in message
<01ce01ca7798$dd4b89d0$97e29d70$@net>,
W.John Guineau wrote:
> I'm new to mapserver, how do I quickly generate a querymap?
>
> I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've also
> tried 5.2.1 that I compiled myself.
>
> john
>
>
> -----Original Message-----
> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
> Sent: Monday, December 07, 2009 6:40 PM
> To: 'W.John Guineau'; mapserver-users at lists.osgeo.org
> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
> generation problem
>
> GDAL's not in play here at all. If you generate a query map instead of an
> html image map does
> the output map look ok? What version are you using?
>
> Steve
>
>>>> On 12/4/2009 at 8:11 AM, in message
> <04e001ca74eb$bc473400$34d59c00$@net>,
> W.John Guineau wrote:
>> How would I go about debugging this?
>>
>>
>>
>> I think this is GDAL and its query of shapefiles, right?
>>
>>
>>
>> The bottom line is that MapServer finds all the items when it is
rendering
>> the map by layer/class EXPRESSION, but the qstring in a URL using the
> exact
>> same EXPRESSION string misses some of the items.
>>
>>
>>
>> I can also use ogrinfo from MAP4W to execute an SQL query directly on the
>> shapefile and the items in questions are certainly there.
>>
>>
>>
>> In the image below, the green areas are result of the mapfile layer class
>> EXPRESSION - all are correctly rendered. However, several of them do not
> get
>> generated (HTML imagemap tags not generated) when using a URL and
>> itemnquery/qstring with the identical EXPRESSION.
>>
>>
>>
>> How do I enable debug (enabling mapfile DEBUG does not seem to give any
>> useful info as to why GDAL is skipping certain items) Am I better off
> using
>> MAP4W or similar to get debug/trace info for shapefile queries?
>>
>>
>>
>> john
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> From: mapserver-users-bounces at lists.osgeo.org
>> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John
> Guineau
>> Sent: Thursday, December 03, 2009 3:11 PM
>> To: mapserver-users at lists.osgeo.org
>> Subject: [mapserver-users] Shapefile, itemnquery and HTML image map
>> generation problem
>>
>>
>>
>> I have a basic vector shapefile that I am trying to generate HTML
> clickable
>> maps from. It seems to work well for the most part, however there is a
>> problem where some items from the shapefile do not get processed from the
>> qstring in the browser, but they are processed fine in the mapfile layer
> (to
>> color them differently).
>>
>>
>>
>> So the map that renders shows all the items colored properly as the layer
>> class defines. Using the exact same list of items in the HTTP query
string
>> causes several items to be ignored (the HTML image map area is not
>> generated).
>>
>>
>>
>>
>
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
>
>>
>
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
>>
>
+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105
>>
>
,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,
>> 114A,114B,115A,115B,115C")
>>
>>
>>
>> Below is the layer section from the mapfile. I can post whatever else is
>> helpful.
>>
>>
>>
>> Thanks for any help on this.
>>
>>
>>
>> john
>>
>>
>>
>> LAYER
>>
>> NAME map_m
>>
>> DATA "map_shape"
>>
>> TEMPLATE "bodytemplate.html"
>>
>> HEADER "imapheader.html"
>>
>> FOOTER "imapfooter.html"
>>
>> PROJECTION
>>
>> "proj=latlong"
>>
>> "ellps=GRS80"
>>
>> "init=epsg:4326"
>>
>> END
>>
>> TYPE polygon
>>
>> STATUS ON
>>
>> TRANSPARENCY 70
>>
>> CLASS
>>
>> NAME "MLRA"
>>
>> COLOR 0 200 0
>>
>> OUTLINECOLOR 0 0 0
>>
>> EXPRESSION( "[MLRARSYM]" in
>>
>
"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,1
>> 11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
>>
>> END
>>
>> METADATA
>>
>> qstring_validation_pattern ".*"
>>
>> END
>>
>> END
>
> _______________________________________________
> 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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 23766 bytes
Desc: not available
URL:
From guineau at earthlink.net Mon Dec 7 16:24:59 2009
From: guineau at earthlink.net (W.John Guineau)
Date: Mon, 7 Dec 2009 19:24:59 -0500
Subject: [mapserver-users] Shapefile,
itemnquery and HTML image map generation problem
References: <042101ca7454$bfc62830$3f527890$@net>
<04e001ca74eb$bc473400$34d59c00$@net>
<4B1D3D7A.5157.008F.0@dnr.state.mn.us>
<01ce01ca7798$dd4b89d0$97e29d70$@net>
<4B1D4310.5157.008F.0@dnr.state.mn.us>
Message-ID: <01e601ca779c$e05300a0$a0f901e0$@net>
From: W.John Guineau [mailto:guineau at earthlink.net]
Sent: Monday, December 07, 2009 7:20 PM
To: 'Steve Lime'; 'mapserver-users at lists.osgeo.org'
Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
generation problem
Hi Steve,
OK, I added the QUERYMAP section and changed the URL:
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map
&qlayer=coe_m&mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-
89+49&mapsize=600+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B
,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1
11D,111E,112,113,114A,114B,115A,115B,115C")
Now I get the map with some of the items highlighted in yellow, and the rest
green:
-----Original Message-----
From: Steve Lime [mailto:Steve.Lime at state.mn.us]
Sent: Monday, December 07, 2009 7:04 PM
To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
generation problem
Just add a querymap object to your mapfile, like so:
QUERYMAP
STATUS ON
END
Then change your URL to use the mode itemnquerymap and that should return
just an image with the
selected features highlighted in yellow.
Steve
>>> On 12/7/2009 at 5:56 PM, in message
<01ce01ca7798$dd4b89d0$97e29d70$@net>,
W.John Guineau wrote:
> I'm new to mapserver, how do I quickly generate a querymap?
>
> I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've also
> tried 5.2.1 that I compiled myself.
>
> john
>
>
> -----Original Message-----
> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
> Sent: Monday, December 07, 2009 6:40 PM
> To: 'W.John Guineau'; mapserver-users at lists.osgeo.org
> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
> generation problem
>
> GDAL's not in play here at all. If you generate a query map instead of an
> html image map does
> the output map look ok? What version are you using?
>
> Steve
>
>>>> On 12/4/2009 at 8:11 AM, in message
> <04e001ca74eb$bc473400$34d59c00$@net>,
> W.John Guineau wrote:
>> How would I go about debugging this?
>>
>>
>>
>> I think this is GDAL and its query of shapefiles, right?
>>
>>
>>
>> The bottom line is that MapServer finds all the items when it is
rendering
>> the map by layer/class EXPRESSION, but the qstring in a URL using the
> exact
>> same EXPRESSION string misses some of the items.
>>
>>
>>
>> I can also use ogrinfo from MAP4W to execute an SQL query directly on the
>> shapefile and the items in questions are certainly there.
>>
>>
>>
>> In the image below, the green areas are result of the mapfile layer class
>> EXPRESSION - all are correctly rendered. However, several of them do not
> get
>> generated (HTML imagemap tags not generated) when using a URL and
>> itemnquery/qstring with the identical EXPRESSION.
>>
>>
>>
>> How do I enable debug (enabling mapfile DEBUG does not seem to give any
>> useful info as to why GDAL is skipping certain items) Am I better off
> using
>> MAP4W or similar to get debug/trace info for shapefile queries?
>>
>>
>>
>> john
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> From: mapserver-users-bounces at lists.osgeo.org
>> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John
> Guineau
>> Sent: Thursday, December 03, 2009 3:11 PM
>> To: mapserver-users at lists.osgeo.org
>> Subject: [mapserver-users] Shapefile, itemnquery and HTML image map
>> generation problem
>>
>>
>>
>> I have a basic vector shapefile that I am trying to generate HTML
> clickable
>> maps from. It seems to work well for the most part, however there is a
>> problem where some items from the shapefile do not get processed from the
>> qstring in the browser, but they are processed fine in the mapfile layer
> (to
>> color them differently).
>>
>>
>>
>> So the map that renders shows all the items colored properly as the layer
>> class defines. Using the exact same list of items in the HTTP query
string
>> causes several items to be ignored (the HTML image map area is not
>> generated).
>>
>>
>>
>>
>
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
>
>>
>
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
>>
>
+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105
>>
>
,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,
>> 114A,114B,115A,115B,115C")
>>
>>
>>
>> Below is the layer section from the mapfile. I can post whatever else is
>> helpful.
>>
>>
>>
>> Thanks for any help on this.
>>
>>
>>
>> john
>>
>>
>>
>> LAYER
>>
>> NAME map_m
>>
>> DATA "map_shape"
>>
>> TEMPLATE "bodytemplate.html"
>>
>> HEADER "imapheader.html"
>>
>> FOOTER "imapfooter.html"
>>
>> PROJECTION
>>
>> "proj=latlong"
>>
>> "ellps=GRS80"
>>
>> "init=epsg:4326"
>>
>> END
>>
>> TYPE polygon
>>
>> STATUS ON
>>
>> TRANSPARENCY 70
>>
>> CLASS
>>
>> NAME "MLRA"
>>
>> COLOR 0 200 0
>>
>> OUTLINECOLOR 0 0 0
>>
>> EXPRESSION( "[MLRARSYM]" in
>>
>
"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,1
>> 11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
>>
>> END
>>
>> METADATA
>>
>> qstring_validation_pattern ".*"
>>
>> END
>>
>> END
>
> _______________________________________________
> 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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 10250 bytes
Desc: not available
URL:
From guineau at earthlink.net Mon Dec 7 18:03:32 2009
From: guineau at earthlink.net (W.John Guineau)
Date: Mon, 7 Dec 2009 21:03:32 -0500
Subject: [mapserver-users] Shapefile,
itemnquery and HTML image map generation problem
In-Reply-To: <4B1D4F74.5157.008F.0@dnr.state.mn.us>
References: <042101ca7454$bfc62830$3f527890$@net>
<04e001ca74eb$bc473400$34d59c00$@net>
<4B1D3D7A.5157.008F.0@dnr.state.mn.us>
<01ce01ca7798$dd4b89d0$97e29d70$@net>
<4B1D4310.5157.008F.0@dnr.state.mn.us>
<01dc01ca779c$2c19eae0$844dc0a0$@net>
<4B1D4F74.5157.008F.0@dnr.state.mn.us>
Message-ID: <021001ca77aa$a5365ef0$efa31cd0$@net>
Ok, try this:
-----Original Message-----
From: Steve Lime [mailto:Steve.Lime at state.mn.us]
Sent: Monday, December 07, 2009 7:57 PM
To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
generation problem
Do the ones not selected fall at the end of your qstring? I'm wondering if
something is getting truncated. I'd think
you'd get a parsing error in that case, but perhaps not. Can you label the
polygons with the value for MLRARSYM?
Steve
>>> On 12/7/2009 at 6:19 PM, in message
<01dc01ca779c$2c19eae0$844dc0a0$@net>,
W.John Guineau wrote:
> Hi Steve,
>
>
>
> OK, I added the QUERYMAP section and changed the URL:
>
>
>
> http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map
>
&mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize
>
=600+400&qitem=MLRARSYM&qstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10
>
2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D
> ,111E,112,113,114A,114B,115A,115B,115C%22)>
>
&qlayer=coe_m&mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-
>
89+49&mapsize=600+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B
>
,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1
> 11D,111E,112,113,114A,114B,115A,115B,115C")
>
>
>
>
>
> Now I get the map with some of the items highlighted in yellow, and the
rest
> green:
>
>
>
>
>
>
>
> -----Original Message-----
> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
> Sent: Monday, December 07, 2009 7:04 PM
> To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
> generation problem
>
>
>
> Just add a querymap object to your mapfile, like so:
>
>
>
> QUERYMAP
>
> STATUS ON
>
> END
>
>
>
> Then change your URL to use the mode itemnquerymap and that should return
> just an image with the
>
> selected features highlighted in yellow.
>
>
>
> Steve
>
>
>
>>>> On 12/7/2009 at 5:56 PM, in message
> <01ce01ca7798$dd4b89d0$97e29d70$@net>,
>
> W.John Guineau wrote:
>
>> I'm new to mapserver, how do I quickly generate a querymap?
>
>>
>
>> I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've
also
>
>> tried 5.2.1 that I compiled myself.
>
>>
>
>> john
>
>>
>
>>
>
>> -----Original Message-----
>
>> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
>
>> Sent: Monday, December 07, 2009 6:40 PM
>
>> To: 'W.John Guineau'; mapserver-users at lists.osgeo.org
>
>> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
>
>> generation problem
>
>>
>
>> GDAL's not in play here at all. If you generate a query map instead of an
>
>> html image map does
>
>> the output map look ok? What version are you using?
>
>>
>
>> Steve
>
>>
>
>>>>> On 12/4/2009 at 8:11 AM, in message
>
>> <04e001ca74eb$bc473400$34d59c00$@net>,
>
>> W.John Guineau wrote:
>
>>> How would I go about debugging this?
>
>>>
>
>>>
>
>>>
>
>>> I think this is GDAL and its query of shapefiles, right?
>
>>>
>
>>>
>
>>>
>
>>> The bottom line is that MapServer finds all the items when it is
> rendering
>
>>> the map by layer/class EXPRESSION, but the qstring in a URL using the
>
>> exact
>
>>> same EXPRESSION string misses some of the items.
>
>>>
>
>>>
>
>>>
>
>>> I can also use ogrinfo from MAP4W to execute an SQL query directly on
the
>
>>> shapefile and the items in questions are certainly there.
>
>>>
>
>>>
>
>>>
>
>>> In the image below, the green areas are result of the mapfile layer
class
>
>>> EXPRESSION - all are correctly rendered. However, several of them do not
>
>> get
>
>>> generated (HTML imagemap tags not generated) when using a URL and
>
>>> itemnquery/qstring with the identical EXPRESSION.
>
>>>
>
>>>
>
>>>
>
>>> How do I enable debug (enabling mapfile DEBUG does not seem to give any
>
>>> useful info as to why GDAL is skipping certain items) Am I better off
>
>> using
>
>>> MAP4W or similar to get debug/trace info for shapefile queries?
>
>>>
>
>>>
>
>>>
>
>>> john
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>> From: mapserver-users-bounces at lists.osgeo.org
>
>>> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John
>
>> Guineau
>
>>> Sent: Thursday, December 03, 2009 3:11 PM
>
>>> To: mapserver-users at lists.osgeo.org
>
>>> Subject: [mapserver-users] Shapefile, itemnquery and HTML image map
>
>>> generation problem
>
>>>
>
>>>
>
>>>
>
>>> I have a basic vector shapefile that I am trying to generate HTML
>
>> clickable
>
>>> maps from. It seems to work well for the most part, however there is a
>
>>> problem where some items from the shapefile do not get processed from
the
>
>>> qstring in the browser, but they are processed fine in the mapfile layer
>
>> (to
>
>>> color them differently).
>
>>>
>
>>>
>
>>>
>
>>> So the map that renders shows all the items colored properly as the
layer
>
>>> class defines. Using the exact same list of items in the HTTP query
> string
>
>>> causes several items to be ignored (the HTML image map area is not
>
>>> generated).
>
>>>
>
>>>
>
>>>
>
>>>
>
>>
>
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
>
>
>>
>
>>>
>
>>
>
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
>
>>>
>
>>
>
+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105
>
>>>
>
>>
>
,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,
>
>>> 114A,114B,115A,115B,115C")
>
>>>
>
>>>
>
>>>
>
>>> Below is the layer section from the mapfile. I can post whatever else is
>
>>> helpful.
>
>>>
>
>>>
>
>>>
>
>>> Thanks for any help on this.
>
>>>
>
>>>
>
>>>
>
>>> john
>
>>>
>
>>>
>
>>>
>
>>> LAYER
>
>>>
>
>>> NAME map_m
>
>>>
>
>>> DATA "map_shape"
>
>>>
>
>>> TEMPLATE "bodytemplate.html"
>
>>>
>
>>> HEADER "imapheader.html"
>
>>>
>
>>> FOOTER "imapfooter.html"
>
>>>
>
>>> PROJECTION
>
>>>
>
>>> "proj=latlong"
>
>>>
>
>>> "ellps=GRS80"
>
>>>
>
>>> "init=epsg:4326"
>
>>>
>
>>> END
>
>>>
>
>>> TYPE polygon
>
>>>
>
>>> STATUS ON
>
>>>
>
>>> TRANSPARENCY 70
>
>>>
>
>>> CLASS
>
>>>
>
>>> NAME "MLRA"
>
>>>
>
>>> COLOR 0 200 0
>
>>>
>
>>> OUTLINECOLOR 0 0 0
>
>>>
>
>>> EXPRESSION( "[MLRARSYM]" in
>
>>>
>
>>
>
"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,1
>
>>> 11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
>
>>>
>
>>> END
>
>>>
>
>>> METADATA
>
>>>
>
>>> qstring_validation_pattern ".*"
>
>>>
>
>>> END
>
>>>
>
>>> END
>
>>
>
>> _______________________________________________
>
>> 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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 26658 bytes
Desc: not available
URL:
From francesco.pirotti at unipd.it Tue Dec 8 05:48:13 2009
From: francesco.pirotti at unipd.it (francesco)
Date: Tue, 08 Dec 2009 14:48:13 +0100
Subject: [mapserver-users] Raster Image Quality
In-Reply-To: <4bb67801c667468db5234112961985b2@3497221ec4e848408137570c37e3fc8e>
References: <4bb67801c667468db5234112961985b2@3497221ec4e848408137570c37e3fc8e>
Message-ID: <4B1E591D.9070209@unipd.it>
shp2img requires a mapfile... what kind of image outpuformat did you use
in your mapfile?
Shp2img resamples paletted black and white images and that does not
give a great result usually. you could try to output grey scale 8-bit
images (byte but not paletted). Did you also use pyramid layers or does
the maptiler program also give you different scales?
Francesco
Jerry O'Sullivan ha scritto:
> Francesco,
>
> They are black & white images.
>
> Are you suggesting doing some processing with GDAL first or use some directives in the map file to improve image quality?
>
> Thanks
> Jerry
>
>
>
>> Jerry , your color table looks like it is of a black and white image
>> (255,255,255,255 is white, 0,0,0,255 is black) looks very strange to me.
>> Your problem could also be that you use 8-bit color images, you could
>> try to use RGB images which help when having to resample the tiles
>> (which is what shp2img does when it draws your image)
>> Cheers,
>> Francesco Pirotti
>>
>> Jerry O'Sullivan ha scritto:
>>
>>> Hi,
>>>
>>> Can anyone give me a few tips on producing better quality images from my raster maps. I chopped it up using maptiler - http://www.maptiler.org - and the image quality is top notch. When I use MapServer shp2img the quality isn't as good. I looked at the images in IfranView and the MapTiler image has a lot more unique colors
>>>
>>> Here is the gdalinfo for one of the tiles
>>>
>>> Image Structure Metadata:
>>> COMPRESSION=LZW
>>> INTERLEAVE=BAND
>>> Corner Coordinates:
>>> Upper Left ( 316000.000, 271000.000) ( 6d14'39.88"W, 53d40'33.00"N)
>>> Lower Left ( 316000.000, 268000.000) ( 6d14'43.91"W, 53d38'56.00"N)
>>> Upper Right ( 320000.000, 271000.000) ( 6d11'2.06"W, 53d40'29.75"N)
>>> Lower Right ( 320000.000, 268000.000) ( 6d11'6.23"W, 53d38'52.75"N)
>>> Center ( 318000.000, 269500.000) ( 6d12'53.02"W, 53d39'42.89"N)
>>> Band 1 Block=20000x1 Type=Byte, ColorInterp=Palette
>>> Color Table (RGB with 256 entries)
>>> 0: 255,255,255,255
>>> 1: 0,0,0,255
>>> 2: 0,0,0,255
>>> 3: 0,0,0,255
>>> 4: 0,0,0,255
>>> 5: 0,0,0,255
>>> 6: 0,0,0,255
>>> 7: 0,0,0,255
>>> 8: 0,0,0,255
>>> 9: 0,0,0,255
>>> 10: 0,0,0,255
>>> 11: 0,0,0,255
>>> 12: 0,0,0,255
>>> 13: 0,0,0,255
>>> 14: 0,0,0,255
>>> 15: 0,0,0,255
>>> 16: 0,0,0,255
>>> 17: 0,0,0,255
>>> 18: 0,0,0,255
>>> 19: 0,0,0,255
>>> 20: 0,0,0,255
>>> 21: 0,0,0,255
>>> 22: 0,0,0,255
>>> 23: 0,0,0,255
>>> 24: 0,0,0,255
>>> 25: 0,0,0,255
>>> 26: 0,0,0,255
>>> 27: 0,0,0,255
>>> 28: 0,0,0,255
>>> 29: 0,0,0,255
>>> 30: 0,0,0,255
>>> 31: 0,0,0,255
>>> 32: 0,0,0,255
>>> 33: 0,0,0,255
>>> 34: 0,0,0,255
>>> 35: 0,0,0,255
>>> 36: 0,0,0,255
>>> 37: 0,0,0,255
>>> 38: 0,0,0,255
>>> 39: 0,0,0,255
>>> 40: 0,0,0,255
>>> 41: 0,0,0,255
>>> 42: 0,0,0,255
>>> 43: 0,0,0,255
>>> 44: 0,0,0,255
>>> 45: 0,0,0,255
>>> 46: 0,0,0,255
>>> 47: 0,0,0,255
>>> 48: 0,0,0,255
>>> 49: 0,0,0,255
>>> 50: 0,0,0,255
>>> 51: 0,0,0,255
>>> 52: 0,0,0,255
>>> 53: 0,0,0,255
>>> 54: 0,0,0,255
>>> 55: 0,0,0,255
>>> 56: 0,0,0,255
>>> 57: 0,0,0,255
>>> 58: 0,0,0,255
>>> 59: 0,0,0,255
>>> 60: 0,0,0,255
>>> 61: 0,0,0,255
>>> 62: 0,0,0,255
>>> 63: 0,0,0,255
>>> 64: 0,0,0,255
>>> 65: 0,0,0,255
>>> 66: 0,0,0,255
>>> 67: 0,0,0,255
>>> 68: 0,0,0,255
>>> 69: 0,0,0,255
>>> 70: 0,0,0,255
>>> 71: 0,0,0,255
>>> 72: 0,0,0,255
>>> 73: 0,0,0,255
>>> 74: 0,0,0,255
>>> 75: 0,0,0,255
>>> 76: 0,0,0,255
>>> 77: 0,0,0,255
>>> 78: 0,0,0,255
>>> 79: 0,0,0,255
>>> 80: 0,0,0,255
>>> 81: 0,0,0,255
>>> 82: 0,0,0,255
>>> 83: 0,0,0,255
>>> 84: 0,0,0,255
>>> 85: 0,0,0,255
>>> 86: 0,0,0,255
>>> 87: 0,0,0,255
>>> 88: 0,0,0,255
>>> 89: 0,0,0,255
>>> 90: 0,0,0,255
>>> 91: 0,0,0,255
>>> 92: 0,0,0,255
>>> 93: 0,0,0,255
>>> 94: 0,0,0,255
>>> 95: 0,0,0,255
>>> 96: 0,0,0,255
>>> 97: 0,0,0,255
>>> 98: 0,0,0,255
>>> 99: 0,0,0,255
>>> 100: 0,0,0,255
>>> 101: 0,0,0,255
>>> 102: 0,0,0,255
>>> 103: 0,0,0,255
>>> 104: 0,0,0,255
>>> 105: 0,0,0,255
>>> 106: 0,0,0,255
>>> 107: 0,0,0,255
>>> 108: 0,0,0,255
>>> 109: 0,0,0,255
>>> 110: 0,0,0,255
>>> 111: 0,0,0,255
>>> 112: 0,0,0,255
>>> 113: 0,0,0,255
>>> 114: 0,0,0,255
>>> 115: 0,0,0,255
>>> 116: 0,0,0,255
>>> 117: 0,0,0,255
>>> 118: 0,0,0,255
>>> 119: 0,0,0,255
>>> 120: 0,0,0,255
>>> 121: 0,0,0,255
>>> 122: 0,0,0,255
>>> 123: 0,0,0,255
>>> 124: 0,0,0,255
>>> 125: 0,0,0,255
>>> 126: 0,0,0,255
>>> 127: 0,0,0,255
>>> 128: 0,0,0,255
>>> 129: 0,0,0,255
>>> 130: 0,0,0,255
>>> 131: 0,0,0,255
>>> 132: 0,0,0,255
>>> 133: 0,0,0,255
>>> 134: 0,0,0,255
>>> 135: 0,0,0,255
>>> 136: 0,0,0,255
>>> 137: 0,0,0,255
>>> 138: 0,0,0,255
>>> 139: 0,0,0,255
>>> 140: 0,0,0,255
>>> 141: 0,0,0,255
>>> 142: 0,0,0,255
>>> 143: 0,0,0,255
>>> 144: 0,0,0,255
>>> 145: 0,0,0,255
>>> 146: 0,0,0,255
>>> 147: 0,0,0,255
>>> 148: 0,0,0,255
>>> 149: 0,0,0,255
>>> 150: 0,0,0,255
>>> 151: 0,0,0,255
>>> 152: 0,0,0,255
>>> 153: 0,0,0,255
>>> 154: 0,0,0,255
>>> 155: 0,0,0,255
>>> 156: 0,0,0,255
>>> 157: 0,0,0,255
>>> 158: 0,0,0,255
>>> 159: 0,0,0,255
>>> 160: 0,0,0,255
>>> 161: 0,0,0,255
>>> 162: 0,0,0,255
>>> 163: 0,0,0,255
>>> 164: 0,0,0,255
>>> 165: 0,0,0,255
>>> 166: 0,0,0,255
>>> 167: 0,0,0,255
>>> 168: 0,0,0,255
>>> 169: 0,0,0,255
>>> 170: 0,0,0,255
>>> 171: 0,0,0,255
>>> 172: 0,0,0,255
>>> 173: 0,0,0,255
>>> 174: 0,0,0,255
>>> 175: 0,0,0,255
>>> 176: 0,0,0,255
>>> 177: 0,0,0,255
>>> 178: 0,0,0,255
>>> 179: 0,0,0,255
>>> 180: 0,0,0,255
>>> 181: 0,0,0,255
>>> 182: 0,0,0,255
>>> 183: 0,0,0,255
>>> 184: 0,0,0,255
>>> 185: 0,0,0,255
>>> 186: 0,0,0,255
>>> 187: 0,0,0,255
>>> 188: 0,0,0,255
>>> 189: 0,0,0,255
>>> 190: 0,0,0,255
>>> 191: 0,0,0,255
>>> 192: 0,0,0,255
>>> 193: 0,0,0,255
>>> 194: 0,0,0,255
>>> 195: 0,0,0,255
>>> 196: 0,0,0,255
>>> 197: 0,0,0,255
>>> 198: 0,0,0,255
>>> 199: 0,0,0,255
>>> 200: 0,0,0,255
>>> 201: 0,0,0,255
>>> 202: 0,0,0,255
>>> 203: 0,0,0,255
>>> 204: 0,0,0,255
>>> 205: 0,0,0,255
>>> 206: 0,0,0,255
>>> 207: 0,0,0,255
>>> 208: 0,0,0,255
>>> 209: 0,0,0,255
>>> 210: 0,0,0,255
>>> 211: 0,0,0,255
>>> 212: 0,0,0,255
>>> 213: 0,0,0,255
>>> 214: 0,0,0,255
>>> 215: 0,0,0,255
>>> 216: 0,0,0,255
>>> 217: 0,0,0,255
>>> 218: 0,0,0,255
>>> 219: 0,0,0,255
>>> 220: 0,0,0,255
>>> 221: 0,0,0,255
>>> 222: 0,0,0,255
>>> 223: 0,0,0,255
>>> 224: 0,0,0,255
>>> 225: 0,0,0,255
>>> 226: 0,0,0,255
>>> 227: 0,0,0,255
>>> 228: 0,0,0,255
>>> 229: 0,0,0,255
>>> 230: 0,0,0,255
>>> 231: 0,0,0,255
>>> 232: 0,0,0,255
>>> 233: 0,0,0,255
>>> 234: 0,0,0,255
>>> 235: 0,0,0,255
>>> 236: 0,0,0,255
>>> 237: 0,0,0,255
>>> 238: 0,0,0,255
>>> 239: 0,0,0,255
>>> 240: 0,0,0,255
>>> 241: 0,0,0,255
>>> 242: 0,0,0,255
>>> 243: 0,0,0,255
>>> 244: 0,0,0,255
>>> 245: 0,0,0,255
>>> 246: 0,0,0,255
>>> 247: 0,0,0,255
>>> 248: 0,0,0,255
>>> 249: 0,0,0,255
>>> 250: 0,0,0,255
>>> 251: 0,0,0,255
>>> 252: 0,0,0,255
>>> 253: 0,0,0,255
>>> 254: 0,0,0,255
>>> 255: 0,0,0,255
>>>
>>> Thanks,
>>> Jerry
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>>
>>>
>> --
>> *Francesco Pirotti*
>> Dep. TESAF
>> CIRGEO ? Interdepartmental Research Center on Cartography Photogrammetry
>> Remote Sensing and G.I.S.
>> University of Padova
>> Web: http://www.cirgeo.unipd.it/cirgeo/francescopirotti.htm
>> Email: francesco.pirotti at unipd.it
>> Phone: +39 049 827 2710
>> Phone: +39 349 55 39 261
>>
>>
>>
>>
>
>
>
--
*Francesco Pirotti*
Dep. TESAF
CIRGEO ? Interdepartmental Research Center on Cartography Photogrammetry
Remote Sensing and G.I.S.
University of Padova
Web: http://www.cirgeo.unipd.it/cirgeo/francescopirotti.htm
Email: francesco.pirotti at unipd.it
Phone: +39 049 827 2710
Phone: +39 349 55 39 261
From Steve.Lime at state.mn.us Tue Dec 8 06:26:06 2009
From: Steve.Lime at state.mn.us (Steve Lime)
Date: Tue, 08 Dec 2009 08:26:06 -0600
Subject: [mapserver-users] Shapefile,itemnquery and
HTML image map generation problem
Message-ID: <4B1E0D9E0200008F0002BBB7@co5.dnr.state.mn.us>
Seems like an extent problem to me - the way the results are clustered in the
center of the image. MapServer does apply a spatial pre-filter for attribute
queries. However, the searchmap=true should compute a proper extent based
on your image properties (extent, size) before doing the query.
John, what are the changes you could zip up your data and mapfile for me?
Steve
>>> W.John Guineau 12/08/09 7:05 AM >>>
Ok, try this:
-----Original Message-----
From: Steve Lime [mailto:Steve.Lime at state.mn.us]
Sent: Monday, December 07, 2009 7:57 PM
To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
generation problem
Do the ones not selected fall at the end of your qstring? I'm wondering if
something is getting truncated. I'd think
you'd get a parsing error in that case, but perhaps not. Can you label the
polygons with the value for MLRARSYM?
Steve
>>> On 12/7/2009 at 6:19 PM, in message
<01dc01ca779c$2c19eae0$844dc0a0$@net>,
W.John Guineau wrote:
> Hi Steve,
>
>
>
> OK, I added the QUERYMAP section and changed the URL:
>
>
>
> http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map
>
&mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize
>
=600+400&qitem=MLRARSYM&qstring=(%22%5bMLRARSYM%5d%22%20in%20%22102A,102B,10
>
2C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D
> ,111E,112,113,114A,114B,115A,115B,115C%22)>
>
&qlayer=coe_m&mode=itemnquerymap&searchmap=true&layer=states&mapext=-91+34+-
>
89+49&mapsize=600+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B
>
,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,1
> 11D,111E,112,113,114A,114B,115A,115B,115C")
>
>
>
>
>
> Now I get the map with some of the items highlighted in yellow, and the
rest
> green:
>
>
>
>
>
>
>
> -----Original Message-----
> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
> Sent: Monday, December 07, 2009 7:04 PM
> To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
> generation problem
>
>
>
> Just add a querymap object to your mapfile, like so:
>
>
>
> QUERYMAP
>
> STATUS ON
>
> END
>
>
>
> Then change your URL to use the mode itemnquerymap and that should return
> just an image with the
>
> selected features highlighted in yellow.
>
>
>
> Steve
>
>
>
>>>> On 12/7/2009 at 5:56 PM, in message
> <01ce01ca7798$dd4b89d0$97e29d70$@net>,
>
> W.John Guineau wrote:
>
>> I'm new to mapserver, how do I quickly generate a querymap?
>
>>
>
>> I'm using mapserver 5.4.2 from the latest MS4W on Windows 7 x64. I've
also
>
>> tried 5.2.1 that I compiled myself.
>
>>
>
>> john
>
>>
>
>>
>
>> -----Original Message-----
>
>> From: Steve Lime [mailto:Steve.Lime at state.mn.us]
>
>> Sent: Monday, December 07, 2009 6:40 PM
>
>> To: 'W.John Guineau'; mapserver-users at lists.osgeo.org
>
>> Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
>
>> generation problem
>
>>
>
>> GDAL's not in play here at all. If you generate a query map instead of an
>
>> html image map does
>
>> the output map look ok? What version are you using?
>
>>
>
>> Steve
>
>>
>
>>>>> On 12/4/2009 at 8:11 AM, in message
>
>> <04e001ca74eb$bc473400$34d59c00$@net>,
>
>> W.John Guineau wrote:
>
>>> How would I go about debugging this?
>
>>>
>
>>>
>
>>>
>
>>> I think this is GDAL and its query of shapefiles, right?
>
>>>
>
>>>
>
>>>
>
>>> The bottom line is that MapServer finds all the items when it is
> rendering
>
>>> the map by layer/class EXPRESSION, but the qstring in a URL using the
>
>> exact
>
>>> same EXPRESSION string misses some of the items.
>
>>>
>
>>>
>
>>>
>
>>> I can also use ogrinfo from MAP4W to execute an SQL query directly on
the
>
>>> shapefile and the items in questions are certainly there.
>
>>>
>
>>>
>
>>>
>
>>> In the image below, the green areas are result of the mapfile layer
class
>
>>> EXPRESSION - all are correctly rendered. However, several of them do not
>
>> get
>
>>> generated (HTML imagemap tags not generated) when using a URL and
>
>>> itemnquery/qstring with the identical EXPRESSION.
>
>>>
>
>>>
>
>>>
>
>>> How do I enable debug (enabling mapfile DEBUG does not seem to give any
>
>>> useful info as to why GDAL is skipping certain items) Am I better off
>
>> using
>
>>> MAP4W or similar to get debug/trace info for shapefile queries?
>
>>>
>
>>>
>
>>>
>
>>> john
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>>
>
>>> From: mapserver-users-bounces at lists.osgeo.org
>
>>> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of W.John
>
>> Guineau
>
>>> Sent: Thursday, December 03, 2009 3:11 PM
>
>>> To: mapserver-users at lists.osgeo.org
>
>>> Subject: [mapserver-users] Shapefile, itemnquery and HTML image map
>
>>> generation problem
>
>>>
>
>>>
>
>>>
>
>>> I have a basic vector shapefile that I am trying to generate HTML
>
>> clickable
>
>>> maps from. It seems to work well for the most part, however there is a
>
>>> problem where some items from the shapefile do not get processed from
the
>
>>> qstring in the browser, but they are processed fine in the mapfile layer
>
>> (to
>
>>> color them differently).
>
>>>
>
>>>
>
>>>
>
>>> So the map that renders shows all the items colored properly as the
layer
>
>>> class defines. Using the exact same list of items in the HTTP query
> string
>
>>> causes several items to be ignored (the HTML image map area is not
>
>>> generated).
>
>>>
>
>>>
>
>>>
>
>>>
>
>>
>
http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map&qlayer=coe_m&
>
>
>>
>
>>>
>
>>
>
mode=itemnquery&searchmap=true&layer=states&mapext=-91+34+-89+49&mapsize=600
>
>>>
>
>>
>
+400&qitem=MLRARSYM&qstring=("[MLRARSYM]"%20in%20"102A,102B,102C,103,104,105
>
>>>
>
>>
>
,106,107A,107B,108A,108B,108C,108D,109,110,111A,111B,111C,111D,111E,112,113,
>
>>> 114A,114B,115A,115B,115C")
>
>>>
>
>>>
>
>>>
>
>>> Below is the layer section from the mapfile. I can post whatever else is
>
>>> helpful.
>
>>>
>
>>>
>
>>>
>
>>> Thanks for any help on this.
>
>>>
>
>>>
>
>>>
>
>>> john
>
>>>
>
>>>
>
>>>
>
>>> LAYER
>
>>>
>
>>> NAME map_m
>
>>>
>
>>> DATA "map_shape"
>
>>>
>
>>> TEMPLATE "bodytemplate.html"
>
>>>
>
>>> HEADER "imapheader.html"
>
>>>
>
>>> FOOTER "imapfooter.html"
>
>>>
>
>>> PROJECTION
>
>>>
>
>>> "proj=latlong"
>
>>>
>
>>> "ellps=GRS80"
>
>>>
>
>>> "init=epsg:4326"
>
>>>
>
>>> END
>
>>>
>
>>> TYPE polygon
>
>>>
>
>>> STATUS ON
>
>>>
>
>>> TRANSPARENCY 70
>
>>>
>
>>> CLASS
>
>>>
>
>>> NAME "MLRA"
>
>>>
>
>>> COLOR 0 200 0
>
>>>
>
>>> OUTLINECOLOR 0 0 0
>
>>>
>
>>> EXPRESSION( "[MLRARSYM]" in
>
>>>
>
>>
>
"102A,102B,102C,103,104,105,106,107A,107B,108A,108B,108C,108D,109,110,111A,1
>
>>> 11B,111C,111D,111E,112,113,114A,114B,115A,115B,115C" )
>
>>>
>
>>> END
>
>>>
>
>>> METADATA
>
>>>
>
>>> qstring_validation_pattern ".*"
>
>>>
>
>>> END
>
>>>
>
>>> END
>
>>
>
>> _______________________________________________
>
>> mapserver-users mailing list
>
>> mapserver-users at lists.osgeo.org
>
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
From Steve.Toutant at inspq.qc.ca Tue Dec 8 06:36:27 2009
From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca)
Date: Tue, 8 Dec 2009 09:36:27 -0500
Subject: [mapserver-users] Layer based on a view renders faster than
if based on a table
In-Reply-To: <4B1987A9.3060405@mapgears.com>
Message-ID:
Daniel,
I already set this in the mapfile
DEBUG 5
CONFIG MS_ERRORFILE "/ms4w/logs/mapserver.log"
I don't get the SQL query in the log though.
[Tue Dec 08 09:33:56 2009].961000 msDrawMap(): Layer 17 (RSSincidCumul),
0.390s
[Tue Dec 08 09:33:56 2009].992000 msDrawMap(): Drawing Label Cache, 0.031s
[Tue Dec 08 09:33:56 2009].992000 msDrawMap() total time: 0.421s
[Tue Dec 08 09:33:57 2009].8000 msSaveImage() total time: 0.016s
[Tue Dec 08 09:33:57 2009].24000 mapserv request processing time
(msLoadMap not incl.): 0.453s
[Tue Dec 08 09:33:57 2009].24000 msFreeMap(): freeing map at 01516C50.
Steve Toutant, M. Sc.
Analyste en g?omatique
Secteur environnement
Direction de la sant? environnementale et de la toxicologie
Institut national de sant? publique du Qu?bec
945, avenue Wolfe
Qu?bec, Qc G1V 5B3
T?l.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant at inspq.qc.ca
http://www.inspq.qc.ca
Daniel Morissette @lists.osgeo.org
Envoy? par : mapserver-users-bounces at lists.osgeo.org
04/12/2009 05:05 PM
A
mapserver-users at lists.osgeo.org
cc
Objet
Re: [mapserver-users] Layer based on a view renders faster than if based
on a table
Steve.Toutant at inspq.qc.ca wrote:
>
> I thought that a layer definition based on a table would be much faster
> than on a view.
> What should be the expected behavior please?
>
> Please tell me is this should be asked to postgis forum.
>
I'd suggest you capture the exact SQL query that is run in each case
(using DEBUG/MS_ERRORFILE) and check that the difference in time indeed
comes form the PostGIS queries.
If that's the case then you could submit a question to the postgis list
based on that, taking MapServer out of the equation.
If on the other hand the queries take about the same time and the time
difference is in MapServer's code (which I doubt) then we'd need more
details (ideally a testcase) to be able to reproduce and troubleshoot
the issue.
Daniel
--
Daniel Morissette
http://www.mapgears.com/
_______________________________________________
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:
From aboudreault at mapgears.com Tue Dec 8 06:39:45 2009
From: aboudreault at mapgears.com (Alan Boudreault)
Date: Tue, 8 Dec 2009 09:39:45 -0500
Subject: [mapserver-users] Layer based on a view renders faster than
=?iso-8859-15?q?if=09based_on_a?= table
In-Reply-To:
References:
Message-ID: <200912080939.46141.aboudreault@mapgears.com>
Steve, Have you put the "DEBUG 5" directive at the layer level too ?
Alan
On December 8, 2009 09:36:27 am Steve.Toutant at inspq.qc.ca wrote:
> Daniel,
> I already set this in the mapfile
> DEBUG 5
> CONFIG MS_ERRORFILE "/ms4w/logs/mapserver.log"
>
> I don't get the SQL query in the log though.
>
> [Tue Dec 08 09:33:56 2009].961000 msDrawMap(): Layer 17 (RSSincidCumul),
> 0.390s
> [Tue Dec 08 09:33:56 2009].992000 msDrawMap(): Drawing Label Cache, 0.031s
> [Tue Dec 08 09:33:56 2009].992000 msDrawMap() total time: 0.421s
> [Tue Dec 08 09:33:57 2009].8000 msSaveImage() total time: 0.016s
> [Tue Dec 08 09:33:57 2009].24000 mapserv request processing time
> (msLoadMap not incl.): 0.453s
> [Tue Dec 08 09:33:57 2009].24000 msFreeMap(): freeing map at 01516C50.
>
> Steve Toutant, M. Sc.
> Analyste en g?omatique
> Secteur environnement
> Direction de la sant? environnementale et de la toxicologie
> Institut national de sant? publique du Qu?bec
> 945, avenue Wolfe
> Qu?bec, Qc G1V 5B3
> T?l.: (418) 650-5115 #5281
> Fax.: (418) 654-3144
> steve.toutant at inspq.qc.ca
> http://www.inspq.qc.ca
>
>
>
>
>
> Daniel Morissette @lists.osgeo.org
> Envoy? par : mapserver-users-bounces at lists.osgeo.org
> 04/12/2009 05:05 PM
>
> A
> mapserver-users at lists.osgeo.org
> cc
>
> Objet
> Re: [mapserver-users] Layer based on a view renders faster than if based
> on a table
>
> Steve.Toutant at inspq.qc.ca wrote:
> > I thought that a layer definition based on a table would be much faster
> > than on a view.
> > What should be the expected behavior please?
> >
> > Please tell me is this should be asked to postgis forum.
>
> I'd suggest you capture the exact SQL query that is run in each case
> (using DEBUG/MS_ERRORFILE) and check that the difference in time indeed
> comes form the PostGIS queries.
>
> If that's the case then you could submit a question to the postgis list
> based on that, taking MapServer out of the equation.
>
> If on the other hand the queries take about the same time and the time
> difference is in MapServer's code (which I doubt) then we'd need more
> details (ideally a testcase) to be able to reproduce and troubleshoot
> the issue.
>
> Daniel
>
--
Alan Boudreault
Mapgears
http://www.mapgears.com
From Steve.Lime at state.mn.us Tue Dec 8 06:39:49 2009
From: Steve.Lime at state.mn.us (Steve Lime)
Date: Tue, 08 Dec 2009 08:39:49 -0600
Subject: [mapserver-users] Leading zeros removed from variabel
whenpassed to map file
Message-ID: <4B1E10D60200008F0002BBC3@co5.dnr.state.mn.us>
Thanks for posting your solution, might help another user. As I understand it you're
quoting the variable on the way into MapServer, right? A simpler solution might be
to just adjust your filter by placing quotes around replacement string, like so:
FILTER "placeref = '%ref_no%'"
That way PostGIS will interpret it as a string.
Steve
>>> GGould 12/08/09 5:15 AM >>>
Hi
Solved the problem by adding quote marks at the beginning and end of each
ref_no so that the variable is seem by the map file as a string rather than
an integer.
Graeme
GGould wrote:
>
> Hi
>
> Im just starting out with MapServer and have a bit of a stumbling block.
> The following script should identify a property based on the "ref_no"
> string variable passed to the map file.
>
> DATA "geometry from snh_properties"
> FILTER "placeref = %ref_no%"
>
> This works for all ref_no's beginning with a whole number, however if the
> re_no begins with a zero then it does not work. Has anyone come across
> this before and is there a solution that hopefully wont tax my brain too
> much.
>
> Cheers
>
> Graeme
>
>
>
>
--
View this message in context: http://n2.nabble.com/Leading-zeros-removed-from-variabel-when-passed-to-map-file-tp4125557p4131812.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
From Steve.Toutant at inspq.qc.ca Tue Dec 8 06:59:07 2009
From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca)
Date: Tue, 8 Dec 2009 09:59:07 -0500
Subject: [mapserver-users] Layer based on a view renders faster than
if based on a table
In-Reply-To: <200912080939.46141.aboudreault@mapgears.com>
Message-ID:
Thanks Alan, I didn't know that.
Steve
Steve Toutant, M. Sc.
Analyste en g?omatique
Secteur environnement
Direction de la sant? environnementale et de la toxicologie
Institut national de sant? publique du Qu?bec
945, avenue Wolfe
Qu?bec, Qc G1V 5B3
T?l.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant at inspq.qc.ca
http://www.inspq.qc.ca
Alan Boudreault @lists.osgeo.org
Envoy? par : mapserver-users-bounces at lists.osgeo.org
08/12/2009 09:39 AM
A
mapserver-users at lists.osgeo.org
cc
Steve.Toutant at inspq.qc.ca, Daniel Morissette ,
mapserver-users-bounces at lists.osgeo.org
Objet
Re: [mapserver-users] Layer based on a view renders faster than if
based on a table
Steve, Have you put the "DEBUG 5" directive at the layer level too ?
Alan
On December 8, 2009 09:36:27 am Steve.Toutant at inspq.qc.ca wrote:
> Daniel,
> I already set this in the mapfile
> DEBUG 5
> CONFIG MS_ERRORFILE "/ms4w/logs/mapserver.log"
>
> I don't get the SQL query in the log though.
>
> [Tue Dec 08 09:33:56 2009].961000 msDrawMap(): Layer 17 (RSSincidCumul),
> 0.390s
> [Tue Dec 08 09:33:56 2009].992000 msDrawMap(): Drawing Label Cache,
0.031s
> [Tue Dec 08 09:33:56 2009].992000 msDrawMap() total time: 0.421s
> [Tue Dec 08 09:33:57 2009].8000 msSaveImage() total time: 0.016s
> [Tue Dec 08 09:33:57 2009].24000 mapserv request processing time
> (msLoadMap not incl.): 0.453s
> [Tue Dec 08 09:33:57 2009].24000 msFreeMap(): freeing map at 01516C50.
>
> Steve Toutant, M. Sc.
> Analyste en g?omatique
> Secteur environnement
> Direction de la sant? environnementale et de la toxicologie
> Institut national de sant? publique du Qu?bec
> 945, avenue Wolfe
> Qu?bec, Qc G1V 5B3
> T?l.: (418) 650-5115 #5281
> Fax.: (418) 654-3144
> steve.toutant at inspq.qc.ca
> http://www.inspq.qc.ca
>
>
>
>
>
> Daniel Morissette @lists.osgeo.org
> Envoy? par : mapserver-users-bounces at lists.osgeo.org
> 04/12/2009 05:05 PM
>
> A
> mapserver-users at lists.osgeo.org
> cc
>
> Objet
> Re: [mapserver-users] Layer based on a view renders faster than if based
> on a table
>
> Steve.Toutant at inspq.qc.ca wrote:
> > I thought that a layer definition based on a table would be much
faster
> > than on a view.
> > What should be the expected behavior please?
> >
> > Please tell me is this should be asked to postgis forum.
>
> I'd suggest you capture the exact SQL query that is run in each case
> (using DEBUG/MS_ERRORFILE) and check that the difference in time indeed
> comes form the PostGIS queries.
>
> If that's the case then you could submit a question to the postgis list
> based on that, taking MapServer out of the equation.
>
> If on the other hand the queries take about the same time and the time
> difference is in MapServer's code (which I doubt) then we'd need more
> details (ideally a testcase) to be able to reproduce and troubleshoot
> the issue.
>
> Daniel
>
--
Alan Boudreault
Mapgears
http://www.mapgears.com
_______________________________________________
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:
From guineau at earthlink.net Tue Dec 8 07:17:13 2009
From: guineau at earthlink.net (guineau at earthlink.net)
Date: Tue, 08 Dec 2009 15:17:13 +0000
Subject: [mapserver-users] Shapefile,
itemnquery and HTML image map generation problem
Message-ID:
Hi Steve. The missing data is not always clustered. It just happens on that map.
I'll get you the map file and data tonight. I'm away from my pc now.
----------
Sent from my Verizon Wireless mobile phone
------Original Message------
From: Steve Lime
To: ,
Date: Tue, Dec 8, 8:26 AM -0600
Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map generation problem
Seems like an extent problem to me - the way the results are clustered in the
center of the image. MapServer does apply a spatial pre-filter for attribute
queries. However, the searchmap=true should compute a proper extent based
on your image properties (extent, size) before doing the query.
John, what are the changes you could zip up your data and mapfile for me?
Steve
>>> W.John Guineau 12/08/09 7:05 AM >>>
Ok, try this:
-----Original Message-----
From: Steve Lime [mailto:Steve.Lime at state.mn.us]
Sent: Monday, December 07, 2009 7:57 PM
To: W.John Guineau; mapserver-users at lists.osgeo.org; 'Steve Lime'
Subject: RE: [mapserver-users] Shapefile,itemnquery and HTML image map
generation problem
Do the ones not selected fall at the end of your qstring? I'm wondering if
something is getting truncated. I'd think
you'd get a parsing error in that case, but perhaps not. Can you label the
polygons with the value for MLRARSYM?
Steve
>>> On 12/7/2009 at 6:19 PM, in message
<01dc01ca779c$2c19eae0$844dc0a0$@net>,
W.John Guineau wrote:
> Hi Steve,
>
>
>
> OK, I added the QUERYMAP section and changed the URL:
>
>
>
> http://localhost/cgi-bin/mapserv?map=/NWPL_CRREL/MLRA/mlra.map
>