From listensammler at patzi.de Mon Aug 1 02:43:46 2011 From: listensammler at patzi.de (Fabian Patzke 2) Date: Mon, 1 Aug 2011 02:43:46 -0700 (PDT) Subject: [mapserver-users] Re: Get Map Request with SLD Parameter and local SLD file not via http In-Reply-To: <1311855997401-6629653.post@n2.nabble.com> References: <1311855997401-6629653.post@n2.nabble.com> Message-ID: <1312191826859-6640364.post@n2.nabble.com> Hello again, I tried around with different configurations IMAGEPATH set not set etc. but couldn't make mapserver using a local sld file with file path to it. Is this not possible at all? Maybe someone can share her/his experience with this. Greetings -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Get-Map-Request-with-SLD-Parameter-and-local-SLD-file-not-via-http-tp6629653p6640364.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jmckenna at gatewaygeomatics.com Mon Aug 1 08:15:39 2011 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Mon, 01 Aug 2011 12:15:39 -0300 Subject: [mapserver-users] Re: Get Map Request with SLD Parameter and local SLD file not via http In-Reply-To: <1312191826859-6640364.post@n2.nabble.com> References: <1311855997401-6629653.post@n2.nabble.com> <1312191826859-6640364.post@n2.nabble.com> Message-ID: <4E36C31B.8060702@gatewaygeomatics.com> On 11-08-01 6:43 AM, Fabian Patzke 2 wrote: > Hello again, > I tried around with different configurations IMAGEPATH set not set etc. but > couldn't make mapserver using a local sld file with file path to it. Is this > not possible at all? Maybe someone can share her/his experience with this. > Hello, I believe you will have to paste the contents of your local SLD file into the "wms_sld_body" parameter (see http://www.mapserver.org/ogc/sld.html#client-side-support) -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From jk.chen at sdl.usu.edu Mon Aug 1 10:57:52 2011 From: jk.chen at sdl.usu.edu (jk) Date: Mon, 1 Aug 2011 10:57:52 -0700 (PDT) Subject: [mapserver-users] what is the map scale value for an image with 5m pixel Message-ID: <1312221472508-6641936.post@n2.nabble.com> Hi, I have a layer of images each is made of pixel size 5 meter. I'm wondering what is the minscale/maxscale value I should put in to map server map file? Also, I have a orginfo output that say this pixel size value of Pixel Size = (0.019400225288651,-0.019400225288651) , what is the scale value for this map? Please pardon me for the almost-silly questions. JK -------------------------- Driver: GTiff/GeoTIFF Files: overview32.tif Size is 16000, 3552 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]] Origin = (-242.967352309208710,90.009700112644310) Pixel Size = (0.019400225288651,-0.019400225288651) Metadata: TIFFTAG_XRESOLUTION=72 TIFFTAG_YRESOLUTION=72 TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=PIXEL Corner Coordinates: Upper Left ( -242.967, 90.010) (242d58'2.47"W, 90d 0'34.92"N) Lower Left ( -242.967, 21.100) (242d58'2.47"W, 21d 6'0.36"N) Upper Right ( 67.4362523, 90.0097001) ( 67d26'10.51"E, 90d 0'34.92"N) Lower Right ( 67.4362523, 21.1000999) ( 67d26'10.51"E, 21d 6'0.36"N) Center ( -87.7655500, 55.5549000) ( 87d45'55.98"W, 55d33'17.64"N) Band 1 Block=16000x1 Type=Byte, ColorInterp=Red Band 2 Block=16000x1 Type=Byte, ColorInterp=Green Band 3 Block=16000x1 Type=Byte, ColorInterp=Blue -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/what-is-the-map-scale-value-for-an-image-with-5m-pixel-tp6641936p6641936.html Sent from the Mapserver - User mailing list archive at Nabble.com. From msubedee at yahoo.com Mon Aug 1 12:11:13 2011 From: msubedee at yahoo.com (Mukesh Subedee) Date: Mon, 1 Aug 2011 12:11:13 -0700 (PDT) Subject: [mapserver-users] building FastCGI on MapServer 6.0 Message-ID: <1312225873.35433.YahooMailNeo@web37401.mail.mud.yahoo.com> Hi all, I am again posting my problem as I am still stuck in the same place. I am trying to install/configure FastCGI on MapServer 6.0 in Ubuntu 10.04 machines. I installed both fcgi-2.4.0 and mod_fastcgi-2.4.6 as mentioned in http://mapserver.org/optimization/fastcgi.html#obtaining-the-necessary-software. I configured MapServer --with-fastcgi=/usr option and could see "FastCGI support: -DUSE_FASTCGI" in Support Libraries. I did make and check ./mapserv -v but could not find SUPPORTS=FASTCGI there. I am wondering if I did anything wrong as I just followed the link and I did not get any errors while compiling any of those softwares/packages. Thanks! Mukesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From warmerdam at pobox.com Mon Aug 1 12:41:42 2011 From: warmerdam at pobox.com (Frank Warmerdam) Date: Mon, 1 Aug 2011 12:41:42 -0700 Subject: [mapserver-users] building FastCGI on MapServer 6.0 In-Reply-To: <1312225873.35433.YahooMailNeo@web37401.mail.mud.yahoo.com> References: <1312225873.35433.YahooMailNeo@web37401.mail.mud.yahoo.com> Message-ID: Mukesh, Reviewing maperror.c, it should issue SUPPORTS=FASTCGI if -DUSE_FASTCGI was defined at compile time. So I suppose you either didn't do a clean build (and some stuff didn't get recompiled) or you aren't running the executable you built. Best regards, On Mon, Aug 1, 2011 at 12:11 PM, Mukesh Subedee wrote: > Hi all, > I am again posting my problem as I am still stuck in the same place. > I am trying to install/configure FastCGI on MapServer 6.0 in Ubuntu 10.04 > machines. I installed both fcgi-2.4.0 and mod_fastcgi-2.4.6 as mentioned in > http://mapserver.org/optimization/fastcgi.html#obtaining-the-necessary-software. > I configured MapServer --with-fastcgi=/usr option and could see "FastCGI > support: -DUSE_FASTCGI" in Support Libraries. I did make and check ./mapserv > -v but could not find SUPPORTS=FASTCGI there. I am wondering if I did > anything wrong as I just followed the link and I did not get any errors > while compiling any of those softwares/packages. > > Thanks! > Mukesh > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- ---------------------------------------+-------------------------------------- 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 Software Developer From msubedee at yahoo.com Mon Aug 1 13:32:22 2011 From: msubedee at yahoo.com (Mukesh Subedee) Date: Mon, 1 Aug 2011 13:32:22 -0700 (PDT) Subject: [mapserver-users] building FastCGI on MapServer 6.0 In-Reply-To: References: <1312225873.35433.YahooMailNeo@web37401.mail.mud.yahoo.com> Message-ID: <1312230742.22442.YahooMailNeo@web37405.mail.mud.yahoo.com> Thanks a lot Frank. I had to do make clean and it worked. :) ________________________________ From: Frank Warmerdam To: Mukesh Subedee Cc: "mapserver-users at lists.osgeo.org" Sent: Monday, August 1, 2011 12:41 PM Subject: Re: [mapserver-users] building FastCGI on MapServer 6.0 Mukesh, Reviewing maperror.c, it should issue SUPPORTS=FASTCGI if -DUSE_FASTCGI was defined at compile time.? So I suppose you either didn't do a clean build (and some stuff didn't get recompiled) or you aren't running the executable you built. Best regards, On Mon, Aug 1, 2011 at 12:11 PM, Mukesh Subedee wrote: > Hi all, > I am again posting my problem as I am still stuck in the same place. > I am trying to install/configure FastCGI on MapServer 6.0 in Ubuntu 10.04 > machines. I installed both fcgi-2.4.0 and mod_fastcgi-2.4.6 as mentioned in > http://mapserver.org/optimization/fastcgi.html#obtaining-the-necessary-software. > I configured MapServer --with-fastcgi=/usr option and could see "FastCGI > support: -DUSE_FASTCGI" in Support Libraries. I did make and check ./mapserv > -v but could not find SUPPORTS=FASTCGI there. I am wondering if I did > anything wrong as I just followed the link and I did not get any errors > while compiling any of those softwares/packages. > > Thanks! > Mukesh > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- ---------------------------------------+-------------------------------------- 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 Software Developer -------------- next part -------------- An HTML attachment was scrubbed... URL: From msubedee at yahoo.com Mon Aug 1 14:53:13 2011 From: msubedee at yahoo.com (Mukesh Subedee) Date: Mon, 1 Aug 2011 14:53:13 -0700 (PDT) Subject: [mapserver-users] building FastCGI on MapServer 6.0 In-Reply-To: References: <1312225873.35433.YahooMailNeo@web37401.mail.mud.yahoo.com> Message-ID: <1312235593.74474.YahooMailNeo@web37405.mail.mud.yahoo.com> Frank, In the meantime, while configuring FastCGI as mentioned in http://mapserver.org/optimization/fastcgi.html#configuration , I added LoadModule and AddHandler as mentioned in the link in httpd.conf file. However, I am not sure where should I add the content in the step 3 (Set FastCGI processing information). Do you have any idea of that? Thanks! ________________________________ From: Frank Warmerdam To: Mukesh Subedee Cc: "mapserver-users at lists.osgeo.org" Sent: Monday, August 1, 2011 12:41 PM Subject: Re: [mapserver-users] building FastCGI on MapServer 6.0 Mukesh, Reviewing maperror.c, it should issue SUPPORTS=FASTCGI if -DUSE_FASTCGI was defined at compile time.? So I suppose you either didn't do a clean build (and some stuff didn't get recompiled) or you aren't running the executable you built. Best regards, On Mon, Aug 1, 2011 at 12:11 PM, Mukesh Subedee wrote: > Hi all, > I am again posting my problem as I am still stuck in the same place. > I am trying to install/configure FastCGI on MapServer 6.0 in Ubuntu 10.04 > machines. I installed both fcgi-2.4.0 and mod_fastcgi-2.4.6 as mentioned in > http://mapserver.org/optimization/fastcgi.html#obtaining-the-necessary-software. > I configured MapServer --with-fastcgi=/usr option and could see "FastCGI > support: -DUSE_FASTCGI" in Support Libraries. I did make and check ./mapserv > -v but could not find SUPPORTS=FASTCGI there. I am wondering if I did > anything wrong as I just followed the link and I did not get any errors > while compiling any of those softwares/packages. > > Thanks! > Mukesh > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- ---------------------------------------+-------------------------------------- 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 Software Developer -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Hirst at bom.gov.au Mon Aug 1 18:32:02 2011 From: K.Hirst at bom.gov.au (Kathleen Hirst) Date: Tue, 2 Aug 2011 11:32:02 +1000 Subject: [mapserver-users] Pseudo Mercator/Google Projection wrapping around the world [SEC=UNCLASSIFIED] Message-ID: Dear List, We are providing a WMS feed of polyline data that extends to 185 degrees. The data's projection is EPSG:4283. One of the supported projections is EPSG:3857. When clients use this projection (or EPSG:900915), the lines wrap around the world (across the correct lines), making the WMS unusable. One workaround is to clip the data at 180, but we would prefer not to do this. Is there any way to configure MapServer to prevent this problem? Thanks Kathleen -------------- next part -------------- An HTML attachment was scrubbed... URL: From listensammler at patzi.de Mon Aug 1 23:48:30 2011 From: listensammler at patzi.de (Fabian Patzke 2) Date: Mon, 1 Aug 2011 23:48:30 -0700 (PDT) Subject: [mapserver-users] Re: Get Map Request with SLD Parameter and local SLD file not via http In-Reply-To: <4E36C31B.8060702@gatewaygeomatics.com> References: <1311855997401-6629653.post@n2.nabble.com> <1312191826859-6640364.post@n2.nabble.com> <4E36C31B.8060702@gatewaygeomatics.com> Message-ID: <1312267710509-6643840.post@n2.nabble.com> Hi, thanks for that. Jeff McKenna wrote: > > I believe you will have to paste the contents of your local SLD file > into the "wms_sld_body" parameter (see > http://www.mapserver.org/ogc/sld.html#client-side-support) > I tried that one, but it doesn't seem to do what I want. Isn't that parameter just for mapserver as a WMS client? I thought that parameter appends the sld to the request mapserver makes to another to i.e. a cascaded WMS. Greetings, Fabian -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Get-Map-Request-with-SLD-Parameter-and-local-SLD-file-not-via-http-tp6629653p6643840.html Sent from the Mapserver - User mailing list archive at Nabble.com. From forums at craniumjuice.com Tue Aug 2 07:20:39 2011 From: forums at craniumjuice.com (forums) Date: Tue, 2 Aug 2011 09:20:39 -0500 Subject: [mapserver-users] Possible tile_map_edge_buffer issue In-Reply-To: <4e3170a3.8760340a.5005.63b5SMTPIN_ADDED@mx.google.com> References: <4e3170a3.8760340a.5005.63b5SMTPIN_ADDED@mx.google.com> Message-ID: bump Has anyone else encountered this issue? Thanks On Thu, Jul 28, 2011 at 9:18 AM, Charlie Allgrove wrote: > Hi > > > > I have an issue when using tile_map_edge_buffer functionality with mode=tile > on a Google map view which displays the whole world at zoom 0,1 or 2. It > probably manifests itself at higher zoom levels, but will be less obvious > (if at all) since I'm only rendering data over land. > > > > In my map file I have (amongst others) > WEB > > ??? METADATA > > ?? ?????"tile_map_edge_buffer" "32" # 32 pixel rendering buffer > > ??????? "http_max_age" "86400" > > ??? END > > ? END > > > > My development code is not on a publicly available server at the moment, so > I can't post a link but when I am looking at a Google map at zoom levels 0,1 > or 2, the tiles consistently cut off approx half-way across the USA (see > attached screenshot). > > It seems that {tile=0 1 2} does not render with the buffering enabled, since > the buffered area extends effectively to a negative tile reference {-1 1 2} > which is illegal. > > > > Is there any way around this - is it possible only to enable the buffer for > zooms >=3? > > > > Cheers > > > > Charlie > > > > -- > > Charlie Allgrove > > Senior Developer > > > > Connection Services :: Business Mobility for a Wireless World > > > > Connection Services Ltd is a company incorporated under the laws of England > and Wales with company number 6520674 whose registered office is at Griffins > Court, 24-32 London Road, Newbury, Berkshire, RG14 1JX. The information in > this e-mail and any attachments is confidential and may be legally > privileged. It is intended solely for the addressee or addressees. If you > are not an intended recipient, please delete the message and any attachments > and notify the sender of misdelivery: any use or disclosure of the contents > of either is unauthorised and may be unlawful. All liability for viruses is > excluded to the fullest extent permitted by law. Any views expressed in this > message are those of the individual sender. In accordance with the > provisions of its Terms of Business the Company does not accept instructions > or the creation of contractual obligations by unconfirmed electronic > transmission. > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- A computer without Windows is like chocolate cake without mustard. From gaston.lucero at sitrack.com Tue Aug 2 12:29:54 2011 From: gaston.lucero at sitrack.com (=?ISO-8859-1?Q?Gast=F3n_Lucero?=) Date: Tue, 02 Aug 2011 16:29:54 -0300 Subject: [mapserver-users] Java Mapscript problem Message-ID: <4E385032.3090306@sitrack.com> Hi, i have this exception in my java class Exception in thread "main" java.lang.UnknownError: loadLabel(): Unknown identifier. Parsing error near (STYLE):(line 871) at edu.umn.gis.mapscript.mapscriptJNI.new_mapObj(Native Method) at edu.umn.gis.mapscript.mapObj.(mapObj.java:285) at MapServerCore$MapServer.createMap(MapServerCore.java:77) at MapServerCore.(MapServerCore.java:35) at MapServerCore.main(MapServerCore.java:16) This is the label of the layer that throw error ... LABEL FONT arial-bold TYPE truetype SIZE 8 COLOR "#ffffff" OUTLINECOLOR 82 146 57 STYLE GEOMTRANSFORM labelpoly COLOR 82 146 57 OFFSET 1 1 END STYLE GEOMTRANSFORM labelpoly COLOR 99 178 66 END OUTLINEWIDTH 1 MINDISTANCE 200 POSITION auto PARTIALS false BUFFER 10 END ... My environment MapServer 6.0.0 jdk 1.6.0_24 Any solution ? Thanks Disclaimer: This email and any attachments thereof may contain confidential, privileged, proprietary, or otherwise private information. This email is intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient of the email and its attachments please inform the sender immediately and do not disclose the contents to any other person, use it for any purpose or store or copy the information in any way and delete this e-mail and its attachments from your system. Any views or opinions expressed are solely those of the author. From gislars+list at googlemail.com Tue Aug 2 12:45:35 2011 From: gislars+list at googlemail.com (Lars Lingner) Date: Tue, 02 Aug 2011 21:45:35 +0200 Subject: [mapserver-users] how does mapserver determine shapefile encoding? Message-ID: <4E3853DF.10905@googlemail.com> Hello, I have a shapefile from which I don't really know the encoding. It might be latin1 or ISO-8559-5. The good thing is, when MapServer is accessing the shapefile, the labels are shown correct. QGis is also displaying everything fine. But when I try to convert with shp2pgsql or ogr I get only garbage back. I tried different source encodings. Since I need the data to be in the database I'm now trying to find out where the problem is. I tried converting the data on different systems (Ubuntu, RedHat), with postgis/shp2pgsql from repository as well as self compiled. Same results. Also iconv and recode wasn't a help. As I said QGis is displaying everything fine it fails in converting the shapefile too. Opening the dbf in LibreOffice doesn't helped either. Finally my (odd) questions are: Why does MapServer do everything right? How is the encoding determined? Can I see somewhere which encoding is used by MapServer? Thanks in advance for any pointers. Lars From boolean10001 at yahoo.com Tue Aug 2 13:01:13 2011 From: boolean10001 at yahoo.com (Carlos Ruiz) Date: Tue, 2 Aug 2011 13:01:13 -0700 (PDT) Subject: [mapserver-users] how does mapserver determine shapefile encoding? In-Reply-To: <4E3853DF.10905@googlemail.com> References: <4E3853DF.10905@googlemail.com> Message-ID: <1312315273.61343.YahooMailNeo@web38201.mail.mud.yahoo.com> Lars, When you try to load some data to a PostgreSQL server, you can specify the encoding to use. This can be done with client_encoding. For example, if you want to populate a table with some CSV file contents, you have to do the following: SET client_encoding = 'LATIN1'; COPY my_table FROM '/usr/file.csv' WITH CSV Now, when you use shp2pgsql you can't set the client encoding, but you can set the default client_encoding of your database and every data transfer between some client and your database will be encoded properly: ALTER DATABASE my_database SET client_encoding = 'LATIN1' Hope this helps Cheers from Guadalajara, M?xico IC Carlos Ruiz ________________________________ From: Lars Lingner To: "'mapserver-users at lists.osgeo.org'" Sent: Tuesday, August 2, 2011 2:45 PM Subject: [mapserver-users] how does mapserver determine shapefile encoding? Hello, I have a shapefile from which I don't really know the encoding. It might be latin1 or ISO-8559-5. The good thing is, when MapServer is accessing the shapefile, the labels are shown correct. QGis is also displaying everything fine. But when I try to convert with shp2pgsql or ogr I get only garbage back. I tried different source encodings. Since I need the data to be in the database I'm now trying to find out where the problem is. I tried converting the data on different systems (Ubuntu, RedHat), with postgis/shp2pgsql from repository as well as self compiled. Same results. Also iconv and recode wasn't a help. As I said QGis is displaying everything fine it fails in converting the shapefile too. Opening the dbf in LibreOffice doesn't helped either. Finally my (odd) questions are: Why does MapServer do everything right? How is the encoding determined? Can I see somewhere which encoding is used by MapServer? Thanks in advance for any pointers. Lars _______________________________________________ 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 boolean10001 at yahoo.com Tue Aug 2 13:06:28 2011 From: boolean10001 at yahoo.com (Carlos Ruiz) Date: Tue, 2 Aug 2011 13:06:28 -0700 (PDT) Subject: [mapserver-users] how does mapserver determine shapefile encoding? In-Reply-To: <4E3853DF.10905@googlemail.com> References: <4E3853DF.10905@googlemail.com> Message-ID: <1312315588.48236.YahooMailNeo@web38205.mail.mud.yahoo.com> Lars, Looking at the shp2pgsql documentation, it is possible to specify the shape attributes encoding with the -W parameter. ? IC Carlos Ruiz ________________________________ From: Lars Lingner To: "'mapserver-users at lists.osgeo.org'" Sent: Tuesday, August 2, 2011 2:45 PM Subject: [mapserver-users] how does mapserver determine shapefile encoding? Hello, I have a shapefile from which I don't really know the encoding. It might be latin1 or ISO-8559-5. The good thing is, when MapServer is accessing the shapefile, the labels are shown correct. QGis is also displaying everything fine. But when I try to convert with shp2pgsql or ogr I get only garbage back. I tried different source encodings. Since I need the data to be in the database I'm now trying to find out where the problem is. I tried converting the data on different systems (Ubuntu, RedHat), with postgis/shp2pgsql from repository as well as self compiled. Same results. Also iconv and recode wasn't a help. As I said QGis is displaying everything fine it fails in converting the shapefile too. Opening the dbf in LibreOffice doesn't helped either. Finally my (odd) questions are: Why does MapServer do everything right? How is the encoding determined? Can I see somewhere which encoding is used by MapServer? Thanks in advance for any pointers. Lars _______________________________________________ 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 gislars+list at googlemail.com Tue Aug 2 13:34:54 2011 From: gislars+list at googlemail.com (Lars Lingner) Date: Tue, 02 Aug 2011 22:34:54 +0200 Subject: [mapserver-users] how does mapserver determine shapefile encoding? In-Reply-To: <1312315273.61343.YahooMailNeo@web38201.mail.mud.yahoo.com> References: <4E3853DF.10905@googlemail.com> <1312315273.61343.YahooMailNeo@web38201.mail.mud.yahoo.com> Message-ID: <4E385F6E.4000203@googlemail.com> Hello Carlos, I should have been be more precise. By using all the tools, shp2pgsql, iconv, recode I set the "source encoding" parameter. And I tried different encodings. My database is configured for utf8. But the problem arise before the data is send to the database. With shp2pgsql I generated an sql file, containing wrong character strings. With ogr2ogr I tried to convert to csv or json just for testing, but without success. Depending on the encoding I get garbage or the error message that the data couldn't be converted to utf8. Thank you for your answer. Lars Am 02.08.2011 22:01, schrieb Carlos Ruiz: > Lars, > > When you try to load some data to a PostgreSQL server, you can > specify the encoding to use. > > This can be done with client_encoding. For example, if you want to > populate a table with some CSV file contents, you have > > to do the following: > > > SET client_encoding = 'LATIN1'; COPY my_table FROM '/usr/file.csv' > WITH CSV > > > Now, when you use shp2pgsql you can't set the client encoding, but > you can set the default client_encoding of your > > database and every data transfer between some client and your > database will be encoded properly: > > ALTER DATABASE my_database SET client_encoding = 'LATIN1' > > > Hope this helps > > Cheers from Guadalajara, M?xico > > > IC Carlos Ruiz > > > > ________________________________ From: Lars Lingner > To: "'mapserver-users at lists.osgeo.org'" > Sent: Tuesday, August 2, 2011 2:45 > PM Subject: [mapserver-users] how does mapserver determine shapefile > encoding? > > Hello, > > I have a shapefile from which I don't really know the encoding. It > might be latin1 or ISO-8559-5. The good thing is, when MapServer is > accessing the shapefile, the labels are shown correct. QGis is also > displaying everything fine. > > But when I try to convert with shp2pgsql or ogr I get only garbage > back. I tried different source encodings. Since I need the data to be > in the database I'm now trying to find out where the problem is. > > I tried converting the data on different systems (Ubuntu, RedHat), > with postgis/shp2pgsql from repository as well as self compiled. > Same results. Also iconv and recode wasn't a help. > > As I said QGis is displaying everything fine it fails in converting > the shapefile too. Opening the dbf in LibreOffice doesn't helped > either. > > Finally my (odd) questions are: Why does MapServer do everything > right? How is the encoding determined? Can I see somewhere which > encoding is used by MapServer? > > Thanks in advance for any pointers. > > > Lars _______________________________________________ mapserver-users > mailing list mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From dmorissette at mapgears.com Tue Aug 2 13:59:51 2011 From: dmorissette at mapgears.com (Daniel Morissette) Date: Tue, 02 Aug 2011 16:59:51 -0400 Subject: [mapserver-users] how does mapserver determine shapefile encoding? In-Reply-To: <4E3853DF.10905@googlemail.com> References: <4E3853DF.10905@googlemail.com> Message-ID: <4E386547.4000904@mapgears.com> On 11-08-02 03:45 PM, Lars Lingner wrote: > > Finally my (odd) questions are: Why does MapServer do everything right? > How is the encoding determined? Can I see somewhere which encoding is > used by MapServer? > MapServer has no way to tell the encoding of a shapefile. However it can usually deal with data in either UTF-8 or in the native encoding of your TTF font without specifying any encoding in the LABEL. In those cases, it does not try to figure the encoding, it just lets the bytes go straight through without looking at them (and TrueType does the rest). -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From dmorissette at mapgears.com Tue Aug 2 14:01:18 2011 From: dmorissette at mapgears.com (Daniel Morissette) Date: Tue, 02 Aug 2011 17:01:18 -0400 Subject: [mapserver-users] how does mapserver determine shapefile encoding? In-Reply-To: <4E386547.4000904@mapgears.com> References: <4E3853DF.10905@googlemail.com> <4E386547.4000904@mapgears.com> Message-ID: <4E38659E.1010005@mapgears.com> On 11-08-02 04:59 PM, Daniel Morissette wrote: > On 11-08-02 03:45 PM, Lars Lingner wrote: >> >> Finally my (odd) questions are: Why does MapServer do everything right? >> How is the encoding determined? Can I see somewhere which encoding is >> used by MapServer? >> > > MapServer has no way to tell the encoding of a shapefile. However it can > usually deal with data in either UTF-8 or in the native encoding of your > TTF font without specifying any encoding in the LABEL. In those cases, > it does not try to figure the encoding, it just lets the bytes go > straight through without looking at them (and TrueType does the rest). > Err... I mean FreeType does the rest... -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From Bob.Basques at ci.stpaul.mn.us Tue Aug 2 14:35:37 2011 From: Bob.Basques at ci.stpaul.mn.us (Bob Basques) Date: Tue, 02 Aug 2011 16:35:37 -0500 Subject: [mapserver-users] MapServer as WMS client - HTTPS CERTIFICATE problem. Message-ID: <4E382759020000A80002CD20@heckle> All, Ok, got the debugging to spit out the actual request for a service, with the following CERT error :: [Tue Aug 2 16:21:59 2011].998742 CGI Request 1 on process 14407 [Tue Aug 2 16:22:00 2011].23599 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 60 (SSL certificate problem, ve rify that the CA cert is OK. Details: error:14090086:SSL routines:func(144):reason(134)) for https://xxx.xx.xxxxxx.xx/ArcGIS/services/StPaul/ParcelPolyWMSF/MapServer/WMSServer?LAYERS=0& REQUEST=GetMap&SERVICE=WMS&FORMAT=image/png24&STYLES=&HEIGHT=331&VERSION=1.1.1&SRS=EPSG:202011&WIDTH=943&BBOX=577250.000302263,157778.662078316,581708. 889731801,159343.765366945&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage [Tue Aug 2 16:22:00 2011].23974 msDrawWMSLayerLow(): WMS server error. WMS GetMap request failed for layer 'Parcel Polygons' (Status -60: SSL certific ate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:func(144):reason(134)). [Tue Aug 2 16:22:00 2011].23989 msDrawMap(): Layer 1 (Parcel Polygons), 0.000s [Tue Aug 2 16:22:00 2011].24013 msDrawMap(): Drawing Label Cache, 0.000s [Tue Aug 2 16:22:00 2011].24026 msDrawMap() total time: 0.025s [Tue Aug 2 16:22:00 2011].77595 msSaveImage() total time: 0.053s [Tue Aug 2 16:22:00 2011].77691 mapserv request processing time (loadmap not incl.): 0.079s [Tue Aug 2 16:22:00 2011].77701 msFreeMap(): freeing map at 0x7144b0. Question, can this be handled in the MAPFILE somehow? I did verify that the request works, once it's sent, by pasting into a Browser that already accepted the certificate. Thanks bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bob.Basques at ci.stpaul.mn.us Tue Aug 2 15:20:10 2011 From: Bob.Basques at ci.stpaul.mn.us (Bob Basques) Date: Tue, 02 Aug 2011 17:20:10 -0500 Subject: [mapserver-users] MapServer as WMS client - HTTPS CERTIFICATE problem. Message-ID: <4E3831CA020000A80002CD2F@heckle> All, I did some more research on this. Forwarding on my own posting from the user list here to ask a question, Couldn't the server certificate be added to the request process via a MAPFILE > METADATA field for inclusion in the requests, in lieu of adding it to the CURL cert request, or am I thinking about this backwards? thanks bobb -------- All, Ok, got the debugging to spit out the actual request for a service, with the following CERT error :: [Tue Aug 2 16:21:59 2011].998742 CGI Request 1 on process 14407 [Tue Aug 2 16:22:00 2011].23599 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 60 (SSL certificate problem, ve rify that the CA cert is OK. Details: error:14090086:SSL routines:func(144):reason(134)) for https://xxx.xx.xxxxxx.xx/ArcGIS/services/StPaul/ParcelPolyWMSF/MapServer/WMSServer?LAYERS=0& REQUEST=GetMap&SERVICE=WMS&FORMAT=image/png24&STYLES=&HEIGHT=331&VERSION=1.1.1&SRS=EPSG:202011&WIDTH=943&BBOX=577250.000302263,157778.662078316,581708. 889731801,159343.765366945&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage [Tue Aug 2 16:22:00 2011].23974 msDrawWMSLayerLow(): WMS server error. WMS GetMap request failed for layer 'Parcel Polygons' (Status -60: SSL certific ate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:func(144):reason(134)). [Tue Aug 2 16:22:00 2011].23989 msDrawMap(): Layer 1 (Parcel Polygons), 0.000s [Tue Aug 2 16:22:00 2011].24013 msDrawMap(): Drawing Label Cache, 0.000s [Tue Aug 2 16:22:00 2011].24026 msDrawMap() total time: 0.025s [Tue Aug 2 16:22:00 2011].77595 msSaveImage() total time: 0.053s [Tue Aug 2 16:22:00 2011].77691 mapserv request processing time (loadmap not incl.): 0.079s [Tue Aug 2 16:22:00 2011].77701 msFreeMap(): freeing map at 0x7144b0. Question, can this be handled in the MAPFILE somehow? I did verify that the request works, once it's sent, by pasting into a Browser that already accepted the certificate. Thanks bobb -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Tue Aug 2 21:55:05 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Wed, 3 Aug 2011 04:55:05 +0000 Subject: [mapserver-users] MapServer as WMS client - HTTPS CERTIFICATE problem. In-Reply-To: <4E3831CA020000A80002CD2F@heckle> References: <4E3831CA020000A80002CD2F@heckle> Message-ID: <84446DEF76453C439E9E97E438E13A63016373@suutari.haapa.mmm.fi> Hi, With Windows MS4W is setting the path to local certificate file with environment variable CURL_CA_BUNDLE and by default it is \ms4w\Apache\conf\ca-bundle\cacert.pem with the setenv.bat Perhaps you can tell where your modified certificate bundle file is with a mapfile too, but I have not tried it. I have just added new certificates into the default cacert.pem. I am not sure if it it possible to make Mapserver to pass on the --insecure parameter for curl to tell it trust anything without checking the certificate at all. Have you read already http://trac.osgeo.org/mapserver/ticket/3070? -Jukka Rahkonen- Bob Basques wrote: > All, > I did some more research on this. Forwarding on my own posting from the user list here to ask a question, > Couldn't the server certificate be added to the request process via a MAPFILE > METADATA field for inclusion in the requests, in lieu of adding it to the CURL cert request, or am I thinking > about this backwards? > thanks > bobb -------- All, Ok, got the debugging to spit out the actual request for a service, with the following CERT error :: [Tue Aug 2 16:21:59 2011].998742 CGI Request 1 on process 14407 [Tue Aug 2 16:22:00 2011].23599 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 60 (SSL certificate problem, ve rify that the CA cert is OK. Details: error:14090086:SSL routines:func(144):reason(134)) for https://xxx.xx.xxxxxx.xx/ArcGIS/services/StPaul/ParcelPolyWMSF/MapServer/WMSServer?LAYERS=0& REQUEST=GetMap&SERVICE=WMS&FORMAT=image/png24&STYLES=&HEIGHT=331&VERSION=1.1.1&SRS=EPSG:202011&WIDTH=943&BBOX=577250.000302263,157778.662078316,581708. 889731801,159343.765366945&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage [Tue Aug 2 16:22:00 2011].23974 msDrawWMSLayerLow(): WMS server error. WMS GetMap request failed for layer 'Parcel Polygons' (Status -60: SSL certific ate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:func(144):reason(134)). [Tue Aug 2 16:22:00 2011].23989 msDrawMap(): Layer 1 (Parcel Polygons), 0.000s [Tue Aug 2 16:22:00 2011].24013 msDrawMap(): Drawing Label Cache, 0.000s [Tue Aug 2 16:22:00 2011].24026 msDrawMap() total time: 0.025s [Tue Aug 2 16:22:00 2011].77595 msSaveImage() total time: 0.053s [Tue Aug 2 16:22:00 2011].77691 mapserv request processing time (loadmap not incl.): 0.079s [Tue Aug 2 16:22:00 2011].77701 msFreeMap(): freeing map at 0x7144b0. Question, can this be handled in the MAPFILE somehow? I did verify that the request works, once it's sent, by pasting into a Browser that already accepted the certificate. Thanks bobb From brfr at metrico.lu Wed Aug 3 04:46:12 2011 From: brfr at metrico.lu (Frank Broniewski) Date: Wed, 03 Aug 2011 13:46:12 +0200 Subject: [mapserver-users] MsJSON Mapfile to JSON converter Message-ID: <4E393504.8060901@metrico.lu> Hi all, I developed a Mapfile to JSON converter for a current project and I want to share the software with the community. The MsJSON converter uses mapscript and Python to do the conversion, so these are a requirement for the usage. MsJSON is released under LGPL license. I've tested the converter so far under Python 2.5 and 2.6 on Debian Squeeze and Ubuntu Hardy Heron with mapscript 5.6.5 (Debian) and mapscript 6.0.0 (Ubuntu (UbuntuGIS repo)). Unfortunately my OSGeo4W installation gives me an DLL error on loading mapscript, so I cannot test that for now. But I expect that there will be problems on other systems and mapscript versions, so please consider the software as beta until I can do more tests. But it *should* work at least a little bit on some systems ;-) Concerning tests, there's a test directory in the package, and if you've got nose installed you can test the software on your system before installing it. Simply run `nosetests` in the project directory. The package also comes with the html documentation. You can obtain the software from pypi[1] or from bitbucket[2] and there's also the documentation[3]! I hope you find this little piece of software useful like I have found Mapserver and the community around it very useful. At the moment the converter is not 100% feature complete as it lacks the conversion of some mapfile definitions. This is sometimes due to mapscript itself (e.g. map.outputformatlist) or because I have not added the concerned parameter to the converter yet. The bitbucket page has an issues section where I want to catch any issues I or someone else encounters. Any feedback is welcome :-) Frank [1] http://pypi.python.org/pypi/msjson/ [2] https://bitbucket.org/frankbroniewski/msjson/ [3] http://www.gis-hosting.lu/static/msjson/ -- Frank BRONIEWSKI METRICO s.? r.l. g?om?tres technologies d'information g?ographique rue des Romains 36 L-5433 NIEDERDONVEN t?l.: +352 26 74 94 - 28 fax.: +352 26 74 94 99 http://www.metrico.lu From jmckenna at gatewaygeomatics.com Wed Aug 3 06:45:50 2011 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Wed, 03 Aug 2011 10:45:50 -0300 Subject: [mapserver-users] MapServer as WMS client - HTTPS CERTIFICATE problem. In-Reply-To: <84446DEF76453C439E9E97E438E13A63016373@suutari.haapa.mmm.fi> References: <4E3831CA020000A80002CD2F@heckle> <84446DEF76453C439E9E97E438E13A63016373@suutari.haapa.mmm.fi> Message-ID: <4E39510E.4090806@gatewaygeomatics.com> Thanks for mentioning that Jukka. Yes in fact MS4W's Apache does point to that certificate file (http://www.maptools.org/ms4w/index.phtml?page=README_INSTALL.html#g-certificates-for-https-with-wms-wfs-servers). If someone is testing this, it would be great to get feedback on this for MS4W 3.0.3 on the MS4W mailing list. If you notice anything that needs changed please do report this there, or file a ticket in its bug tracker, whatever you feel is easier for you. Thanks. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 11-08-03 1:55 AM, Rahkonen Jukka wrote: > Hi, > > With Windows MS4W is setting the path to local certificate file with environment variable CURL_CA_BUNDLE and by default it is \ms4w\Apache\conf\ca-bundle\cacert.pem with the setenv.bat > Perhaps you can tell where your modified certificate bundle file is with a mapfile too, but I have not tried it. I have just added new certificates into the default cacert.pem. > I am not sure if it it possible to make Mapserver to pass on the --insecure parameter for curl to tell it trust anything without checking the certificate at all. > > Have you read already http://trac.osgeo.org/mapserver/ticket/3070? > > -Jukka Rahkonen- From lokendrra at gmail.com Thu Aug 4 03:23:57 2011 From: lokendrra at gmail.com (Lokendra Singh) Date: Thu, 4 Aug 2011 15:53:57 +0530 Subject: [mapserver-users] Run-time Substitution in mapserver using php Message-ID: Dear, I am having problem in code for Run-time Substitution for Regular Expression in mapserver using php. If anyone has code for the same than please provide. -- Regards, Lokendra Singh. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at spacetec.no Thu Aug 4 06:13:33 2011 From: jorn at spacetec.no (=?iso-8859-1?q?J=F8rn_Vegard_R=F8snes?=) Date: Thu, 4 Aug 2011 15:13:33 +0200 Subject: [mapserver-users] KML output and timestamp Message-ID: <201108041513.33540.jorn@spacetec.no> Hi all, do you know if Mapserver support KML Timestamp for KML output. http://code.google.com/apis/kml/documentation/time.html The documentation (http://mapserver.org/output/kml_output.html) says TimePrimitive: No but it's kinda strange because Mapserver supports WMS Time. Thanks. kind regards Jorn Vegard From glp at xplornet.com Thu Aug 4 10:18:46 2011 From: glp at xplornet.com (Gregory) Date: Thu, 04 Aug 2011 13:18:46 -0400 Subject: [mapserver-users] Color ramp a variable Message-ID: <4E3AD476.6080302@xplornet.com> Is there predefined way within mapserver to color ramp a variable (similar to the topographic sense)? I have a diverse choropleth map where I'd like to symbolize it appropriately. I have attribute data joined within a shpfile. Cheers Gregory From greenkov at gmail.com Thu Aug 4 12:27:57 2011 From: greenkov at gmail.com (Alexander Petkov) Date: Thu, 4 Aug 2011 13:27:57 -0600 Subject: [mapserver-users] Color ramp a variable In-Reply-To: <4E3AD476.6080302@xplornet.com> References: <4E3AD476.6080302@xplornet.com> Message-ID: I use a workaround for this problem, where a premade color ramp graphic corresponds to a value range. Change the "Single image" to "Compare Images" in the drop down box, and then click the "Update" button on the bottom to update the map: http://maps.wfas.net/ The legend on the right is the result. Alex On Thu, Aug 4, 2011 at 11:18 AM, Gregory wrote: > Is there predefined way within mapserver to color ramp a variable > (similar to the topographic sense)? I have a diverse choropleth map > where I'd like to symbolize it appropriately. I have attribute data > joined within a shpfile. > > Cheers > Gregory > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From glp at xplornet.com Thu Aug 4 17:07:00 2011 From: glp at xplornet.com (Gregory) Date: Thu, 04 Aug 2011 20:07:00 -0400 Subject: [mapserver-users] Color ramp a variable In-Reply-To: References: <4E3AD476.6080302@xplornet.com> Message-ID: <4E3B3424.5080100@xplornet.com> That's an interesting approach. I'm not quite sure how to implement so could you describe further? I'm experimenting with my data and how to classify it. Unfortunately it seems to be impossible to apply an automatic classification method. Do all of you use some sort of external scripting to cobble a mapfile together? Cheers Gregory On 11-08-04 03:27 PM, Alexander Petkov wrote: > I use a workaround for this problem, where a premade color ramp > graphic corresponds to a value range. > > Change the "Single image" to "Compare Images" in the drop down box, > and then click the "Update" button on the bottom to update the map: > > http://maps.wfas.net/ > > The legend on the right is the result. > > Alex > > On Thu, Aug 4, 2011 at 11:18 AM, Gregory wrote: >> Is there predefined way within mapserver to color ramp a variable >> (similar to the topographic sense)? I have a diverse choropleth map >> where I'd like to symbolize it appropriately. I have attribute data >> joined within a shpfile. >> >> Cheers >> Gregory >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> From bhempen at sciops.esa.int Fri Aug 5 04:02:17 2011 From: bhempen at sciops.esa.int (Bryan Hempen) Date: Fri, 05 Aug 2011 13:02:17 +0200 Subject: [mapserver-users] WFS Spatial Filter Problem Message-ID: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> The problem: I am trying to implement something similar to http://openlayers.org/dev/examples/wfs-spatial-filter.html with my own data served by MapServer through a WFS. I just changed some lines in the code to make it work with MapServer, so the code is almost equal to the code in the example at the moment. So far it's working fine UNTIL I drag the polygon to apply the spatial filter! According to the getCapabitilies the server should be able to handle the request: ... ... Both WFS GetFeature requests are sent via HTTP POST. The first one that works (called on page load) looks like this: msGeometry 135.45,-47.425 157.95,-36.175 The request not working looks like this: msGeometry 145.72880866081,-40.709423872828 145.83867194206,-42.752880904078 148.34355475456,-40.995068404078 145.72880866081,-40.709423872828 msGeometry 135.45,-47.40302734375 157.95,-36.15302734375 Does anyone have an idea? Any help is appreciated, I am stuck. The setup: * OS: Red Hat Enterprise Linux 5.4 * PostgreSQL 8.2 * PostGIS 1.3 * MapServer 5.6.5 * OpenLayers, one of the latest versions. ProxyHost set and working (calling the proxy.cgi shows OpenLayers website) Kind regards, Bryan ================================================================================================ This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. ================================================================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From bhempen at sciops.esa.int Fri Aug 5 04:41:38 2011 From: bhempen at sciops.esa.int (Bryan Hempen) Date: Fri, 05 Aug 2011 13:41:38 +0200 Subject: [mapserver-users] WFS Spatial Filter Problem In-Reply-To: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> Message-ID: <25280_1312544551_4E3BD727_25280_1080887_1_4E3BD6F2.6020704@sciops.esa.int> Sorry, I forgot to mention the Error message: 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root at localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Apache/2.2.3 (Red Hat) Server at localhost Port 80
Thanks, Bryan On 05/08/2011 13:02, Bryan Hempen wrote: > The problem: I am trying to implement something similar to > http://openlayers.org/dev/examples/wfs-spatial-filter.html with my own > data served by MapServer through a WFS. I just changed some lines in > the code to make it work with MapServer, so the code is almost equal > to the code in the example at the moment. So far it's working fine > UNTIL I drag the polygon to apply the spatial filter! According to the > getCapabitilies the server should be able to handle the request: > > ... > > > > > > > > > > > > > > > ... > > Both WFS GetFeature requests are sent via HTTP POST. The first one > that works (called on page load) looks like this: > > xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" service="WFS" > version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"> > > > > msGeometry > > 135.45,-47.425 > 157.95,-36.175 > > > > > > > The request not working looks like this: > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" > version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"> > typeName="ms:omega"> > > > > msGeometry > > > > 145.72880866081,-40.709423872828 145.83867194206,-42.752880904078 > 148.34355475456,-40.995068404078 > 145.72880866081,-40.709423872828 > > > > > > msGeometry > > 135.45,-47.40302734375 > 157.95,-36.15302734375 > > > > > > > > Does anyone have an idea? Any help is appreciated, I am stuck. > > The setup: > > * OS: Red Hat Enterprise Linux 5.4 > * PostgreSQL 8.2 > * PostGIS 1.3 > * MapServer 5.6.5 > * OpenLayers, one of the latest versions. ProxyHost set and > working (calling the proxy.cgi shows OpenLayers website) > > Kind regards, > Bryan > ================================================================================================ > This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, > > use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in > > error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by > > the sender. > > Please consider the environment before printing this email. > ================================================================================================= > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users ================================================================================================ This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. ================================================================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From john.callahan at udel.edu Fri Aug 5 06:04:32 2011 From: john.callahan at udel.edu (John Callahan) Date: Fri, 5 Aug 2011 09:04:32 -0400 Subject: [mapserver-users] WFS Spatial Filter Problem In-Reply-To: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> Message-ID: This thread may or may not help: http://osgeo-org.1803224.n2.nabble.com/WFS-intersect-request-td6458533.html I have not tried using AND compound filters. The following format does work for me using the BBOX filter. SHAPE 149081.76574899518 163078.62572595105 205627.85303800018 194899.95291598293 - John *********************************** John Callahan, Research Scientist Delaware Geological Survey University of Delaware URL: http://www.dgs.udel.edu ******************************* On Fri, Aug 5, 2011 at 7:02 AM, Bryan Hempen wrote: > ** > The problem: I am trying to implement something similar to > http://openlayers.org/dev/examples/wfs-spatial-filter.html with my own > data served by MapServer through a WFS. I just changed some lines in the > code to make it work with MapServer, so the code is almost equal to the code > in the example at the moment. So far it's working fine UNTIL I drag the > polygon to apply the spatial filter! According to the getCapabitilies the > server should be able to handle the request: > > ... > > > > > > > > > > > > > > > ... > > Both WFS GetFeature requests are sent via HTTP POST. The first one that > works (called on page load) looks like this: > > xmlns:xsi="http :// > www.w3.org/2001/XMLSchema-instance" service="WFS" version="1.0.0" > xsi:schemaLocation="http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" > > > > > > > > msGeometry > srsName="EPSG:4326"> > 135.45,-47.425 157.95,-36.175 > > > > > > > The request not working looks like this: > > xmlns:xsi= > "http://www.w3.org/2001/XMLSchema-instance"service="WFS" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" > > > typeName="ms:omega"> > > > > > > msGeometry > srsName="EPSG:4326"> > > > 145.72880866081,-40.709423872828 145.83867194206,-42.752880904078 > 148.34355475456,-40.995068404078 > 145.72880866081,-40.709423872828 > > > > > > msGeometry > srsName="EPSG:4326"> > 135.45,-47.40302734375 157.95,-36.15302734375 > > > > > > > > Does anyone have an idea? Any help is appreciated, I am stuck. > > The setup: > > - OS: Red Hat Enterprise Linux 5.4 > - PostgreSQL 8.2 > - PostGIS 1.3 > - MapServer 5.6.5 > - OpenLayers, one of the latest versions. ProxyHost set and working > (calling the proxy.cgi shows OpenLayers website) > > Kind regards, > Bryan > > ================================================================================================ > This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, > > use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in > > error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by > > the sender. > > Please consider the environment before printing this email. > ================================================================================================= > > > _______________________________________________ > 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 forums at craniumjuice.com Fri Aug 5 06:23:17 2011 From: forums at craniumjuice.com (forums) Date: Fri, 5 Aug 2011 08:23:17 -0500 Subject: [mapserver-users] Missing 1/2 a raster image in Google tilemode Message-ID: I have a GeoTiff file with an extent of: Upper Left ( 0.0000000, 90.0000000) ( 0d 0' 0.01"E, 90d 0' 0.00"N) Lower Left ( 0.0000000, -90.0000000) ( 0d 0' 0.01"E, 90d 0' 0.00"S) Upper Right ( 360.000, 90.000) (360d 0' 0.00"E, 90d 0' 0.00"N) Lower Right ( 360.000, -90.000) (360d 0' 0.00"E, 90d 0' 0.00"S) Center ( 180.0000000, 0.0000000) (180d 0' 0.00"E, 0d 0' 0.01"N) I set the extent in my map file to: EXTENT 0 -90 360 90 When I set "&mode=map" the full image displays as I would expect it. But when I incorporate it into a Google Maps API using "&mode=tile&tilemode=gmap" only the part of the image to show. Only the Eastern Hemisphere shows on the map. I tried gdal_translate to alter the corners, which shows the whole map, but East/West hemispheres are swapped. Are there any tricks I can do to get the whole thing to display? I'm thinking I might have to some how programmaticly swap left/right sides of the raster. Thanks, I appreciate any insight anyone might have. Jerl From jmarlin at saucontech.com Fri Aug 5 06:54:21 2011 From: jmarlin at saucontech.com (Joe Marlin) Date: Fri, 5 Aug 2011 09:54:21 -0400 (EDT) Subject: [mapserver-users] tile4ms throwing msSmallMalloc() Error In-Reply-To: <1458598707.2170.1312551323459.JavaMail.root@email> Message-ID: <1670977009.2191.1312552461745.JavaMail.root@email> Hello! Quick question: I'm running "tile4ms roadwaylevel5_meta.txt roadwaylevel5_index", where roadwaylevel5_meta.txt is simply my list of shp files: And getting: "msSmallMalloc(): Out of memory allocating -4 bytes." What does that mean? Why am I getting that? I've already tried: -Compiling from SVN -Compiling 6.0.1 from the website -Trying on a different machine -Trying to run the command with sudo The documentation says "no extensions" in the input file; however, the examples in that exact same documentation page DO have the ".shp" extension. If I remove the extensions from my shape files, I get: "Aborted. Unable to open DBF:./roadwaylevel5_index". ./roadwaylevel5_index.dbf is created, and left empty when this happens. Running with sudo makes no difference. Thanks for your help, and sorry if I'm missing anything obvious! Joseph Marlin From lokendrra at gmail.com Fri Aug 5 08:47:45 2011 From: lokendrra at gmail.com (Lokendra Singh) Date: Fri, 5 Aug 2011 03:47:45 -1200 Subject: [mapserver-users] Forgot Password Message-ID: Dear, Pl. let me know how to retrieve forgot password for mapserver-users. -- Regards, Lokendra Singh Tanwar Mob: +91-9928738191 -------------- next part -------------- An HTML attachment was scrubbed... URL: From john.callahan at udel.edu Fri Aug 5 10:17:19 2011 From: john.callahan at udel.edu (John Callahan) Date: Fri, 5 Aug 2011 13:17:19 -0400 Subject: [mapserver-users] advice on books Message-ID: Can anyone point me to a good book on learning Mapserver, and possibly OpenLayers as well? I don't usually buy books on software products as there's so much available online. However, I recently purchased PostGIS in Action and it's helped significantly. I wonder if there's a similar quality book out there on Mapserver. Something higher than intro level would be preferable. Thanks. - John *********************************** John Callahan, Research Scientist Delaware Geological Survey University of Delaware URL: http://www.dgs.udel.edu ******************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From PORTER.DANIEL at flsenate.gov Fri Aug 5 10:43:29 2011 From: PORTER.DANIEL at flsenate.gov (PORTER.DANIEL) Date: Fri, 5 Aug 2011 13:43:29 -0400 Subject: [mapserver-users] advice on books In-Reply-To: References: Message-ID: <0769BAE88474F642AB99380A546C3C83892D4D7128@LEGP-E7MB-CMS1.leg.fla.int> John, I believe there is only one English book out on OpenLayers, called "OpenLayers 2.10 Beginner's Guide" (https://www.packtpub.com/openlayers-2-1-javascript-web-mapping-library-beginners-guide/book), which as the name says, it's a beginner's guide. He assumes little technical knowledge, which makes it very good for getting your bearings. If you can figure out what to do from the OpenLayers examples and API docs, I don't know that it has much to offer. If you're struggling with that, I think it would be excellent (disclosure: I worked with Erik, the author of the book). I have read that this mapserver book is somewhat outdated: http://www.amazon.com/Beginning-MapServer-Source-Development-Experts/dp/1590594908 I have not seen it, though. It's the only one I know about. Daniel From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of John Callahan Sent: Friday, August 05, 2011 1:17 PM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] advice on books Can anyone point me to a good book on learning Mapserver, and possibly OpenLayers as well? I don't usually buy books on software products as there's so much available online. However, I recently purchased PostGIS in Action and it's helped significantly. I wonder if there's a similar quality book out there on Mapserver. Something higher than intro level would be preferable. Thanks. - John *********************************** John Callahan, Research Scientist Delaware Geological Survey University of Delaware URL: http://www.dgs.udel.edu ******************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From john.callahan at udel.edu Fri Aug 5 11:09:46 2011 From: john.callahan at udel.edu (John Callahan) Date: Fri, 5 Aug 2011 14:09:46 -0400 Subject: [mapserver-users] advice on books In-Reply-To: <0769BAE88474F642AB99380A546C3C83892D4D7128@LEGP-E7MB-CMS1.leg.fla.int> References: <0769BAE88474F642AB99380A546C3C83892D4D7128@LEGP-E7MB-CMS1.leg.fla.int> Message-ID: Thanks Daniel. The OpenLayers book looks interesting. Even though I typically do fine with online examples, it's probably worth the purchase, especially since I may be migrating several Google Maps apps to OpenLayers at some point. That Mapserver book is from 2005, I agree a bit too old but the only one I can find as well. Luckily the Mapserver documentation wiki has everything we need! - John On Fri, Aug 5, 2011 at 1:43 PM, PORTER.DANIEL wrote: > John,**** > > ** ** > > I believe there is only one English book out on OpenLayers, called > ?OpenLayers 2.10 Beginner?s Guide? ( > https://www.packtpub.com/openlayers-2-1-javascript-web-mapping-library-beginners-guide/book), > which as the name says, it?s a beginner?s guide. He assumes little > technical knowledge, which makes it very good for getting your bearings. If > you can figure out what to do from the OpenLayers examples and API docs, I > don?t know that it has much to offer. If you?re struggling with that, I > think it would be excellent (disclosure: I worked with Erik, the author of > the book).**** > > ** ** > > I have read that this mapserver book is somewhat outdated: > http://www.amazon.com/Beginning-MapServer-Source-Development-Experts/dp/1590594908 I have not seen it, though. It?s the only one I know about. > **** > > ** ** > > Daniel**** > > *From:* mapserver-users-bounces at lists.osgeo.org [mailto: > mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *John Callahan > *Sent:* Friday, August 05, 2011 1:17 PM > *To:* mapserver-users at lists.osgeo.org > *Subject:* [mapserver-users] advice on books**** > > ** ** > > Can anyone point me to a good book on learning Mapserver, and possibly > OpenLayers as well? I don't usually buy books on software products as > there's so much available online. However, I recently purchased PostGIS in > Action and it's helped significantly. I wonder if there's a similar quality > book out there on Mapserver. Something higher than intro level would be > preferable. Thanks.**** > > ** ** > > - John**** > > > *********************************** > John Callahan, Research Scientist > Delaware Geological Survey > University of Delaware > URL: http://www.dgs.udel.edu > *********************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yassefa at dmsolutions.ca Fri Aug 5 11:45:39 2011 From: yassefa at dmsolutions.ca (Yewondwossen Assefa) Date: Fri, 05 Aug 2011 14:45:39 -0400 Subject: [mapserver-users] KML output and timestamp In-Reply-To: <201108041513.33540.jorn@spacetec.no> References: <201108041513.33540.jorn@spacetec.no> Message-ID: <4E3C3A53.202@dmsolutions.ca> Sorry for the delay. It is not supported for now. I have added trac bug on it [1]. You are right that similar mechanism (in terms for metedata) can be used to extract time specfic value for the attributes and write it to the kml. best regards, [1] http://trac.osgeo.org/mapserver/ticket/3980 On 04/08/2011 9:13 AM, J?rn Vegard R?snes wrote: > Hi all, > > do you know if Mapserver support KML Timestamp for KML output. > http://code.google.com/apis/kml/documentation/time.html > > The documentation (http://mapserver.org/output/kml_output.html) says > TimePrimitive: No > but it's kinda strange because Mapserver supports WMS Time. > > Thanks. > > kind regards > Jorn Vegard > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: yassefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From devdutmitra at gmail.com Fri Aug 5 20:52:30 2011 From: devdutmitra at gmail.com (Devdut Mitra) Date: Sat, 6 Aug 2011 09:22:30 +0530 Subject: [mapserver-users] mapserver user-Debdut Mitra from India,Kolkata Message-ID: What is the job potential of webGis using mapserver with Php scripting language? -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephan.holl at intevation.de Mon Aug 8 02:30:01 2011 From: stephan.holl at intevation.de (Stephan Holl) Date: Mon, 8 Aug 2011 11:30:01 +0200 Subject: [mapserver-users] ArcSDE, Win32 and truncated GetCapabilities In-Reply-To: <20110728101514.18c2b013@thoe.hq.intevation.de> References: <20110728101514.18c2b013@thoe.hq.intevation.de> Message-ID: <20110808113001.19f29464@thoe.hq.intevation.de> Hello, since there is no reply for some time now I follow up to myself here. Stephan Holl , [20110728 - 10:15:14] > Dear list, > > I have an ArcSDE-Layer-based mapfile. When requesting a > GetCapabilities-doc in Version 1.1.1 and 1.3.0, the output gets > truncated. > > In 1.0.0 the GetCapabilities-Document is finished though, strange. > > I am running MapServer 6.1-dev (r11785) on Windows 7 with Apache > 2.2.19 against ArcSDE 9.3.1. > > I found some quite old issues[1],[2] which seem to have the same > problem, but apparently they are fixed. It seems that mapserver segfaults here (no errors given in any logfile with DEBUG 5 in web and layer-level) or the GetCaps-buffer is to small for the output.. Can anybody provide some debug-hints on windows though? Best Stephan -- Stephan Holl | Tel.: +49 (0)541-33 508 3663 Intevation GmbH, Neuer Graben 17, 49074 OS | AG Osnabr?ck - HR B 18998 Gesch?ftsf?hrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From mario.basa at gmail.com Mon Aug 8 02:39:16 2011 From: mario.basa at gmail.com (Mario Basa) Date: Mon, 8 Aug 2011 18:39:16 +0900 Subject: [mapserver-users] expressions in a chart layer Message-ID: Hello. Do EXPRESSIONS work in a chart layer? I have been trying something like the one below, and the postgis layer only has 2010 and 2011 data and yet the 2012 portion of the chart keeps on appearing. If Expressions do not work, is there any other method of filtering the data before creating the pie char. Thanks! TYPE CHART PROCESSING "CHART_SIZE=20" PROCESSING "CHART_TYPE=PIE" CLASS NAME "2010" EXPRESSION ([obj_yyyy]=2010) STYLE SIZE 5 COLOR 234 192 156 OUTLINECOLOR 10 10 10 END END CLASS NAME "2011" EXPRESSION ([obj_yyyy]=2011) STYLE SIZE 20 COLOR 112 78 221 OUTLINECOLOR 10 10 10 END END CLASS NAME "2012" EXPRESSION ([obj_yyyy]=2012) STYLE SIZE 60 COLOR 133 178 199 OUTLINECOLOR 10 10 10 END END From thomas.bonfort at gmail.com Mon Aug 8 03:52:38 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Mon, 8 Aug 2011 12:52:38 +0200 Subject: [mapserver-users] expressions in a chart layer In-Reply-To: References: Message-ID: There is no such functionality for the time being. You can either filter out the data at the DATA level (i.e. postgis query with "where year=xxx") or fund the addition of expressions to the chart type layers. regards, thomas On Mon, Aug 8, 2011 at 11:39, Mario Basa wrote: > Hello. > > Do EXPRESSIONS work in a chart layer? I have been trying something > like the one below, and the postgis layer only has 2010 and 2011 data > and yet the 2012 portion of the chart keeps on appearing. If > Expressions do not work, is there any other method of filtering the > data before creating the pie char. ? ?Thanks! > > > TYPE CHART > PROCESSING "CHART_SIZE=20" > PROCESSING "CHART_TYPE=PIE" > > CLASS > ? ? ? ?NAME "2010" > ? ? ? ?EXPRESSION ([obj_yyyy]=2010) > ? ? ? ?STYLE > ? ? ? ? ? ?SIZE 5 > ? ? ? ? ? ?COLOR 234 192 156 > ? ? ? ? ? ?OUTLINECOLOR 10 10 10 > ? ? ? ?END > ? ?END > ? ?CLASS > ? ? ? ?NAME "2011" > ? ? ? ?EXPRESSION ([obj_yyyy]=2011) > ? ? ? ?STYLE > ? ? ? ? ? ?SIZE 20 > ? ? ? ? ? ?COLOR 112 78 221 > ? ? ? ? ? ?OUTLINECOLOR 10 10 10 > ? ? ? ?END > ? ?END > ? ?CLASS > ? ? ? ?NAME "2012" > ? ? ? ?EXPRESSION ([obj_yyyy]=2012) > ? ? ? ?STYLE > ? ? ? ? ? ?SIZE 60 > ? ? ? ? ? ?COLOR 133 178 199 > ? ? ? ? ? ?OUTLINECOLOR 10 10 10 > ? ? ? ?END > ? ?END > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From Jukka.Rahkonen at mmmtike.fi Mon Aug 8 04:23:44 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Mon, 8 Aug 2011 11:23:44 +0000 Subject: [mapserver-users] Variable substitution error with non-ASCII characters In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A630178DB@suutari.haapa.mmm.fi> Hi, I have been playing with variable substitution inside the DATA part of my mapfile. I have defined variable %sql% which is tranferred inside a WHERE part of the SQL selecting data for me. The next with &sql=highway='bus_stop' works fine. http://188.64.1.61/cgi-bin/ms_ows?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=563&HEIGHT=437&LAYERS=osm_pisteet&TRANSPARENT=TRUE&FORMAT=image/png&BBOX=-369151.98300283286,6597900.0,1511076.628895184,8057331.444759207&SRS=EPSG:3067&STYLES=&sql=highway='bus_stop' However, if the variable contains non-ASCII characters the queries will fail. For example &sql=highway='?' gives the following error. msDrawMap(): Image handling error. Failed to draw layer named 'osm_pisteet'. msPostGISLayerWhichShapes(): Query error. Error (ERROR: invalid byte sequence for encoding "UTF8": 0xe42729 ) executing query: select encode(ST_AsBinary(ST_Force_2D("way"),'NDR'),'hex') as geom,"osm_id" from (select (way),osm_id,tags from osm_point where highway='?') as foo where way && GeomFromText('POLYGON((-367482.152974504 6599569.83002833,-367482.152974504 8055661.61473088,1509406.79886686 8055661.61473088,1509406.79886686 6599569.83002833,-367482.152974504 6599569.83002833))',3067) Is there any known way to solve the invalid byte sequence error for example by escaping the none-ASCII characters in some way? -Jukka Rahkonen- From Clement.MONIER at v-trafic.com Mon Aug 8 06:23:20 2011 From: Clement.MONIER at v-trafic.com (=?iso-8859-1?Q?Cl=E9ment_MONIER?=) Date: Mon, 8 Aug 2011 15:23:20 +0200 Subject: [mapserver-users] Mapserver 64bits for windows Message-ID: <0B6D7F516315594DBEFE58178D91BD3201F7AE4DB5B2@exchangemm.mm.fr> Hi, I'm looking for binaries of MapServer 64bits built for windows. As I couldn't find any, I'm trying to compile a 64bits version of MapServer on windows. Do you know any documentation related to this subject ? Thanks & Regards Clement -------------- next part -------------- An HTML attachment was scrubbed... URL: From bhempen at sciops.esa.int Mon Aug 8 07:58:30 2011 From: bhempen at sciops.esa.int (Bryan Hempen) Date: Mon, 08 Aug 2011 16:58:30 +0200 Subject: [mapserver-users] WFS Spatial Filter Problem In-Reply-To: References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> Message-ID: <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> Hi there! These are things that I've tried in the meantime: - Manually sending the request to the server, but without different results compared to using OpenLayers functions. Also trying to force the usage of the proxy.cgi by containing it in the URL, but didn't bring up different results. - Thought about the solution as suggested by the John, but substituting a Polygon with a BBOX only works for rectangular Polygons! I need to be able to specify arbitrary Polygons/Shapes. I am sure the solution proposed by him will work, because it will be just a request just like the one that already works. - Thought about trying a newer version of the MapServer. However, I run is the newest ms4w on my local machone and I remember that I had the same problem a few weeks ago. Furthermore, John had the same problem with MapServer 6.0.0, and since then nothing changed about WFS or filter encoding according to the release announcements. - Thought sending a GET request instead of a POST request could solve the problem! They provided examples in the documentation with links, something they definitely wouldn't have done in case those examples wouldn't work! However, even GET requests didn't work! What is strange: Also got errors with code 500. Shouldn't the mapserver return some error message? I AM CONFUSED! Please heeeelp! Regards, Bryan On 05/08/2011 15:04, John Callahan wrote: > This thread may or may not help: > http://osgeo-org.1803224.n2.nabble.com/WFS-intersect-request-td6458533.html > > > I have not tried using AND compound filters. The following format > does work for me using the BBOX filter. > > > SHAPE > > 149081.76574899518 163078.62572595105 > 205627.85303800018 194899.95291598293 > > > > - John > > *********************************** > John Callahan, Research Scientist > Delaware Geological Survey > University of Delaware > URL: http://www.dgs.udel.edu ================================================================================================ This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. ================================================================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From yassefa at dmsolutions.ca Mon Aug 8 08:14:28 2011 From: yassefa at dmsolutions.ca (Yewondwossen Assefa) Date: Mon, 08 Aug 2011 11:14:28 -0400 Subject: [mapserver-users] WFS Spatial Filter Problem In-Reply-To: <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> Message-ID: <4E3FFD54.8070306@dmsolutions.ca> Bryan, Is it possible for you to provide a sample data/map/request that I can try that would reproduce your problems? If that is the case, please send it to me directly and I will test it with the latest MapServer and possibly provide answers. regards, Assefa On 08/08/2011 10:58 AM, Bryan Hempen wrote: > Hi there! > > These are things that I've tried in the meantime: > > > > > - Manually sending the request to the server, but without > different results compared to using OpenLayers functions. Also > trying to force the usage of the proxy.cgi by containing it in the > URL, but didn't bring up different results. > > - > Thought about the solution as suggested by the John, but > substituting a Polygon with a BBOX only works for rectangular > Polygons! I need to be able to specify arbitrary > Polygons/Shapes. I am sure the solution proposed by him will > work, > > because it will be just a request just like the one that > already works. > > - > Thought about trying a newer version of the MapServer. > However, I run is the newest ms4w on my local machone and I > remember that I had the same problem a few weeks ago. > Furthermore, John had the same problem with MapServer 6.0.0, > > and since then nothing changed about WFS or filter encoding > according to the release announcements. > > - > Thought sending a GET request instead of a POST request could > solve the problem! They provided examples in the documentation > with links, something they definitely wouldn't have done in > case those examples wouldn't work! However, even > GET > requests didn't work! What is strange: Also got errors with > code 500. Shouldn't the mapserver return some error message? > > > > I AM CONFUSED! Please heeeelp! > > > > Regards, > > Bryan > > > > On 05/08/2011 15:04, John Callahan wrote: >> This thread may or may not help: >> http://osgeo-org.1803224.n2.nabble.com/WFS-intersect-request-td6458533.html >> >> >> I have not tried using AND compound filters. The following format >> does work for me using the BBOX filter. >> >> >> SHAPE >> > srsName="EPSG:26957"> >> 149081.76574899518 163078.62572595105 >> 205627.85303800018 194899.95291598293 >> >> >> >> - John >> >> *********************************** >> John Callahan, Research Scientist >> Delaware Geological Survey >> University of Delaware >> URL: http://www.dgs.udel.edu > > ================================================================================================ > This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, > > use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in > > error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by > > the sender. > > Please consider the environment before printing this email. > ================================================================================================= > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: yassefa at dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From Kai-Behncke at gmx.de Mon Aug 8 08:27:15 2011 From: Kai-Behncke at gmx.de (Kai Behncke) Date: Mon, 08 Aug 2011 17:27:15 +0200 Subject: [mapserver-users] WFS Spatial Filter Problem In-Reply-To: <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> Message-ID: <20110808152715.84000@gmx.net> Hi Bryan, ....could you show how you send the request manually to the server? Might it be possible to send by mail your geodata and your wfs_file? Best regards, Kai -------- Original-Nachricht -------- > Datum: Mon, 08 Aug 2011 16:58:30 +0200 > Von: Bryan Hempen > An: John Callahan > CC: mapserver-users at lists.osgeo.org > Betreff: Re: [mapserver-users] WFS Spatial Filter Problem > Hi there! > > These are things that I've tried in the meantime: > > > - Manually sending the request to the server, but without different > results compared to using OpenLayers functions. Also trying to force the > usage of the proxy.cgi by containing it in the URL, but didn't bring up > different results. > > - Thought about the solution as suggested by the John, but substituting > a Polygon with a BBOX only works for rectangular Polygons! I need to be > able to specify arbitrary Polygons/Shapes. I am sure the solution > proposed by him will work, > because it will be just a request just like the one that already works. > > - Thought about trying a newer version of the MapServer. However, I run > is the newest ms4w on my local machone and I remember that I had the > same problem a few weeks ago. Furthermore, John had the same problem > with MapServer 6.0.0, > and since then nothing changed about WFS or filter encoding according to > the release announcements. > > - Thought sending a GET request instead of a POST request could solve > the problem! They provided examples in the documentation with links, > something they definitely wouldn't have done in case those examples > wouldn't work! However, even > GET requests didn't work! What is strange: Also got errors with code > 500. Shouldn't the mapserver return some error message? > > I AM CONFUSED! Please heeeelp! > > Regards, > Bryan > > > On 05/08/2011 15:04, John Callahan wrote: > > This thread may or may not help: > > > http://osgeo-org.1803224.n2.nabble.com/WFS-intersect-request-td6458533.html > > > > > > I have not tried using AND compound filters. The following format > > does work for me using the BBOX filter. > > > > > > SHAPE > > srsName="EPSG:26957"> > > 149081.76574899518 163078.62572595105 > > 205627.85303800018 194899.95291598293 > > > > > > > > - John > > > > *********************************** > > John Callahan, Research Scientist > > Delaware Geological Survey > > University of Delaware > > URL: http://www.dgs.udel.edu > > > ================================================================================================ > This message and any attachments are intended for the use of the addressee > or addressees only. The unauthorised disclosure, > > use, dissemination or copying (either in whole or in part) of its content > is not permitted. If you received this message in > > error, please notify the sender and delete it from your system. Emails can > be altered and their integrity cannot be guaranteed by > > the sender. > > Please consider the environment before printing this email. > ================================================================================================= > -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de From even.rouault at mines-paris.org Mon Aug 8 09:26:23 2011 From: even.rouault at mines-paris.org (Even Rouault) Date: Mon, 08 Aug 2011 18:26:23 +0200 Subject: [mapserver-users] Variable substitution error with non-ASCII characters In-Reply-To: <84446DEF76453C439E9E97E438E13A630178DB@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A630178DB@suutari.haapa.mmm.fi> Message-ID: <1312820783.4e400e2fb0403@webmail.free.fr> Selon Rahkonen Jukka : Did you check the encoding of your '?' character ? I would think that if it is sent in UTF-8 it should work. I'd also warn you that unless you've defined a very strict validation pattern, such use of substitution is potentially dangerous because it leaves the door wide open to SQL injections. > Hi, > > I have been playing with variable substitution inside the DATA part of my > mapfile. I have defined variable %sql% which is tranferred inside a WHERE > part of the SQL selecting data for me. The next with &sql=highway='bus_stop' > works fine. > > http://188.64.1.61/cgi-bin/ms_ows?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=563&HEIGHT=437&LAYERS=osm_pisteet&TRANSPARENT=TRUE&FORMAT=image/png&BBOX=-369151.98300283286,6597900.0,1511076.628895184,8057331.444759207&SRS=EPSG:3067&STYLES=&sql=highway='bus_stop' > > However, if the variable contains non-ASCII characters the queries will fail. > For example &sql=highway='?' > gives the following error. > > > > "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd"> > > > msDrawMap(): Image handling error. Failed to draw layer named > 'osm_pisteet'. > msPostGISLayerWhichShapes(): Query error. Error (ERROR: invalid byte > sequence for encoding "UTF8": 0xe42729 > ) executing query: select > encode(ST_AsBinary(ST_Force_2D("way"),'NDR'),'hex') > as geom,"osm_id" from (select (way),osm_id,tags from osm_point > where highway='?') as foo where way && > GeomFromText('POLYGON((-367482.152974504 > 6599569.83002833,-367482.152974504 8055661.61473088,1509406.79886686 > 8055661.61473088,1509406.79886686 6599569.83002833,-367482.152974504 > 6599569.83002833))',3067) > > > > Is there any known way to solve the invalid byte sequence error for example > by escaping the none-ASCII characters in some way? > > -Jukka Rahkonen-_______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From even.rouault at mines-paris.org Mon Aug 8 10:19:00 2011 From: even.rouault at mines-paris.org (Even Rouault) Date: Mon, 8 Aug 2011 19:19:00 +0200 Subject: [mapserver-users] Mapserver 64bits for windows In-Reply-To: <0B6D7F516315594DBEFE58178D91BD3201F7AE4DB5B2@exchangemm.mm.fr> References: <0B6D7F516315594DBEFE58178D91BD3201F7AE4DB5B2@exchangemm.mm.fr> Message-ID: <201108081919.00775.even.rouault@mines-paris.org> Le lundi 08 ao?t 2011 15:23:20, Cl?ment MONIER a ?crit : > Hi, > > I'm looking for binaries of MapServer 64bits built for windows. > As I couldn't find any, I'm trying to compile a 64bits version of MapServer > on windows. You can find them on http://www.gisinternals.com/sdk/ From boolean10001 at yahoo.com Mon Aug 8 13:03:12 2011 From: boolean10001 at yahoo.com (Carlos Ruiz) Date: Mon, 8 Aug 2011 13:03:12 -0700 (PDT) Subject: [mapserver-users] Problem compiling with Mapserver 6 and GEOS 3.3.0 Message-ID: <1312833792.34629.YahooMailNeo@web38202.mail.mud.yahoo.com> Hi all, I have the following error while compiling Mapserver 6 and GEOS 3.3.0:undefined reference to `GEOSFree'. The ./configure shows that it is using the geos-config version 3.3.0, so it is taking the GEOS version I was compiled just before. I was looking at http://trac.osgeo.org/mapserver/ticket/3347 to find any help and I did the following: So I have to edit the Makefile file to see what was happening. And then I modified the following line: GEOS_LIB=? -L/usr/local/lib -lgeos_c For this one: GEOS_LIB=? -L/usr/local/lib -lgeos And then I was able to compile Mapserver. Is there an error with the make file ? Thanks in advance ! IC Carlos Ruiz -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Mon Aug 8 23:13:43 2011 From: sdlime at gmail.com (Steve Lime) Date: Tue, 9 Aug 2011 01:13:43 -0500 Subject: [mapserver-users] ArcSDE, Win32 and truncated GetCapabilities In-Reply-To: <20110808113001.19f29464@thoe.hq.intevation.de> References: <20110728101514.18c2b013@thoe.hq.intevation.de> <20110808113001.19f29464@thoe.hq.intevation.de> Message-ID: I wonder if this could be related to some general issues we've been experiencing with with SDE and queries. Get capabilities obviously doesn't do a query but it might be getting a list of attributes for presentation. That's where the issue seems to be. Check out ticket #3977. I've applied a fix to branch-6-0 only but it's trivial to fix trunk too if you can compile from source. I was waiting on some testing feedback before applying more broadly. Steve On Mon, Aug 8, 2011 at 4:30 AM, Stephan Holl wrote: > Hello, > > since there is no reply for some time now I follow up to myself here. > > Stephan Holl , [20110728 - 10:15:14] > > > Dear list, > > > > I have an ArcSDE-Layer-based mapfile. When requesting a > > GetCapabilities-doc in Version 1.1.1 and 1.3.0, the output gets > > truncated. > > > > In 1.0.0 the GetCapabilities-Document is finished though, strange. > > > > I am running MapServer 6.1-dev (r11785) on Windows 7 with Apache > > 2.2.19 against ArcSDE 9.3.1. > > > > I found some quite old issues[1],[2] which seem to have the same > > problem, but apparently they are fixed. > > It seems that mapserver segfaults here (no errors given in any logfile > with DEBUG 5 in web and layer-level) or the GetCaps-buffer is to small > for the output.. > > Can anybody provide some debug-hints on windows though? > > Best > Stephan > > -- > Stephan Holl | Tel.: +49 (0)541-33 508 3663 > Intevation GmbH, Neuer Graben 17, 49074 OS | AG Osnabr?ck - HR B 18998 > Gesch?ftsf?hrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner > > _______________________________________________ > 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 sdlime at gmail.com Mon Aug 8 23:25:45 2011 From: sdlime at gmail.com (Steve Lime) Date: Tue, 9 Aug 2011 01:25:45 -0500 Subject: [mapserver-users] Proposed MapServer project additions... Message-ID: Greetings MapServer User! This message is to inform you about some project changes being considered by the MapServer project steering committee (PSC). Specifically we are looking to expand the functionality offered by the project by integrating a couple of external projects. The projects under consideration are: -- TinyOWS - ?http://tinyows.org/ for PostGIS-based WFS-T -- MapCache (currently named mod-geocache) - http://code.google.com/p/mod-geocache/ for tile cache support Both projects have close ties to MapServer and add important capabilities. At this point integration means merging project governance, communications (mailing list/website), change management (SVN) and issue tracking (Trac). As a MapServer user you probably won't notice much of a difference since we'd continue to use MapServer infrastructure. You will start to see questions related to these new components on the mapserver mailing lists (-users, -dev) and we hope folks will take advantage of these new features if the need exists. For more detail on the proposed integration visit: -- http://mapserver.org/development/rfc/ms-rfc-70.html -- http://mapserver.org/development/rfc/ms-rfc-71.html The next significant MapServer release would be dubbed "MapServer Suite" and would contain all project components, that is, MapServer CGI, MapServer MapScript, MapServer TinyOWS and MapServer MapCache. The PSC is excited about the possibilities for the project and our users, and welcome any comments, questions or concerns regarding these proposed changes. Users interested in following or participating in MapServer development are encouraged to join the mapserver-dev mailing list. Steve Chair, MapServer PSC From stephan.holl at intevation.de Mon Aug 8 23:40:01 2011 From: stephan.holl at intevation.de (Stephan Holl) Date: Tue, 9 Aug 2011 08:40:01 +0200 Subject: [mapserver-users] ArcSDE, Win32 and truncated GetCapabilities In-Reply-To: References: <20110728101514.18c2b013@thoe.hq.intevation.de> <20110808113001.19f29464@thoe.hq.intevation.de> Message-ID: <20110809084001.21a1d645@thoe.hq.intevation.de> Hello Steve, thanks for your answer, Steve Lime , [20110809 - 01:13:43] > I wonder if this could be related to some general issues we've been > experiencing with with SDE and queries. Get capabilities obviously > doesn't do a query but it might be getting a list of attributes for > presentation. That's where the issue seems to be. Check out ticket > #3977. I've applied a fix to branch-6-0 only but it's trivial to fix > trunk too if you can compile from source. I was waiting on some > testing feedback before applying more broadly. Ahh, I see. I will pull out a patch[1] and try to apply on trunk since I have a recent trunk build-env. Reading the ticket seems the exact same problem I am facing. Btw. GetFeatureInfo also returns the famous 500 Premature End of script... error. Probably related. Best Stephan [1] http://trac.osgeo.org/mapserver/changeset/12031 > On Mon, Aug 8, 2011 at 4:30 AM, Stephan Holl > wrote: > > > Hello, > > > > since there is no reply for some time now I follow up to myself > > here. > > > > Stephan Holl , [20110728 - 10:15:14] > > > > > Dear list, > > > > > > I have an ArcSDE-Layer-based mapfile. When requesting a > > > GetCapabilities-doc in Version 1.1.1 and 1.3.0, the output gets > > > truncated. > > > > > > In 1.0.0 the GetCapabilities-Document is finished though, strange. > > > > > > I am running MapServer 6.1-dev (r11785) on Windows 7 with Apache > > > 2.2.19 against ArcSDE 9.3.1. > > > > > > I found some quite old issues[1],[2] which seem to have the same > > > problem, but apparently they are fixed. > > > > It seems that mapserver segfaults here (no errors given in any > > logfile with DEBUG 5 in web and layer-level) or the GetCaps-buffer > > is to small for the output.. > > > > Can anybody provide some debug-hints on windows though? > > > > Best > > Stephan > > > > -- > > Stephan Holl | Tel.: +49 (0)541-33 508 > > 3663 Intevation GmbH, Neuer Graben 17, 49074 OS | AG Osnabr?ck - > > HR B 18998 Gesch?ftsf?hrer: Frank Koormann, Bernhard Reiter, Dr. > > Jan-Oliver Wagner > > > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > -- Stephan Holl | Tel.: +49 (0)541-33 508 3663 Intevation GmbH, Neuer Graben 17, 49074 OS | AG Osnabr?ck - HR B 18998 Gesch?ftsf?hrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From Jukka.Rahkonen at mmmtike.fi Tue Aug 9 01:07:45 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Tue, 9 Aug 2011 08:07:45 +0000 Subject: [mapserver-users] Variable substitution error with non-ASCII characters Message-ID: <84446DEF76453C439E9E97E438E13A63017B93@suutari.haapa.mmm.fi> Hi, I am preparing an on-line demonstration about how to make queries against PostgreSQL/PostGIS key-value store with MapServer and I fear it would be too hard for me and possible readers to use UTF-8 encoding with their browsers. I think I will just tell that non-ASCII characters cannot be used at the moment. When it comes to risk of SQL injection I must just take it because I have not found another way to do what I want yet. I hope that having a separate PostGIS user with just select rights is limiting the risk. The data on my server is free so I do not need to protect it. But of course unkind people can easily construct very heavy queries and block my service. What I am playing with is to have OpenSteetMap data in PostGIS so that all the OSM tags are stored into one single column which is of PostgrSQL hstore datatype. It is a key-value store and thus a kind of a NoSQL thing. More info about hstore is at http://www.postgresql.org/docs/9.0/static/hstore.html I notised that MapServer allows to utilise this key-value store without a fixed schema pretty nice through WMS and WFS services, even OGC definitely did not define them to support NoSQL. However, making queries against hstore attribute (the key-value store) is not possible with standard SLD or OGC Filter encoding. Making SQL queries from hstore is somewhat tricky but I have been reading this document and managed to do working queries http://rubydoc.info/gems/activerecord-postgres-hstore/0.1.0/frames OpenStreetMap data from Finland contain right now totally 3333 different keys http://tagwatch.stoecker.eu/Finland/En/tags.html and with variable substitution I can query just everything with Mapserver. I can make selection and show a map with WMS and next I can do the same selection and download data with WFS. I have a feeling that Mapserver is one of the best tools that exist for making this kind of Query-Visualize-Download stuff with OpenStreetMap data or any other data having attributes as unstructured key-value pairs. Even the OSM project itseld does not have such a service at the moment. But Mapserver cannot deliver vector data in OSM.xml format so it is a different thing for some people. If question is just about using the data then GML should work as well. Perhaps developers will get interested in making some more secure way for building hstore queries. One alternative could be to make Mapserver to recognise hstore column and make OGC PropertyIsLike queries to lead into suitable SQL. Next should be a working live example about selecting tags highway=bus_stop (or anything else by editing the &sql parameter) from OSM point data, showing them on a map and later downloading the same data with WFS. ANDs and ORs are naturally supported as well as BBOX and other OGC spatial filters. Show a map 188.64.1.61/cgi-bin/ms_ows?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=563&HEIGHT=437&LAYERS=sea,borders,osm_pisteet&TRANSPARENT=TRUE&FORMAT=image/png&BBOX=-369151.98300283286,6597900.0,1511076.628895184,8057331.444759207&SRS=EPSG:3067&STYLES=&sql=(tags @>'highway=>bus_stop') Get the data (ten first features with this query) 188.64.1.61/cgi-bin/ms_ows?service=wfs&version=1.0.0&request=getfeature&typename=osm_pisteet&sql=(tags @>'highway=>bus_stop')&maxFeatures=10 -Jukka Rahkonen- Even Rouault wrote: > > Selon Rahkonen Jukka : > > Did you check the encoding of your '?' character ? I would > think that if it is > sent in UTF-8 it should work. > > I'd also warn you that unless you've defined a very strict > validation pattern, > such use of substitution is potentially dangerous because it > leaves the door > wide open to SQL injections. > > > Hi, > > > > I have been playing with variable substitution inside the > DATA part of my > > mapfile. I have defined variable %sql% which is tranferred > inside a WHERE > > part of the SQL selecting data for me. The next with > &sql=highway='bus_stop' > > works fine. > > > > > http://188.64.1.61/cgi-bin/ms_ows?REQUEST=GetMap&SERVICE=WMS&V ERSION=1.1.1&WIDTH=563&HEIGHT=437> &LAYERS=osm_pisteet&TRANSPARENT=TRUE&FORMAT=image/png&BBOX=-36 > 9151.98300283286,6597900.0,1511076.628895184,8057331.444759207 > &SRS=EPSG:3067&STYLES=&sql=highway='bus_stop' > > > > However, if the variable contains non-ASCII characters the > queries will fail. > > For example &sql=highway='?' > > gives the following error. > > > > > > > > > "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd "> > > > > > > msDrawMap(): Image handling error. Failed to draw layer named > > 'osm_pisteet'. > > msPostGISLayerWhichShapes(): Query error. Error (ERROR: > invalid byte > > sequence for encoding "UTF8": 0xe42729 > > ) executing query: select > > > encode(ST_AsBinary(ST_Force_2D("way"),'NDR') > ,'hex') > > as geom,"osm_id" from (select (way),osm_id,tags > from osm_point > > where highway='?') as foo where way && > > GeomFromText('POLYGON((-367482.152974504 > > 6599569.83002833,-367482.152974504 8055661.61473088,1509406.79886686 > > 8055661.61473088,1509406.79886686 6599569.83002833,-367482.152974504 > > 6599569.83002833))',3067) > > > > > > > > Is there any known way to solve the invalid byte sequence > error for example > > by escaping the none-ASCII characters in some way? > > > > -Jukka Rahkonen-_______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > From bhempen at sciops.esa.int Tue Aug 9 02:14:36 2011 From: bhempen at sciops.esa.int (Bryan Hempen) Date: Tue, 09 Aug 2011 11:14:36 +0200 Subject: [mapserver-users] WFS Spatial Filter Problem In-Reply-To: <20110808152715.84000@gmx.net> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> Message-ID: <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> Dear Kai and Assefa, After you two guys requested me to send you my setup, I exported the content in the databasetable to a shapefile so you can test it. When I tested the spatial filter right after that, it suddenly worked ! This narrows down the possibilities: - The request I send is definitely not the problem anymore. It works with MapServer + shapefile and with GeoServer. - I exported only the geometries to the shapefile in the table with geometrytype = POLYGON because from ~8000 geometries ~10 are linestrings. So I investigated possible problems with the linestring geometries by telling the MapServer not to serve them using a subquery in the mapfile: DATA "the_geom from (select * from alldata where geometrytype(the_geom) = 'POLYGON') as subquery using unique product_id using SRID=4326" Error 500 still occured. Therefore, the data can't be the problem neither, right? - Since I didn't change anything else MapServer must have problems communicating with the PostGIS database, but why Error 500 then? Here is my mapfile: MAP NAME "WFS Server" STATUS ON SIZE 600 400 SYMBOLSET "/var/www/html/psa/bhempen/mapservertest/symbols/symbols.sym" EXTENT -180 -90 180 90 UNITS DD SHAPEPATH "/var/www/html/psa/bhempen/mapservertest/data/" IMAGECOLOR 255 255 255 FONTSET "/var/www/html/psa/bhempen/mapservertest/fonts/fonts.list" MAXSIZE 4096 # needs to be set because otherwise an error will appear when rendering images on large screens #IMAGECOLOR 200 200 200 #commented out for WFS PROJECTION 'init=epsg:4326' END WEB TEMPLATE '/var/www/html/psa/bhempen/mapservertest/template.html' IMAGEPATH '/var/www/html/psa/bhempen/tmp/' IMAGEURL '/psa/bhempen/tmp/' METADATA "wfs_title" "WFS Demo Server for MapServer" ## REQUIRED "wfs_onlineresource" "http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.map&" ## Recommended "wfs_srs" "EPSG:4326" ## Recommended "wfs_abstract" "This text describes my WFS service." ## Recommended END END LAYER NAME "omega" STATUS DEFAULT TYPE POLYGON METADATA "wfs_title" "omega footprints" ##REQUIRED "wfs_srs" "EPSG:4326" ## REQUIRED "gml_include_items" "all" ## Optional (serves all attributes for layer) "gml_featureid" "product_id" ## REQUIRED END PROJECTION "init=epsg:4326" END CONNECTIONTYPE POSTGIS CONNECTION "host=localhost port=xxx dbname=xxx user=xxx password=xxx" DATA "the_geom from alldata using unique product_id using SRID=4326" CLASS STYLE OUTLINECOLOR 125 0 0 END END DUMP TRUE ## REQUIRED END # layer END Does anyone see a problem with the setup? Many thanks to Kai and Assefa for the help so far! I am going to send you the shapefile (which you could import into the database with pgsql2shp), the mapfile, and my client. Kind regards, Bryan ================================================================================================ This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. ================================================================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From xiaoshitou1986126 at 126.com Tue Aug 9 01:45:47 2011 From: xiaoshitou1986126 at 126.com (=?GBK?B?utXQ/rvd?=) Date: Tue, 9 Aug 2011 16:45:47 +0800 (CST) Subject: [mapserver-users] mapserver tilecache Message-ID: <632d73a9.9c89.131adb814ee.Coremail.xiaoshitou1986126@126.com> I has wrote a mapfile. It can be published successfully with openlayers. But its speed is very slow. So I try to use tilecache to improve the speed. now I have install the tilecache, and it can run with the example.But it doesn't run with my mapfile. Here is the program [road] type=WMS url=http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htodcs/file/jia1_test.map&transparent=true& layers=build,street extension=png bbox=-180 -90 180 90 maxResolution=0.0439453 srs=EPSG:4326 level=20 the html as follow: layer = new OpenLayers.Layer.WMS( "global", "http://localhost/tilecache-2.10/tilecache.py?", {layers: 'build,street', format: 'image/png' } ); map.addLayer(layer); Anyone can help me,thanks!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: From bhempen at sciops.esa.int Tue Aug 9 02:52:29 2011 From: bhempen at sciops.esa.int (Bryan Hempen) Date: Tue, 09 Aug 2011 11:52:29 +0200 Subject: [mapserver-users] WFS Spatial Filter Problem In-Reply-To: <20110808152715.84000@gmx.net> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> Message-ID: <32470_1312883604_4E410394_32470_18328_1_4E41035D.3080303@sciops.esa.int> Hi again, Another thing I just noticed is that the getCapabilities doesn't list any logical operator: According to http://mapserver.org/ogc/filter_encoding.html#currently-supported-features the operators AND OR and NOT should be supported. Shouldn't they be listed then? Even in the example in the documentation they are not listed: http://mapserver.org/ogc/filter_encoding.html#server-side However, it seems that it doesn't make a difference at least in my case. The getCapabilities response is the same with a POSTGIS connection and with a shapefile (both containing the same data). Regards, Bryan ================================================================================================ This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. ================================================================================================= From jcigar at ulb.ac.be Tue Aug 9 04:23:25 2011 From: jcigar at ulb.ac.be (Julien Cigar) Date: Tue, 09 Aug 2011 13:23:25 +0200 Subject: [mapserver-users] SLD and LABEL MINDISTANCE ..? Message-ID: <4E4118AD.7070106@ulb.ac.be> Hello, I'm using SLD with a section for labeling my polygons (this is what I have at the moment http://www.pastie.org/2344427). It works well except that I miss the MINDISTANCE of the LABEL section and wondered if there is a way to do it in the SLD ..? Does Mapserver supports some that are undocumented? Is there a way to "mix" a LABEL section (in the .map file) with the SLD? Thanks, Julien -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. -------------- next part -------------- A non-text attachment was scrubbed... Name: jcigar.vcf Type: text/x-vcard Size: 292 bytes Desc: not available URL: From SSchantz at BfS.de Tue Aug 9 04:21:19 2011 From: SSchantz at BfS.de (Stefan Schantz) Date: Tue, 09 Aug 2011 13:21:19 +0200 Subject: [mapserver-users] Encoding problems in GetCapabilities-document with WMS_VERSION 1.3.0 Message-ID: <4E41182F.8020603@BfS.de> Hi, I am running Mapserver 5.6.5. If I request the GetCapabilities with WMS_VERSION 1.1.1, I get a XML-Document encoding "UTF-8" and the German Umlaute like ??? and so on are shown correctly. --------------------------- ]> OGC:WMS Hintergrundkarten Deutschland Karte zum ??berblick ??ber Deutschland basierend auf DGM250 u.a. ----------- But if I change the request to WMS-VERSION 1.3.0 , my browser shows an error "xml not well formed" and the German Umlaute are not correct. --------------------- WMS Hintergrundkarten Deutschland Karte zum ??berblick ??ber Deutschland basierend auf DGM250 u.a. ... ------------------ Is there anything I can do? Thanks! Best regards from Munich! Stefan From jmckenna at gatewaygeomatics.com Tue Aug 9 04:58:12 2011 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 09 Aug 2011 08:58:12 -0300 Subject: [mapserver-users] ArcSDE, Win32 and truncated GetCapabilities In-Reply-To: <20110809084001.21a1d645@thoe.hq.intevation.de> References: <20110728101514.18c2b013@thoe.hq.intevation.de> <20110808113001.19f29464@thoe.hq.intevation.de> <20110809084001.21a1d645@thoe.hq.intevation.de> Message-ID: <4E4120D4.2040204@gatewaygeomatics.com> On 11-08-09 3:40 AM, Stephan Holl wrote: > > Ahh, I see. I will pull out a patch[1] and try to apply on trunk since I > have a recent trunk build-env. Reading the ticket seems the exact same > problem I am facing. Btw. GetFeatureInfo also returns the famous 500 > Premature End of script... error. > > Probably related. Hi Stephan, Is this your own compiled version of MapServer? If yes: I wonder if you could try your same tests with MS4W 3.0.3? Does the same issue occur? If no: what package are you using? Have you tried a different package to see if it can be duplicated? Thanks. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ From Steve.Toutant at inspq.qc.ca Tue Aug 9 04:48:39 2011 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Tue, 9 Aug 2011 07:48:39 -0400 Subject: RE [mapserver-users] mapserver tilecache In-Reply-To: <632d73a9.9c89.131adb814ee.Coremail.xiaoshitou1986126@126.com> Message-ID: htdocs instead of htodcs.... You can use firebug to see the network errors steve ??? @lists.osgeo.org Envoy? par : mapserver-users-bounces at lists.osgeo.org 2011-08-09 04:45 A mapserver-users at lists.osgeo.org cc Objet [mapserver-users] mapserver tilecache I has wrote a mapfile. It can be published successfully with openlayers. But its speed is very slow. So I try to use tilecache to improve the speed. now I have install the tilecache, and it can run with the example.But it doesn't run with my mapfile. Here is the program [road] type=WMS url=http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htodcs/file/jia1_test.map&transparent=true& layers=build,street extension=png bbox=-180 -90 180 90 maxResolution=0.0439453 srs=EPSG:4326 level=20 the html as follow: layer = new OpenLayers.Layer.WMS( "global", "http://localhost/tilecache-2.10/tilecache.py?", {layers: 'build,street', format: 'image/png' } ); map.addLayer(layer); Anyone can help me,thanks!!! _______________________________________________ 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 david.fawcett at state.mn.us Tue Aug 9 06:38:21 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Tue, 9 Aug 2011 08:38:21 -0500 Subject: [mapserver-users] WFS Spatial Filter Problem In-Reply-To: <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> Message-ID: Bryan, For testing, I would enable debugging at the MAP or LAYER level. If you set DEBUG 5, I think that you should be able to see the query that MapServer is crafting. More on debugging here: http://mapserver.org/optimization/debugging.html#debugging David. From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Bryan Hempen Sent: Tuesday, August 09, 2011 4:15 AM Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] WFS Spatial Filter Problem Dear Kai and Assefa, After you two guys requested me to send you my setup, I exported the content in the databasetable to a shapefile so you can test it. When I tested the spatial filter right after that, it suddenly worked ! This narrows down the possibilities: - The request I send is definitely not the problem anymore. It works with MapServer + shapefile and with GeoServer. - I exported only the geometries to the shapefile in the table with geometrytype = POLYGON because from ~8000 geometries ~10 are linestrings. So I investigated possible problems with the linestring geometries by telling the MapServer not to serve them using a subquery in the mapfile: DATA "the_geom from (select * from alldata where geometrytype(the_geom) = 'POLYGON') as subquery using unique product_id using SRID=4326" Error 500 still occured. Therefore, the data can't be the problem neither, right? - Since I didn't change anything else MapServer must have problems communicating with the PostGIS database, but why Error 500 then? Here is my mapfile: MAP NAME "WFS Server" STATUS ON SIZE 600 400 SYMBOLSET "/var/www/html/psa/bhempen/mapservertest/symbols/symbols.sym" EXTENT -180 -90 180 90 UNITS DD SHAPEPATH "/var/www/html/psa/bhempen/mapservertest/data/" IMAGECOLOR 255 255 255 FONTSET "/var/www/html/psa/bhempen/mapservertest/fonts/fonts.list" MAXSIZE 4096 # needs to be set because otherwise an error will appear when rendering images on large screens #IMAGECOLOR 200 200 200 #commented out for WFS PROJECTION 'init=epsg:4326' END WEB TEMPLATE '/var/www/html/psa/bhempen/mapservertest/template.html' IMAGEPATH '/var/www/html/psa/bhempen/tmp/' IMAGEURL '/psa/bhempen/tmp/' METADATA "wfs_title" "WFS Demo Server for MapServer" ## REQUIRED "wfs_onlineresource" "http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.map&" ## Recommended "wfs_srs" "EPSG:4326" ## Recommended "wfs_abstract" "This text describes my WFS service." ## Recommended END END LAYER NAME "omega" STATUS DEFAULT TYPE POLYGON METADATA "wfs_title" "omega footprints" ##REQUIRED "wfs_srs" "EPSG:4326" ## REQUIRED "gml_include_items" "all" ## Optional (serves all attributes for layer) "gml_featureid" "product_id" ## REQUIRED END PROJECTION "init=epsg:4326" END CONNECTIONTYPE POSTGIS CONNECTION "host=localhost port=xxx dbname=xxx user=xxx password=xxx" DATA "the_geom from alldata using unique product_id using SRID=4326" CLASS STYLE OUTLINECOLOR 125 0 0 END END DUMP TRUE ## REQUIRED END # layer END Does anyone see a problem with the setup? Many thanks to Kai and Assefa for the help so far! I am going to send you the shapefile (which you could import into the database with pgsql2shp), the mapfile, and my client. Kind regards, Bryan ================================================================================================ This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. ================================================================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephan.holl at intevation.de Tue Aug 9 08:08:20 2011 From: stephan.holl at intevation.de (Stephan Holl) Date: Tue, 9 Aug 2011 17:08:20 +0200 Subject: [mapserver-users] ArcSDE, Win32 and truncated GetCapabilities In-Reply-To: <4E4120D4.2040204@gatewaygeomatics.com> References: <20110728101514.18c2b013@thoe.hq.intevation.de> <20110808113001.19f29464@thoe.hq.intevation.de> <20110809084001.21a1d645@thoe.hq.intevation.de> <4E4120D4.2040204@gatewaygeomatics.com> Message-ID: <20110809170820.2b34f396@keto> Hallo Jeff, Jeff McKenna , [20110809 - 08:58:12] > On 11-08-09 3:40 AM, Stephan Holl wrote: > > > > Ahh, I see. I will pull out a patch[1] and try to apply on trunk > > since I have a recent trunk build-env. Reading the ticket seems the > > exact same problem I am facing. Btw. GetFeatureInfo also returns > > the famous 500 Premature End of script... error. > > > > Probably related. > > Hi Stephan, > > Is this your own compiled version of MapServer? yes, I compile it by myself based on a trunk-checkout using the SDK provided by Tamas. > If yes: I wonder if you could try your same tests with MS4W 3.0.3? > Does the same issue occur? I could test for sure, but I am afraid not within this week though. I put it on my list. AFAIK ArcSDE-Support is built in MS4W (which I will need though). > > If no: what package are you using? Have you tried a different > package to see if it can be duplicated? What packages do you mean? Best Stephan -- Stephan Holl | Tel.: +49 (0)541-33 508 3663 Intevation GmbH, Neuer Graben 17, 49074 OS | AG Osnabr?ck - HR B 18998 Gesch?ftsf?hrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From mark.kelly228 at googlemail.com Tue Aug 9 08:30:36 2011 From: mark.kelly228 at googlemail.com (mark.kelly228 at googlemail.com) Date: Tue, 09 Aug 2011 15:30:36 +0000 Subject: [mapserver-users] Class transparent Message-ID: <0015174c1c04d2005304aa143ee5@google.com> Hello, I'ma mapserver beginner. I want to set a class (buffer about hydrant) in a layer transparent. Can I do this with "OPACITY 50"? Or in the Symbol File? When yes, where in a mapfile? Greets Mark Kellermann -------------- next part -------------- An HTML attachment was scrubbed... URL: From msubedee at yahoo.com Tue Aug 9 12:35:19 2011 From: msubedee at yahoo.com (Mukesh Subedee) Date: Tue, 9 Aug 2011 12:35:19 -0700 (PDT) Subject: [mapserver-users] problem running python mapscript Message-ID: <1312918519.8379.YahooMailNeo@web161425.mail.bf1.yahoo.com> Hi all, ? I've successfully build and install Python MapScript (I get some warnings while building?but I don't get any errors). I am trying to run a?simple application?testing Python MapScript given in Bill Kropla's book. I am able to execute my pytest.py script in command line and can see the generated image in /tmp directory but while I tried using browser (IE 8)?to execute it, it just prints my code and doesn't generate image in /tmp directory as well. I don't think I need to make any configuration changes in CGI for execution of the script. Does anyone has idea about the problem? ? Here is my pytest.py and?hello.map file.? ? #!/usr/bin/python import cgi import mapscript import random image_name = "helloworld.png" map = mapscript.mapObj (/home/public_html/map_server/pytest.map) img=map.draw() img.save("/home/public_html/map_server/tmp/" + image_name) print "Content-type: text/html" print print "" print "
Python Mapscript Test
" print "" print """
""" % image_name print "" print "" ? my hello.map is: ? MAP ??????? NAME "hello_world" ??????? SIZE 400 300 ??????? EXTENT -1.00 -1.00 1.00 1.00 ??????? IMAGECOLOR 180 180 250 ??????? IMAGETYPE PNG ??????? WEB ??????????????? TEMPLATE "/home/public_html/pytest.py" ??????????????? IMAGEPATH "/home/public_html/map_server/tmp/" ??????????????? IMAGEURL "/tmp/" ??????? END ??????? LAYER ??????????????? TYPE point ??????????????? STATUS DEFAULT ??????????????? FEATURE ??????????????????????? POINTS 0.0 0.0 END ??????????????????????? TEXT "Hello World" ??????????????? END ??????????????? CLASS ??????????????????????? STYLE ??????????????????????????????? COLOR 255 0 0 ??????????????????????? END ??????????????????????? LABEL ??????????????????????????????? TYPE bitmap ??????????????????????? END ??????????????? END ??????? END END -------------- next part -------------- An HTML attachment was scrubbed... URL: From bteluk at gmail.com Tue Aug 9 18:10:51 2011 From: bteluk at gmail.com (bteluk at gmail.com) Date: Tue, 9 Aug 2011 18:10:51 -0700 (PDT) Subject: [mapserver-users] WFS Client through Proxy and HTTP Authentication Message-ID: <1312938651594-6670451.post@n2.nabble.com> Hi, I have MapServer 5.6.0 running on RHEL5.5 (FGS9.5 MapServer package) I'm behind a proxy (NTLM), and I want to access a WFS source outside that requires HTTP Authentication. I'm using a WFS Client setup in my Map file, and I'm accessing my MapServer using WFS too - eg. a WFS Client... all up a sort of WFS Relay. I can do it fine with WMS, however, I can't get it to work with WFS - is it actually supposed to work? (not documented in the manual.) I tried using "ows_" prefixed METADATA which works fine with WMS (to the same service.) Here's my map file extract: LAYER NAME "TempDryBulb" TYPE RASTER STATUS ON DEBUG ON CONNECTIONTYPE WMS CONNECTION "http://reg.bom.gov.au/cgi-bin/reg/ws/gis/users/bomg0022/wxs?" METADATA # Source Data "wfs_connectiontimeout" "30" "wfs_maxfeatures" "10" "wfs_typename" "IDY03103_dryblb" "wfs_version" "1.0.0" "wfs_srs" "EPSG:4283" # Source Auth "ows_auth_username" "mybomuser" "ows_auth_password" "{secrethere}" "ows_auth_type" "basic" # EDN Proxy Auth "ows_proxy_auth_type" "ntlm" "ows_proxy_host" "httpgw.mycompany.com.au" "ows_proxy_port" "8080" "ows_proxy_type" "http" "ows_proxy_username" "myuser" "ows_proxy_password" "{secrethere}" # Layer Outgoing Metadata "wfs_title" "TempDryBulbWFS" END # METADATA ... Here's my errors: [Tue Aug 9 14:01:18 2011].368922 HTTP: Starting to prepare HTTP requests. [Tue Aug 9 14:01:18 2011].369001 Using CURL_CA_BUNDLE=/home/maptools/fgs/share/curl/cacert.pem [Tue Aug 9 14:01:18 2011].369101 HTTP request: id=0, http://reg.bom.gov.au/cgi-bin/reg/ws/gis/users/bomg0022/wxs? [Tue Aug 9 14:01:18 2011].369260 HTTP: Before download loop [Tue Aug 9 14:01:18 2011].373358 HTTP: After download loop [Tue Aug 9 14:01:18 2011].373370 msHTTPExecuteRequests() timing summary per layer (connect_time + time_to_first_packet + download_time = total_time in seconds) [Tue Aug 9 14:01:18 2011].373378 HTTP: request failed with curl error code 6 (Couldn't resolve host 'reg.bom.gov.au') for http://reg.bom.gov.au/cgi-bin/reg/ws/gis/users/bomg0022/wxs?[Tue Aug 9 14:01:18 2011].373387 msHTTPExecuteRequests(): HTTP request error. HTTP: request failed with curl error code 6 (Couldn't resolve host 'reg.bom.gov.au') for http://reg.bom.gov.au/cgi-bin/reg/ws/gis/users/bomg0022/wxs? [Tue Aug 9 14:01:18 2011].373414 Layer 0: 0.000 + 0.000 + 0.000 = 0.000s [Tue Aug 9 14:01:18 2011].373584 msWFSLayerWhichShapes(): WFS connection error. Got HTTP status -6 downloading WFS layer TempDryBulbWFS [Tue Aug 9 14:01:18 2011].374109 msWFSLayerWhichShapes(): WFS connection error. Got HTTP status -6 downloading WFS layer TempDryBulbWFS [Tue Aug 9 14:01:18 2011].374124 msWFSGetFeature(): WFS server error. ms_error->code not found Note: I used msencrypt for the passwords, and these did work fine for WMS. Note2: using wget or curl from the command line on the server works fine (with the proxy credentials specified.) Thanks in advance! Regards, Bill Teluk ----- Regards, Bill Teluk -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-Client-through-Proxy-and-HTTP-Authentication-tp6670451p6670451.html Sent from the Mapserver - User mailing list archive at Nabble.com. From dmorissette at mapgears.com Tue Aug 9 18:49:46 2011 From: dmorissette at mapgears.com (Daniel Morissette) Date: Tue, 09 Aug 2011 21:49:46 -0400 Subject: [mapserver-users] WFS Client through Proxy and HTTP Authentication In-Reply-To: <1312938651594-6670451.post@n2.nabble.com> References: <1312938651594-6670451.post@n2.nabble.com> Message-ID: <4E41E3BA.8050408@mapgears.com> The error message says: "Couldn't resolve host 'reg.bom.gov.au'" Make sure this hostname does resolve on the machine running MapServer, that is has proper DNS config, etc. You could also try using the actual IP address instead of the hostname in the CONNECTION string to confirm that this is indeed the problem. Daniel On 11-08-09 09:10 PM, bteluk at gmail.com wrote: > Hi, > > I have MapServer 5.6.0 running on RHEL5.5 (FGS9.5 MapServer package) > > I'm behind a proxy (NTLM), and I want to access a WFS source outside that > requires HTTP Authentication. I'm using a WFS Client setup in my Map file, > and I'm accessing my MapServer using WFS too - eg. a WFS Client... all up a > sort of WFS Relay. > > I can do it fine with WMS, however, I can't get it to work with WFS - is it > actually supposed to work? (not documented in the manual.) I tried using > "ows_" prefixed METADATA which works fine with WMS (to the same service.) > > Here's my map file extract: > LAYER > NAME "TempDryBulb" > TYPE RASTER > STATUS ON > DEBUG ON > CONNECTIONTYPE WMS > CONNECTION "http://reg.bom.gov.au/cgi-bin/reg/ws/gis/users/bomg0022/wxs?" > METADATA > # Source Data > "wfs_connectiontimeout" "30" > "wfs_maxfeatures" "10" > "wfs_typename" "IDY03103_dryblb" > "wfs_version" "1.0.0" > "wfs_srs" "EPSG:4283" > > # Source Auth > "ows_auth_username" "mybomuser" > "ows_auth_password" "{secrethere}" > "ows_auth_type" "basic" > > # EDN Proxy Auth > "ows_proxy_auth_type" "ntlm" > "ows_proxy_host" "httpgw.mycompany.com.au" > "ows_proxy_port" "8080" > "ows_proxy_type" "http" > "ows_proxy_username" "myuser" > "ows_proxy_password" "{secrethere}" > > # Layer Outgoing Metadata > "wfs_title" "TempDryBulbWFS" > END # METADATA > ... > > Here's my errors: > [Tue Aug 9 14:01:18 2011].368922 HTTP: Starting to prepare HTTP requests. > [Tue Aug 9 14:01:18 2011].369001 Using > CURL_CA_BUNDLE=/home/maptools/fgs/share/curl/cacert.pem > [Tue Aug 9 14:01:18 2011].369101 HTTP request: id=0, > http://reg.bom.gov.au/cgi-bin/reg/ws/gis/users/bomg0022/wxs? > [Tue Aug 9 14:01:18 2011].369260 HTTP: Before download loop > [Tue Aug 9 14:01:18 2011].373358 HTTP: After download loop > [Tue Aug 9 14:01:18 2011].373370 msHTTPExecuteRequests() timing summary per > layer (connect_time + time_to_first_packet + download_time = total_time in > seconds) > [Tue Aug 9 14:01:18 2011].373378 HTTP: request failed with curl error code > 6 (Couldn't resolve host 'reg.bom.gov.au') for > http://reg.bom.gov.au/cgi-bin/reg/ws/gis/users/bomg0022/wxs?[Tue Aug 9 > 14:01:18 2011].373387 msHTTPExecuteRequests(): HTTP request error. HTTP: > request failed with curl error code 6 (Couldn't resolve host > 'reg.bom.gov.au') for > http://reg.bom.gov.au/cgi-bin/reg/ws/gis/users/bomg0022/wxs? > [Tue Aug 9 14:01:18 2011].373414 Layer 0: 0.000 + 0.000 + 0.000 = 0.000s > [Tue Aug 9 14:01:18 2011].373584 msWFSLayerWhichShapes(): WFS connection > error. Got HTTP status -6 downloading WFS layer TempDryBulbWFS > [Tue Aug 9 14:01:18 2011].374109 msWFSLayerWhichShapes(): WFS connection > error. Got HTTP status -6 downloading WFS layer TempDryBulbWFS > [Tue Aug 9 14:01:18 2011].374124 msWFSGetFeature(): WFS server error. > ms_error->code not found > > Note: I used msencrypt for the passwords, and these did work fine for WMS. > > Note2: using wget or curl from the command line on the server works fine > (with the proxy credentials specified.) > > Thanks in advance! > Regards, Bill Teluk > > ----- > Regards, Bill Teluk > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-Client-through-Proxy-and-HTTP-Authentication-tp6670451p6670451.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 -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From bteluk at gmail.com Tue Aug 9 19:29:13 2011 From: bteluk at gmail.com (bteluk at gmail.com) Date: Tue, 9 Aug 2011 19:29:13 -0700 (PDT) Subject: [mapserver-users] Re: WFS Client through Proxy and HTTP Authentication In-Reply-To: <4E41E3BA.8050408@mapgears.com> References: <1312938651594-6670451.post@n2.nabble.com> <4E41E3BA.8050408@mapgears.com> Message-ID: <1312943353585-6670606.post@n2.nabble.com> Thanks Daniel, I can't get the actual IP because I'm behind a proxy, on an intranet. But I know the proxy can correctly resolve the URL, because it works fine when I send a WMS request into my server (which then successfully sends a WMS request back out to the external source.) Likewise if I manually generate the WFS requests on the server using curl, it works fine (noting that I have to specify the proxy name and credentials.) It seems as if something is preventing the WFS request from using the same "proxy handling" metadata as per the WMS request. I've checked the curl installation and it certainly works using manual parameters for the proxy to the same external WFS URL. I've tried a packet trace whilst sending the request to my map server - for WMS, I can that it performs look-ups to the local DNS for the proxy and then communicates with the proxy from then on for the rest of the transaction (expected behaviour.) But for WFS, it doesn't attempt a DNS lookup for the proxy or even connect to it - it just tries to get the WFS request out using the local DNS - which fails of course because I'm in an intranet environment where the DNS can't see the Internet. I've attached my full map file - the WMS is a separate layer and works fine. The "localhost:20080" references are to overcome the server being behind a private network within the Intranet - localhost:20080 is a PuTTY tunnel to access the server - the server itself can get out to the Internet fine when using proxy & credentials. Regards, Bill Teluk http://osgeo-org.1803224.n2.nabble.com/file/n6670606/bom.map bom.map ----- Regards, Bill Teluk -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-Client-through-Proxy-and-HTTP-Authentication-tp6670451p6670606.html Sent from the Mapserver - User mailing list archive at Nabble.com. From dmorissette at mapgears.com Tue Aug 9 20:49:13 2011 From: dmorissette at mapgears.com (Daniel Morissette) Date: Tue, 09 Aug 2011 23:49:13 -0400 Subject: [mapserver-users] Re: WFS Client through Proxy and HTTP Authentication In-Reply-To: <1312943353585-6670606.post@n2.nabble.com> References: <1312938651594-6670451.post@n2.nabble.com> <4E41E3BA.8050408@mapgears.com> <1312943353585-6670606.post@n2.nabble.com> Message-ID: <4E41FFB9.8030001@mapgears.com> Hi Bill, It turns out that proxy and auth support is not implemented in the WFS client layer code. It is only present in the WMS layer code. I have created a ticket for this and attached an untested patch to it: http://trac.osgeo.org/mapserver/ticket/3982 The final fix will require a cleaner job, but this quick patch should work if you are able to build from source. Daniel On 11-08-09 10:29 PM, bteluk at gmail.com wrote: > Thanks Daniel, > > I can't get the actual IP because I'm behind a proxy, on an intranet. But I > know the proxy can correctly resolve the URL, because it works fine when I > send a WMS request into my server (which then successfully sends a WMS > request back out to the external source.) Likewise if I manually generate > the WFS requests on the server using curl, it works fine (noting that I have > to specify the proxy name and credentials.) > > It seems as if something is preventing the WFS request from using the same > "proxy handling" metadata as per the WMS request. I've checked the curl > installation and it certainly works using manual parameters for the proxy to > the same external WFS URL. > > I've tried a packet trace whilst sending the request to my map server - for > WMS, I can that it performs look-ups to the local DNS for the proxy and then > communicates with the proxy from then on for the rest of the transaction > (expected behaviour.) But for WFS, it doesn't attempt a DNS lookup for the > proxy or even connect to it - it just tries to get the WFS request out using > the local DNS - which fails of course because I'm in an intranet environment > where the DNS can't see the Internet. > > I've attached my full map file - the WMS is a separate layer and works fine. > The "localhost:20080" references are to overcome the server being behind a > private network within the Intranet - localhost:20080 is a PuTTY tunnel to > access the server - the server itself can get out to the Internet fine when > using proxy& credentials. > > Regards, Bill Teluk > http://osgeo-org.1803224.n2.nabble.com/file/n6670606/bom.map bom.map > > ----- > Regards, Bill Teluk > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-Client-through-Proxy-and-HTTP-Authentication-tp6670451p6670606.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 -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From bteluk at gmail.com Tue Aug 9 22:50:03 2011 From: bteluk at gmail.com (bteluk at gmail.com) Date: Tue, 9 Aug 2011 22:50:03 -0700 (PDT) Subject: [mapserver-users] Re: WFS Client through Proxy and HTTP Authentication In-Reply-To: <4E41FFB9.8030001@mapgears.com> References: <1312938651594-6670451.post@n2.nabble.com> <4E41E3BA.8050408@mapgears.com> <1312943353585-6670606.post@n2.nabble.com> <4E41FFB9.8030001@mapgears.com> Message-ID: <1312955403822-6671111.post@n2.nabble.com> Hi Daniel, Thanks for confirming the problem - now I know it's not a fault with my config. Much appreciated! Thanks very much for writing a patch so quickly - I'm not able to take advantage of it immediately but I may be able to, further down the track. Regards, Bill Teluk. Daniel Morissette wrote: > > Hi Bill, > > It turns out that proxy and auth support is not implemented in the WFS > client layer code. It is only present in the WMS layer code. > > I have created a ticket for this and attached an untested patch to it: > http://trac.osgeo.org/mapserver/ticket/3982 > > The final fix will require a cleaner job, but this quick patch should > work if you are able to build from source. > > Daniel > > > On 11-08-09 10:29 PM, bteluk at gmail.com wrote: >> Thanks Daniel, >> >> I can't get the actual IP because I'm behind a proxy, on an intranet. >> But I >> know the proxy can correctly resolve the URL, because it works fine when >> I >> send a WMS request into my server (which then successfully sends a WMS >> request back out to the external source.) Likewise if I manually >> generate >> the WFS requests on the server using curl, it works fine (noting that I >> have >> to specify the proxy name and credentials.) >> >> It seems as if something is preventing the WFS request from using the >> same >> "proxy handling" metadata as per the WMS request. I've checked the curl >> installation and it certainly works using manual parameters for the proxy >> to >> the same external WFS URL. >> >> I've tried a packet trace whilst sending the request to my map server - >> for >> WMS, I can that it performs look-ups to the local DNS for the proxy and >> then >> communicates with the proxy from then on for the rest of the transaction >> (expected behaviour.) But for WFS, it doesn't attempt a DNS lookup for >> the >> proxy or even connect to it - it just tries to get the WFS request out >> using >> the local DNS - which fails of course because I'm in an intranet >> environment >> where the DNS can't see the Internet. >> >> I've attached my full map file - the WMS is a separate layer and works >> fine. >> The "localhost:20080" references are to overcome the server being behind >> a >> private network within the Intranet - localhost:20080 is a PuTTY tunnel >> to >> access the server - the server itself can get out to the Internet fine >> when >> using proxy& credentials. >> >> Regards, Bill Teluk >> http://osgeo-org.1803224.n2.nabble.com/file/n6670606/bom.map bom.map >> >> ----- >> Regards, Bill Teluk >> -- >> View this message in context: >> http://osgeo-org.1803224.n2.nabble.com/WFS-Client-through-Proxy-and-HTTP-Authentication-tp6670451p6670606.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 > > > -- > Daniel Morissette > http://www.mapgears.com/ > Provider of Professional MapServer Support since 2000 > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > ----- Regards, Bill Teluk -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-Client-through-Proxy-and-HTTP-Authentication-tp6670451p6671111.html Sent from the Mapserver - User mailing list archive at Nabble.com. From yves.jacolin at camptocamp.com Wed Aug 10 02:17:05 2011 From: yves.jacolin at camptocamp.com (Yves Jacolin) Date: Wed, 10 Aug 2011 11:17:05 +0200 Subject: [mapserver-users] Re: [mapserver-dev] Proposed MapServer project additions... In-Reply-To: References: Message-ID: <201108101118.05286.yves.jacolin@camptocamp.com> Le mardi 09 ao?t 2011 08:25:45, Steve Lime a ?crit : > The next significant MapServer release would be dubbed "MapServer > Suite" and would contain all project components, that is, MapServer > CGI, MapServer MapScript, MapServer TinyOWS and MapServer MapCache. > > The PSC is excited about the possibilities for the project and our > users, and welcome any comments, questions or concerns regarding these > proposed changes. Users interested in following or participating in > MapServer development are encouraged to join the mapserver-dev mailing > list. This is really great! Really good addition :) Thanks, Y. -- Responsable Formation et Support Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel (France) : +33 4 79 26 57 98 Tel (Suisse) : +41 21 619 1031 Mob. : +33 6 18 75 42 21 Fax : 04 79 70 15 81 Mail : yves.jacolin at camptocamp.com http://www.camptocamp.com From jcigar at ulb.ac.be Wed Aug 10 03:04:12 2011 From: jcigar at ulb.ac.be (Julien Cigar) Date: Wed, 10 Aug 2011 12:04:12 +0200 Subject: [mapserver-users] SLD and LABEL MINDISTANCE ..? In-Reply-To: <4E4118AD.7070106@ulb.ac.be> References: <4E4118AD.7070106@ulb.ac.be> Message-ID: <4E42579C.8090407@ulb.ac.be> On 08/09/2011 13:23, Julien Cigar wrote: > Hello, > > I'm using SLD with a section for labeling my polygons > (this is what I have at the moment http://www.pastie.org/2344427). It > works well except that I miss the MINDISTANCE of the LABEL section and > wondered if there is a way to do it in the SLD ..? Does Mapserver > supports some that are undocumented? Is there a way to > "mix" a LABEL section (in the .map file) with the SLD? > > Thanks, > Julien > apparently it's not possible to use a SLD and CLASS/LABEL definitions together, when I specify a SLD my LABEL definition in my mapfile is simply ignored.. too bad :( > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. -------------- next part -------------- A non-text attachment was scrubbed... Name: jcigar.vcf Type: text/x-vcard Size: 292 bytes Desc: not available URL: From bhempen at sciops.esa.int Wed Aug 10 05:35:06 2011 From: bhempen at sciops.esa.int (Bryan Hempen) Date: Wed, 10 Aug 2011 14:35:06 +0200 Subject: [mapserver-users] WFS Spatial Filter Problem In-Reply-To: References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> Message-ID: <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> Hi David, I enabled debugging using the following settings: CONFIG "MS_ERRORFILE" "/home/bhempen/ms_error.txt" DEBUG 5 CONFIG "CPL_DEBUG" "ON" CONFIG "PROJ_DEBUG" "ON" The only line that shows up after I got an error 500 using the spatial filter is: [Wed Aug 10 14:30:46 2011].451858 CGI Request 1 on process 21100 Not really helpful, right? Regards, Bryan On 09/08/2011 15:38, Fawcett, David (MPCA) wrote: > > Bryan, > > For testing, I would enable debugging at the MAP or LAYER level. If > you set DEBUG 5, I think that you should be able to see the query that > MapServer is crafting. > > More on debugging here: > http://mapserver.org/optimization/debugging.html#debugging > > David. > > *From:*mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Bryan > Hempen > *Sent:* Tuesday, August 09, 2011 4:15 AM > *Cc:* mapserver-users at lists.osgeo.org > *Subject:* Re: [mapserver-users] WFS Spatial Filter Problem > > Dear Kai and Assefa, > > > > After you two guys requested me to send you my setup, I exported the > content in the databasetable to a shapefile so you can test it. When I > tested the spatial filter right after that, it suddenly worked ! This > narrows down the possibilities: > > - The request I send is definitely not the problem anymore. It works > with MapServer + shapefile and with GeoServer. > > - I exported only the geometries to the shapefile in the table with > geometrytype = POLYGON because from ~8000 geometries ~10 are > linestrings. So I investigated possible problems with the linestring > geometries by telling the MapServer not to serve them using a subquery > in the mapfile: > > DATA "the_geom from (select * from alldata where > geometrytype(the_geom) = 'POLYGON') as subquery using unique > product_id using SRID=4326" > > Error 500 still occured. Therefore, the data can't be the problem > neither, right? > > - Since I didn't change anything else MapServer must have problems > communicating with the PostGIS database, but why Error 500 then? > > Here is my mapfile: > > > MAP > NAME "WFS Server" > STATUS ON > SIZE 600 400 > SYMBOLSET > "/var/www/html/psa/bhempen/mapservertest/symbols/symbols.sym" > EXTENT -180 -90 180 90 > UNITS DD > SHAPEPATH "/var/www/html/psa/bhempen/mapservertest/data/" > IMAGECOLOR 255 255 255 > FONTSET "/var/www/html/psa/bhempen/mapservertest/fonts/fonts.list" > MAXSIZE 4096 # needs to be set because otherwise an error will > appear when rendering images on large screens > > > #IMAGECOLOR 200 200 200 #commented out for WFS > > PROJECTION > 'init=epsg:4326' > END > > WEB > TEMPLATE '/var/www/html/psa/bhempen/mapservertest/template.html' > IMAGEPATH '/var/www/html/psa/bhempen/tmp/' > IMAGEURL '/psa/bhempen/tmp/' > METADATA > "wfs_title" "WFS Demo Server for > MapServer" ## REQUIRED > "wfs_onlineresource" > "http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.map&" > ## > Recommended > "wfs_srs" "EPSG:4326" ## Recommended > "wfs_abstract" "This text describes my WFS > service." ## Recommended > END > END > > LAYER > NAME "omega" > STATUS DEFAULT > TYPE POLYGON > METADATA > "wfs_title" "omega footprints" ##REQUIRED > "wfs_srs" "EPSG:4326" ## REQUIRED > "gml_include_items" "all" ## Optional (serves all > attributes for layer) > "gml_featureid" "product_id" ## REQUIRED > END > PROJECTION > "init=epsg:4326" > END > CONNECTIONTYPE POSTGIS > CONNECTION "host=localhost port=xxx dbname=xxx user=xxx password=xxx" > DATA "the_geom from alldata using unique product_id using SRID=4326" > CLASS > STYLE > OUTLINECOLOR 125 0 0 > END > END > DUMP TRUE ## REQUIRED > END # layer > > END > > > Does anyone see a problem with the setup? > > Many thanks to Kai and Assefa for the help so far! I am going to send > you the shapefile (which you could import into the database with > pgsql2shp), the mapfile, and my client. > > Kind regards, > Bryan > > ================================================================================================ > This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, > > use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in > > error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by > > the sender. > > Please consider the environment before printing this email. > ================================================================================================= ================================================================================================ This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. ================================================================================================= -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcigar at ulb.ac.be Wed Aug 10 05:44:45 2011 From: jcigar at ulb.ac.be (Julien Cigar) Date: Wed, 10 Aug 2011 14:44:45 +0200 Subject: [mapserver-users] WFS Spatial Filter Problem In-Reply-To: <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> Message-ID: <4E427D3D.1020608@ulb.ac.be> Perhaps the problem comes from the HTTP server (wrong (Fast)CGI config, ...) ? Take a look at your your error.log On 08/10/2011 14:35, Bryan Hempen wrote: > Hi David, > > I enabled debugging using the following settings: > > CONFIG "MS_ERRORFILE" "/home/bhempen/ms_error.txt" > DEBUG 5 > CONFIG "CPL_DEBUG" "ON" > CONFIG "PROJ_DEBUG" "ON" > > The only line that shows up after I got an error 500 using the spatial > filter is: > > [Wed Aug 10 14:30:46 2011].451858 CGI Request 1 on process 21100 > > Not really helpful, right? > > Regards, > Bryan > > On 09/08/2011 15:38, Fawcett, David (MPCA) wrote: >> >> Bryan, >> >> For testing, I would enable debugging at the MAP or LAYER level. If >> you set DEBUG 5, I think that you should be able to see the query that >> MapServer is crafting. >> >> More on debugging here: >> http://mapserver.org/optimization/debugging.html#debugging >> >> David. >> >> *From:*mapserver-users-bounces at lists.osgeo.org >> [mailto:mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Bryan >> Hempen >> *Sent:* Tuesday, August 09, 2011 4:15 AM >> *Cc:* mapserver-users at lists.osgeo.org >> *Subject:* Re: [mapserver-users] WFS Spatial Filter Problem >> >> Dear Kai and Assefa, >> >> >> >> After you two guys requested me to send you my setup, I exported the >> content in the databasetable to a shapefile so you can test it. When I >> tested the spatial filter right after that, it suddenly worked ! This >> narrows down the possibilities: >> >> - The request I send is definitely not the problem anymore. It works >> with MapServer + shapefile and with GeoServer. >> >> - I exported only the geometries to the shapefile in the table with >> geometrytype = POLYGON because from ~8000 geometries ~10 are >> linestrings. So I investigated possible problems with the linestring >> geometries by telling the MapServer not to serve them using a subquery >> in the mapfile: >> >> DATA "the_geom from (select * from alldata where >> geometrytype(the_geom) = 'POLYGON') as subquery using unique >> product_id using SRID=4326" >> >> Error 500 still occured. Therefore, the data can't be the problem >> neither, right? >> >> - Since I didn't change anything else MapServer must have problems >> communicating with the PostGIS database, but why Error 500 then? >> >> Here is my mapfile: >> >> >> MAP >> NAME "WFS Server" >> STATUS ON >> SIZE 600 400 >> SYMBOLSET >> "/var/www/html/psa/bhempen/mapservertest/symbols/symbols.sym" >> EXTENT -180 -90 180 90 >> UNITS DD >> SHAPEPATH "/var/www/html/psa/bhempen/mapservertest/data/" >> IMAGECOLOR 255 255 255 >> FONTSET "/var/www/html/psa/bhempen/mapservertest/fonts/fonts.list" >> MAXSIZE 4096 # needs to be set because otherwise an error will >> appear when rendering images on large screens >> >> >> #IMAGECOLOR 200 200 200 #commented out for WFS >> >> PROJECTION >> 'init=epsg:4326' >> END >> >> WEB >> TEMPLATE '/var/www/html/psa/bhempen/mapservertest/template.html' >> IMAGEPATH '/var/www/html/psa/bhempen/tmp/' >> IMAGEURL '/psa/bhempen/tmp/' >> METADATA >> "wfs_title" "WFS Demo Server for >> MapServer" ## REQUIRED >> "wfs_onlineresource" >> "http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.map&" >> ## >> Recommended >> "wfs_srs" "EPSG:4326" ## Recommended >> "wfs_abstract" "This text describes my WFS >> service." ## Recommended >> END >> END >> >> LAYER >> NAME "omega" >> STATUS DEFAULT >> TYPE POLYGON >> METADATA >> "wfs_title" "omega footprints" ##REQUIRED >> "wfs_srs" "EPSG:4326" ## REQUIRED >> "gml_include_items" "all" ## Optional (serves all >> attributes for layer) >> "gml_featureid" "product_id" ## REQUIRED >> END >> PROJECTION >> "init=epsg:4326" >> END >> CONNECTIONTYPE POSTGIS >> CONNECTION "host=localhost port=xxx dbname=xxx user=xxx password=xxx" >> DATA "the_geom from alldata using unique product_id using SRID=4326" >> CLASS >> STYLE >> OUTLINECOLOR 125 0 0 >> END >> END >> DUMP TRUE ## REQUIRED >> END # layer >> >> END >> >> >> Does anyone see a problem with the setup? >> >> Many thanks to Kai and Assefa for the help so far! I am going to send >> you the shapefile (which you could import into the database with >> pgsql2shp), the mapfile, and my client. >> >> Kind regards, >> Bryan >> >> ================================================================================================ >> This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, >> >> use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in >> >> error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by >> >> the sender. >> >> Please consider the environment before printing this email. >> ================================================================================================= > > ================================================================================================ > This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, > > use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in > > error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by > > the sender. > > Please consider the environment before printing this email. > ================================================================================================= > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. -------------- next part -------------- A non-text attachment was scrubbed... Name: jcigar.vcf Type: text/x-vcard Size: 292 bytes Desc: not available URL: From Andreas.Eichner at sid.sachsen.de Wed Aug 10 06:16:58 2011 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID-NLKM) Date: Wed, 10 Aug 2011 15:16:58 +0200 Subject: AW: [mapserver-users] WFS Spatial Filter Problem References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net><32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> Message-ID: <56B587E7C40D2F43B54FDC1BA897AC6D037AF1DA@KS-EVS1.smi.sachsen.de> Hi, HTTP error code 500 means: Internal Server error and is usually reported when the (F)CGI process dies. Probably a simple NULL pointer dereference due to a missing check which results in a segmentation fault... Ever tried the thing with shp2img? If this also segfaults try recompiling with debug enabled and run it trough gdb. Greets. > -----Urspr?ngliche Nachricht----- > Von: mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag > von Bryan Hempen > Gesendet: Mittwoch, 10. August 2011 14:35 > An: Fawcett, David (MPCA) > Cc: mapserver-users at lists.osgeo.org > Betreff: Re: [mapserver-users] WFS Spatial Filter Problem > > Hi David, > > I enabled debugging using the following settings: > > CONFIG "MS_ERRORFILE" "/home/bhempen/ms_error.txt" > DEBUG 5 > CONFIG "CPL_DEBUG" "ON" > CONFIG "PROJ_DEBUG" "ON" > > The only line that shows up after I got an error 500 using > the spatial filter is: > > [Wed Aug 10 14:30:46 2011].451858 CGI Request 1 on process 21100 > > Not really helpful, right? > > Regards, > Bryan > > On 09/08/2011 15:38, Fawcett, David (MPCA) wrote: > > Bryan, > > > > For testing, I would enable debugging at the MAP or > LAYER level. If you set DEBUG 5, I think that you should be > able to see the query that MapServer is crafting. > > > > More on debugging here: > http://mapserver.org/optimization/debugging.html#debugging > > > > David. > > > > From: mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of > Bryan Hempen > Sent: Tuesday, August 09, 2011 4:15 AM > Cc: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] WFS Spatial Filter Problem > > > > Dear Kai and Assefa, > > > > > > After you two guys requested me to send you my setup, I > exported the content in the databasetable to a shapefile so > you can test it. When I tested the spatial filter right after > that, it suddenly worked ! This narrows down the possibilities: > > - The request I send is definitely not the problem > anymore. It works with MapServer + shapefile and with GeoServer. > > - I exported only the geometries to the shapefile in > the table with geometrytype = POLYGON because from ~8000 > geometries ~10 are linestrings. So I investigated possible > problems with the linestring geometries by telling the > MapServer not to serve them using a subquery in the mapfile: > > DATA "the_geom from (select * from alldata where > geometrytype(the_geom) = 'POLYGON') as subquery using unique > product_id using SRID=4326" > > Error 500 still occured. Therefore, the data can't be > the problem neither, right? > > - Since I didn't change anything else MapServer must > have problems communicating with the PostGIS database, but > why Error 500 then? > > Here is my mapfile: > > > MAP > NAME "WFS Server" > STATUS ON > SIZE 600 400 > SYMBOLSET > "/var/www/html/psa/bhempen/mapservertest/symbols/symbols.sym" > EXTENT -180 -90 180 90 > UNITS DD > SHAPEPATH "/var/www/html/psa/bhempen/mapservertest/data/" > IMAGECOLOR 255 255 255 > FONTSET > "/var/www/html/psa/bhempen/mapservertest/fonts/fonts.list" > MAXSIZE 4096 # needs to be set because otherwise an > error will appear when rendering images on large screens > > > #IMAGECOLOR 200 200 200 #commented out for WFS > > PROJECTION > 'init=epsg:4326' > END > > WEB > TEMPLATE > '/var/www/html/psa/bhempen/mapservertest/template.html' > IMAGEPATH '/var/www/html/psa/bhempen/tmp/' > IMAGEURL '/psa/bhempen/tmp/' > METADATA > "wfs_title" "WFS Demo > Server for MapServer" ## REQUIRED > "wfs_onlineresource" > "http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.ma > p&" > p&> ## Recommended > "wfs_srs" "EPSG:4326" ## > Recommended > "wfs_abstract" "This text > describes my WFS service." ## Recommended > END > END > > LAYER > NAME "omega" > STATUS DEFAULT > TYPE POLYGON > METADATA > "wfs_title" "omega footprints" ##REQUIRED > "wfs_srs" "EPSG:4326" ## REQUIRED > "gml_include_items" "all" ## Optional > (serves all attributes for layer) > "gml_featureid" "product_id" ## REQUIRED > END > PROJECTION > "init=epsg:4326" > END > CONNECTIONTYPE POSTGIS > CONNECTION "host=localhost port=xxx dbname=xxx > user=xxx password=xxx" > DATA "the_geom from alldata using unique product_id > using SRID=4326" > CLASS > STYLE > OUTLINECOLOR 125 0 0 > END > END > DUMP TRUE ## REQUIRED > END # layer > > END > > > > > Does anyone see a problem with the setup? > > Many thanks to Kai and Assefa for the help so far! I am > going to send you the shapefile (which you could import into > the database with pgsql2shp), the mapfile, and my client. > > Kind regards, > Bryan > > > ============================================================== > ================================== > This message and any attachments are intended for the > use of the addressee or addressees only. The unauthorised disclosure, > > use, dissemination or copying (either in whole or in > part) of its content is not permitted. If you received this > message in > > error, please notify the sender and delete it from your > system. Emails can be altered and their integrity cannot be > guaranteed by > > the sender. > > Please consider the environment before printing this email. > > ============================================================== > =================================== > > > ============================================================== > ================================== > This message and any attachments are intended for the use of > the addressee or addressees only. The unauthorised disclosure, > > use, dissemination or copying (either in whole or in part) of > its content is not permitted. If you received this message in > > error, please notify the sender and delete it from your > system. Emails can be altered and their integrity cannot be > guaranteed by > > the sender. > > Please consider the environment before printing this email. > ============================================================== > =================================== > From dmorissette at mapgears.com Wed Aug 10 08:52:57 2011 From: dmorissette at mapgears.com (Daniel Morissette) Date: Wed, 10 Aug 2011 11:52:57 -0400 Subject: [mapserver-users] WFS Spatial Filter Problem In-Reply-To: <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> Message-ID: <4E42A959.40401@mapgears.com> Looks like you checked the Apache error_log. With the config that you quoted, you should find the debug info in /home/bhempen/ms_error.txt. On 11-08-10 08:35 AM, Bryan Hempen wrote: > Hi David, > > I enabled debugging using the following settings: > > CONFIG "MS_ERRORFILE" "/home/bhempen/ms_error.txt" > DEBUG 5 > CONFIG "CPL_DEBUG" "ON" > CONFIG "PROJ_DEBUG" "ON" > > The only line that shows up after I got an error 500 using the spatial > filter is: > > [Wed Aug 10 14:30:46 2011].451858 CGI Request 1 on process 21100 > > Not really helpful, right? > > Regards, > Bryan > > On 09/08/2011 15:38, Fawcett, David (MPCA) wrote: >> >> Bryan, >> >> For testing, I would enable debugging at the MAP or LAYER level. If >> you set DEBUG 5, I think that you should be able to see the query that >> MapServer is crafting. >> >> More on debugging here: >> http://mapserver.org/optimization/debugging.html#debugging >> >> David. >> >> *From:*mapserver-users-bounces at lists.osgeo.org >> [mailto:mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Bryan >> Hempen >> *Sent:* Tuesday, August 09, 2011 4:15 AM >> *Cc:* mapserver-users at lists.osgeo.org >> *Subject:* Re: [mapserver-users] WFS Spatial Filter Problem >> >> Dear Kai and Assefa, >> >> >> >> After you two guys requested me to send you my setup, I exported the >> content in the databasetable to a shapefile so you can test it. When I >> tested the spatial filter right after that, it suddenly worked ! This >> narrows down the possibilities: >> >> - The request I send is definitely not the problem anymore. It works >> with MapServer + shapefile and with GeoServer. >> >> - I exported only the geometries to the shapefile in the table with >> geometrytype = POLYGON because from ~8000 geometries ~10 are >> linestrings. So I investigated possible problems with the linestring >> geometries by telling the MapServer not to serve them using a subquery >> in the mapfile: >> >> DATA "the_geom from (select * from alldata where >> geometrytype(the_geom) = 'POLYGON') as subquery using unique >> product_id using SRID=4326" >> >> Error 500 still occured. Therefore, the data can't be the problem >> neither, right? >> >> - Since I didn't change anything else MapServer must have problems >> communicating with the PostGIS database, but why Error 500 then? >> >> Here is my mapfile: >> >> >> MAP >> NAME "WFS Server" >> STATUS ON >> SIZE 600 400 >> SYMBOLSET >> "/var/www/html/psa/bhempen/mapservertest/symbols/symbols.sym" >> EXTENT -180 -90 180 90 >> UNITS DD >> SHAPEPATH "/var/www/html/psa/bhempen/mapservertest/data/" >> IMAGECOLOR 255 255 255 >> FONTSET "/var/www/html/psa/bhempen/mapservertest/fonts/fonts.list" >> MAXSIZE 4096 # needs to be set because otherwise an error will >> appear when rendering images on large screens >> >> >> #IMAGECOLOR 200 200 200 #commented out for WFS >> >> PROJECTION >> 'init=epsg:4326' >> END >> >> WEB >> TEMPLATE '/var/www/html/psa/bhempen/mapservertest/template.html' >> IMAGEPATH '/var/www/html/psa/bhempen/tmp/' >> IMAGEURL '/psa/bhempen/tmp/' >> METADATA >> "wfs_title" "WFS Demo Server for >> MapServer" ## REQUIRED >> "wfs_onlineresource" >> "http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.map&" >> ## >> Recommended >> "wfs_srs" "EPSG:4326" ## Recommended >> "wfs_abstract" "This text describes my WFS >> service." ## Recommended >> END >> END >> >> LAYER >> NAME "omega" >> STATUS DEFAULT >> TYPE POLYGON >> METADATA >> "wfs_title" "omega footprints" ##REQUIRED >> "wfs_srs" "EPSG:4326" ## REQUIRED >> "gml_include_items" "all" ## Optional (serves all >> attributes for layer) >> "gml_featureid" "product_id" ## REQUIRED >> END >> PROJECTION >> "init=epsg:4326" >> END >> CONNECTIONTYPE POSTGIS >> CONNECTION "host=localhost port=xxx dbname=xxx user=xxx password=xxx" >> DATA "the_geom from alldata using unique product_id using SRID=4326" >> CLASS >> STYLE >> OUTLINECOLOR 125 0 0 >> END >> END >> DUMP TRUE ## REQUIRED >> END # layer >> >> END >> >> >> Does anyone see a problem with the setup? >> >> Many thanks to Kai and Assefa for the help so far! I am going to send >> you the shapefile (which you could import into the database with >> pgsql2shp), the mapfile, and my client. >> >> Kind regards, >> Bryan >> >> ================================================================================================ >> This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, >> >> use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in >> >> error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by >> >> the sender. >> >> Please consider the environment before printing this email. >> ================================================================================================= > > ================================================================================================ > This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, > > use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in > > error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by > > the sender. > > Please consider the environment before printing this email. > ================================================================================================= > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From michael.gajda at tu-dortmund.de Wed Aug 10 16:41:49 2011 From: michael.gajda at tu-dortmund.de (Michael G.) Date: Thu, 11 Aug 2011 01:41:49 +0200 Subject: [mapserver-users] Meaning of PROJECTION and WMS - using OpenLayers Message-ID: <4E43173D.5010807@tu-dortmund.de> Hi, since a couple of days we try visualize data from a postgis database using mapserver and openlayers. As far as we know is our postgis data in EPSG:25832 and our mapfile for mapserver looks like this: http://dpaste.com/hold/591626/ Now we have created an index.html containing the following JS snippet: http://dpaste.com/hold/591627/ We can test the WMS using a direct WMS URL to our MapServer and asking for EPSG:25832 and the correct extends, and it displays the map just fine (Everything is protected so I cannot provide this URL here). If we try to display the map using the openlayers code above we do not see anything at all. You can zoom and move it around but that's everthing you get with openlayers. Networkdebugging tools tell me, that OpenLayers by default is requesting that google projection of EPSG:3867. But even providing coordinates that should somehow be in Dortmund it does only display the backgroundcolor. Maybe you can help me clearing up a few things. Like the list of projections in 'wms_srs' is what MapServer provides via WMS. And the PROJECTION entry on the 'LAYER' level should be set to the projection of my data. Correct? And the PROJECTION on the MAP level is ignored? Does MapServer automatically convert the coordinates? MapServer requires to have EXTEND set. Which projection should I use? The one defined at MAP level? Best regards, Michael From Robert.Sanson at asurequality.com Wed Aug 10 17:06:50 2011 From: Robert.Sanson at asurequality.com (Robert Sanson) Date: Thu, 11 Aug 2011 12:06:50 +1200 Subject: [mapserver-users] Meaning of PROJECTION and WMS - using OpenLayers In-Reply-To: <4E43173D.5010807@tu-dortmund.de> References: <4E43173D.5010807@tu-dortmund.de> Message-ID: <4E43C5D9.379F.0037.1@asurequality.com> Dear Michael You need to tell OL which projection to request in within the map object. This is how I do it: var mapoptions = { maxExtent: new OpenLayers.Bounds(773500, 4555450, 2602100, 6384050), units: 'm', projection: "EPSG:2193", }; map = new OpenLayers.Map( 'map',mapoptions ); Then my layer is something like this: var topochwms = new OpenLayers.Layer.WMS( "Topos (Chathams)", "http://myserver/cgi-bin/gsswms.exe?", {layers: ['ci250k','ci50kcitm'], transparent: 'true',format: "image/png"}, {singleTile: true, isBaseLayer: true, visibility: true} ); map.addLayer(topochwms); regards, Robert >>> "Michael G." 11/08/2011 11:41 a.m. >>> Hi, since a couple of days we try visualize data from a postgis database using mapserver and openlayers. As far as we know is our postgis data in EPSG:25832 and our mapfile for mapserver looks like this: http://dpaste.com/hold/591626/ Now we have created an index.html containing the following JS snippet: http://dpaste.com/hold/591627/ We can test the WMS using a direct WMS URL to our MapServer and asking for EPSG:25832 and the correct extends, and it displays the map just fine (Everything is protected so I cannot provide this URL here). If we try to display the map using the openlayers code above we do not see anything at all. You can zoom and move it around but that's everthing you get with openlayers. Networkdebugging tools tell me, that OpenLayers by default is requesting that google projection of EPSG:3867. But even providing coordinates that should somehow be in Dortmund it does only display the backgroundcolor. Maybe you can help me clearing up a few things. Like the list of projections in 'wms_srs' is what MapServer provides via WMS. And the PROJECTION entry on the 'LAYER' level should be set to the projection of my data. Correct? And the PROJECTION on the MAP level is ignored? Does MapServer automatically convert the coordinates? MapServer requires to have EXTEND set. Which projection should I use? The one defined at MAP level? Best regards, Michael _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users This email and any attachments are confidential and intended solely for the addressee(s). If you are not the intended recipient, please notify us immediately and then delete this email from your system. This message has been scanned for Malware and Viruses by Websense Hosted Security. www.websense.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ahmettemiz88 at gmail.com Thu Aug 11 01:03:56 2011 From: ahmettemiz88 at gmail.com (ahmet temiz) Date: Thu, 11 Aug 2011 11:03:56 +0300 Subject: [mapserver-users] googleMap as a base layer Message-ID: hello I was wondering if it was possible to integrate googlemap to mapserver a layer ? regards -- Ahmet Temiz Jeoloji M?h. Afet ve Acil Durum Y?netimi Ba?kanl??? Planlama ve Zarar Azaltma Dairesi Ba?kanl??? Bilgi ve CBS grubu Eski?ehir Yolu 10. km. Lodumlu / Ankara Tel : 0 312 2872680 / 1535 ________________________ Ahmet Temiz Geological Eng. Information Systems - GIS Group Disaster and Emergency Management of Presidency From thomas.bonfort at gmail.com Thu Aug 11 01:07:19 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 11 Aug 2011 10:07:19 +0200 Subject: [mapserver-users] googleMap as a base layer In-Reply-To: References: Message-ID: no, the google maps terms of service explicitely deny this kind of usage (this limitation is probably raised if you get an enterprise license) -- thomas 2011/8/11 ahmet temiz : > hello > > I was wondering if it was possible to integrate googlemap to mapserver a layer ? > > regards > > -- > Ahmet Temiz > Jeoloji M?h. > Afet ve Acil Durum Y?netimi Ba?kanl??? > Planlama ve Zarar Azaltma Dairesi Ba?kanl??? > Bilgi ve CBS grubu > Eski?ehir Yolu 10. km. > Lodumlu / Ankara > Tel : 0 312 2872680 / 1535 > ________________________ > > Ahmet Temiz > Geological Eng. > Information Systems - GIS Group > Disaster and Emergency Management > of Presidency > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From Michael.Smith at usace.army.mil Thu Aug 11 03:13:35 2011 From: Michael.Smith at usace.army.mil (Smith, Michael ERDC-CRREL-NH) Date: Thu, 11 Aug 2011 10:13:35 +0000 Subject: [mapserver-users] googleMap as a base layer In-Reply-To: References: Message-ID: Just to clarify, the limitation is not raised with an enterprise license. The best solution is to use something like OpenLayers (openlayers.org) and have a Google layer and a MapServer layer. OpenLayers and MapServer work very well together. Mike Michael Smith Remote Sensing/GIS Center US Army Corps of Engineers Hanover, NH -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of thomas bonfort Sent: Thursday, August 11, 2011 4:07 AM To: ahmet temiz Cc: mapserver-users Subject: Re: [mapserver-users] googleMap as a base layer no, the google maps terms of service explicitely deny this kind of usage (this limitation is probably raised if you get an enterprise license) -- thomas 2011/8/11 ahmet temiz : > hello > > I was wondering if it was possible to integrate googlemap to mapserver a layer ? > > regards > > -- > Ahmet Temiz > Jeoloji M?h. > Afet ve Acil Durum Y?netimi Ba?kanl??? Planlama ve Zarar Azaltma > Dairesi Ba?kanl??? Bilgi ve CBS grubu Eski?ehir Yolu 10. km. > Lodumlu / Ankara > Tel : 0 312 2872680 / 1535 > ________________________ > > Ahmet Temiz > Geological Eng. > Information Systems - GIS Group > Disaster and Emergency Management > of Presidency > _______________________________________________ > 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 emacgillavry at hotmail.com Thu Aug 11 04:32:42 2011 From: emacgillavry at hotmail.com (Edward Mac Gillavry) Date: Thu, 11 Aug 2011 13:32:42 +0200 Subject: [mapserver-users] googleMap as a base layer In-Reply-To: References: , , Message-ID: Be careful, though, as OL will request other layers with EPSG:900913 when you defined Google Maps to be your base layer. This may be a struggle in case your other layers are in EPSG:3857. Simply set the projection of your base layer explicitly to be EPSG:3857 in OL. Further information http://docs.openlayers.org/library/spherical_mercator.html#sphericalmercator-and-epsg-aliases Regards, Edward From: Michael.Smith at usace.army.mil To: thomas.bonfort at gmail.com; ahmettemiz88 at gmail.com Subject: RE: [mapserver-users] googleMap as a base layer Date: Thu, 11 Aug 2011 10:13:35 +0000 CC: mapserver-users at lists.osgeo.org Just to clarify, the limitation is not raised with an enterprise license. The best solution is to use something like OpenLayers (openlayers.org) and have a Google layer and a MapServer layer. OpenLayers and MapServer work very well together. Mike Michael Smith Remote Sensing/GIS Center US Army Corps of Engineers Hanover, NH -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of thomas bonfort Sent: Thursday, August 11, 2011 4:07 AM To: ahmet temiz Cc: mapserver-users Subject: Re: [mapserver-users] googleMap as a base layer no, the google maps terms of service explicitely deny this kind of usage (this limitation is probably raised if you get an enterprise license) -- thomas 2011/8/11 ahmet temiz : > hello > > I was wondering if it was possible to integrate googlemap to mapserver a layer ? > > regards > > -- > Ahmet Temiz > Jeoloji M?h. > Afet ve Acil Durum Y?netimi Ba?kanl??? Planlama ve Zarar Azaltma > Dairesi Ba?kanl??? Bilgi ve CBS grubu Eski?ehir Yolu 10. km. > Lodumlu / Ankara > Tel : 0 312 2872680 / 1535 > ________________________ > > Ahmet Temiz > Geological Eng. > Information Systems - GIS Group > Disaster and Emergency Management > of Presidency > _______________________________________________ > 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 _______________________________________________ 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.Toutant at inspq.qc.ca Thu Aug 11 07:53:26 2011 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Thu, 11 Aug 2011 10:53:26 -0400 Subject: [mapserver-users] msDrawLineSymbol(): (null) renderer does not support brushed lines Message-ID: In mapserver.log there is error when I render a particular layer msDrawLineSymbol(): (null) renderer does not support brushed lines msDrawMap(): rendering using outputformat named png (AGG/PNG). The layer is rendered though. But I wonder if some polygons are not rendered. It is difficult to know since there are 13 000 polygons in the DB. The data are in a postgis table and the geometry is MULTIPOLYGON Here is the class definition of this layer CLASS NAME "" STYLE OUTLINECOLOR 0 0 255 WIDTH 3 END END In my mapfile IMAGETYPE png I have this error also if IMAGETYPE gif Any idea why I have this error? thanks for your help, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From to.tonton at gmail.com Thu Aug 11 08:16:42 2011 From: to.tonton at gmail.com (Tonton) Date: Thu, 11 Aug 2011 17:16:42 +0200 Subject: [mapserver-users] GetLegendGraphics use Message-ID: hello i'd like to know how to use GetLegendGraphics in a sld file to obtain legend from ? Tonton -------------- next part -------------- An HTML attachment was scrubbed... URL: From zhaops at hotmail.com Thu Aug 11 09:08:24 2011 From: zhaops at hotmail.com (Peisheng Zhao) Date: Thu, 11 Aug 2011 16:08:24 +0000 Subject: [mapserver-users] GetLegendGraphics use In-Reply-To: References: Message-ID: Here is a SLD example. Then you can use GetLegendGraphics to get a legend. Date: Thu, 11 Aug 2011 17:16:42 +0200 From: to.tonton at gmail.com To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] GetLegendGraphics use hello i'd like to know how to use GetLegendGraphics in a sld file to obtain legend from ? Tonton _______________________________________________ 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 sdlime at gmail.com Thu Aug 11 09:27:36 2011 From: sdlime at gmail.com (Steve Lime) Date: Thu, 11 Aug 2011 11:27:36 -0500 Subject: [mapserver-users] googleMap as a base layer In-Reply-To: References: Message-ID: You can also use MapServer to generate overlays for use directly in Google maps. There's a tile mode directly in the CGI or you can use a tile caching solution. I've had terrific luck with mod-geocache lately generating tiles for the Google grid but limiting tile creation to a geographic area (e.g. just Minnesota). Mod-geocache is very efficient and can default to a single blank tile outside that extent. Steve On Thu, Aug 11, 2011 at 6:32 AM, Edward Mac Gillavry wrote: > Be careful, though, as OL will request other layers with EPSG:900913 when > you defined Google Maps to be your base layer. This may be a struggle in > case your other layers are in EPSG:3857. Simply set the projection of your > base layer explicitly to be EPSG:3857 in OL. Further information > http://docs.openlayers.org/library/spherical_mercator.html#sphericalmercator-and-epsg-aliases > > Regards, > > Edward > > > From: Michael.Smith at usace.army.mil > To: thomas.bonfort at gmail.com; ahmettemiz88 at gmail.com > Subject: RE: [mapserver-users] googleMap as a base layer > Date: Thu, 11 Aug 2011 10:13:35 +0000 > CC: mapserver-users at lists.osgeo.org > > Just to clarify, the limitation is not raised with an enterprise license. > > The best solution is to use something like OpenLayers (openlayers.org) and > have a Google layer and a MapServer layer. OpenLayers and MapServer work > very well together. > > Mike > > > Michael Smith > Remote Sensing/GIS Center > US Army Corps of Engineers > Hanover, NH > > > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of thomas bonfort > Sent: Thursday, August 11, 2011 4:07 AM > To: ahmet temiz > Cc: mapserver-users > Subject: Re: [mapserver-users] googleMap as a base layer > > no, the google maps terms of service explicitely deny this kind of usage > (this limitation is probably raised if you get an enterprise > license) > > -- > thomas > > 2011/8/11 ahmet temiz : >> hello >> >> I was wondering if it was possible to integrate googlemap to mapserver a >> layer ? >> >> regards >> >> -- >> Ahmet Temiz >> Jeoloji M?h. >> Afet ve Acil Durum Y?netimi Ba?kanl??? Planlama ve Zarar Azaltma >> Dairesi Ba?kanl??? Bilgi ve CBS grubu Eski?ehir Yolu 10. km. >> Lodumlu / Ankara >> Tel : 0 312 2872680 / 1535 >> ________________________ >> >> Ahmet Temiz >> Geological Eng. >> Information Systems - GIS Group >> Disaster and Emergency Management >> of Presidency >> _______________________________________________ >> 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 > > _______________________________________________ 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 ludovic.granjon at u-bourgogne.fr Fri Aug 12 00:13:58 2011 From: ludovic.granjon at u-bourgogne.fr (Ludovic Granjon) Date: Fri, 12 Aug 2011 09:13:58 +0200 Subject: [mapserver-users] Cluster in mapserver Message-ID: <4E44D2B6.1050405@u-bourgogne.fr> Hello I use mapserver with a cluster in a point layer. I use Cluster:FeatureCount in the size parameter : CLASS NAME "test" STYLE COLOR 255 0 0 SYMBOL 'circle' SIZE [Cluster:FeatureCount] END # Style END # Class It work fine, but I have two problems : First I'd like to have a size like [Cluster:FeatureCount]+10 or something like that, but it doesn't work, maybe I miss something. Do you know if it's possible ? Second, I want to get back the legend, but in the legend I have only the minimum value of the cluster, is there a way to get back also the maximum value of the cluster ? If it's better, I can use mapscript to do that. Thanks all Ludovic -------------- next part -------------- A non-text attachment was scrubbed... Name: ludovic_granjon.vcf Type: text/x-vcard Size: 149 bytes Desc: not available URL: From paulcarlisle at comcast.net Sun Aug 14 13:46:27 2011 From: paulcarlisle at comcast.net (SixDegrees) Date: Sun, 14 Aug 2011 13:46:27 -0700 (PDT) Subject: [mapserver-users] Raster-Based Displays Message-ID: <1313354787117-6685659.post@n2.nabble.com> I have a collection of image files - NITF, MrSid, some others - that contain geographic information, either embedded or attached. MapServer has no problem displaying the entire image or subsets of the image, properly rotated so north is up and the raster is transformed into the appropriate projection. What I would like to do is ignore the geographic information and just have MapServer treat the image as though it were a simple raster file, with no more information than width, height and color organization. So I see the entire image as it sits in the raster contained in the file, and subsets are aligned in the same way. Quite often I have several images of the same area taken from widely varying positions, and we want to preserve that difference when the images are displayed. So a tree, for example, might appear oriented upright in one image, pointing to the left in another, upside down in yet another and so on. On a related note, I would like to be able to display non-geographic raster files using MapServer, without any reference to a projection and simply relying on the width and height of the image. All the documentation and examples I've seen make use of projection information, but there doesn't seem to be a projection that corresponds to "just flat" or "plain old raster". How can I do this? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Raster-Based-Displays-tp6685659p6685659.html Sent from the Mapserver - User mailing list archive at Nabble.com. From Jukka.Rahkonen at mmmtike.fi Sun Aug 14 14:04:48 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Sun, 14 Aug 2011 21:04:48 +0000 Subject: [mapserver-users] Raster-Based Displays In-Reply-To: <1313354787117-6685659.post@n2.nabble.com> References: <1313354787117-6685659.post@n2.nabble.com> Message-ID: <84446DEF76453C439E9E97E438E13A630197F1@suutari.haapa.mmm.fi> Hi, I would make a try by writing fake worldfiles with .wld extension. Write the origo into 0,0 for each image and adjust the pixel size to suit your images. Tell Mapserver that the projection is some projected coordinate system (UTM for example), and override the embedded georeferencing by adding a directive PROCESSING "EXTENT_PRIORITY=WORLDFILE" into the LAYER. -Jukka Rahkonen- SixDegrees wrote: > I have a collection of image files - NITF, MrSid, some others - that contain geographic information, either embedded or attached. MapServer has no problem displaying the entire image or subsets of the image, properly rotated so north is up and the raster is transformed into the appropriate projection. > What I would like to do is ignore the geographic information and just have MapServer treat the image as though it were a simple raster file, with no more information than width, height and color organization. So I see the entire image as it sits in the raster contained in the file, and subsets are aligned in the same way. > Quite often I have several images of the same area taken from widely varying positions, and we want to preserve that difference when the images are displayed. So a tree, for example, might appear oriented upright in one image, pointing to the left in another, upside down in yet another and so on. > On a related note, I would like to be able to display non-geographic raster files using MapServer, without any reference to a projection and simply relying on the width and height of the image. > All the documentation and examples I've seen make use of projection information, but there doesn't seem to be a projection that corresponds to "just flat" or "plain old raster". How can I do this? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Raster-Based-Displays-tp6685659p6685659.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 K.Hirst at bom.gov.au Sun Aug 14 21:46:37 2011 From: K.Hirst at bom.gov.au (Kathleen Hirst) Date: Mon, 15 Aug 2011 14:46:37 +1000 Subject: [mapserver-users] WFS request outputting csv and limited by maxfeatures [SEC=UNCLASSIFIED] Message-ID: Dear List, For a WFS 1.0.0 request, I am wanting to output text/csv and also restrict the number of records returned by using &maxfeatures. A request is successful if the data source is OGR (csv file), but I get the following error if the data source is PostGIS. Content-type: text/xml msOGRWriteFromQuery(): General error message. Failed to open result file '/tmp/4e48981a_2ffd_0/result.csv'. The WFS request works fine (output GML or text/csv) without using &maxfeatures. I get the same error if I use "WFS_MAXFEATURES" in the WEB metadata. I'm using Mapserver 6.0.1. Thanks, Kathleen -------------- next part -------------- An HTML attachment was scrubbed... URL: From Keith.Moss at landgate.wa.gov.au Sun Aug 14 22:44:09 2011 From: Keith.Moss at landgate.wa.gov.au (Keith Moss) Date: Mon, 15 Aug 2011 13:44:09 +0800 Subject: [mapserver-users] TileIndex & WCS Bug Reports Message-ID: <82C223B25A75614D9F884563CE191C14086AAC9E@MAIL.dli.wa.gov.au> Hi, A few months ago we opened a bug on tileindexes: http://trac.osgeo.org/mapserver/ticket/3882 . There hasn't been any activity on the bug yet - we were wondering if anybody would be willing to look at the issue for us? It seemed as if it would be a relatively quick and easy fix. We've also recently opened some bugs around WCS issues - generally speaking, should one ping the MapServer-Users mailing list to raise awareness of the bug, or just wait and see what happens? __________________________________ Keith Moss Satellite Remote Sensing Services Operations Landgate 65 Brockway Road, FLOREAT WA 6014 PO Box 741 Wembley WA 6913 Ph. (08) 9387 0332 | Fx. (08) 9383 7142 keith.moss at landgate.wa.gov.au www.landgate.wa.gov.au This e-mail and any files transmitted with it are intended only for the use of the addressee(s). It may contain information that is confidential and privileged, in which case neither is intended to be waived or lost by mistaken delivery to you. If you are not an intended recipient, any use, interference with, disclosure, distribution or copying of this material is unauthorised and prohibited. If you receive this e-mail in error, please notify the sender by return e-mail and delete the message and any attachments from your system. Unless specifically indicated, this e-mail does not constitute formal advice or commitment by the sender or the Western Australian Land Information Authority (Landgate). Information in this message not relating to the official business of Landgate shall be understood as neither given nor endorsed by it. It is your responsibility to check any attachments for viruses and defects before opening or sending them on. Landgate?s liability is limited to re-supplying affected attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Sun Aug 14 23:09:37 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Mon, 15 Aug 2011 06:09:37 +0000 Subject: [mapserver-users] Re: TileIndex & WCS Bug Reports In-Reply-To: <82C223B25A75614D9F884563CE191C14086AAC9E@MAIL.dli.wa.gov.au> References: <82C223B25A75614D9F884563CE191C14086AAC9E@MAIL.dli.wa.gov.au> Message-ID: <84446DEF76453C439E9E97E438E13A63019861@suutari.haapa.mmm.fi> Hi, I can see from our WCS mapfiles that for some reason I have written them to use .vrt files (made with buildvrt tool http://gdal.org/gdalbuildvrt.html) as input instead of tileindex. It may be that tileindex did not work for me either. -Jukka Rahkonen- Keith Moss wrote: > Hi, > A few months ago we opened a bug on tileindexes: http://trac.osgeo.org/mapserver/ticket/3882. > There hasn't been any activity on the bug yet - we were wondering if anybody would be willing to look at the issue for us? It seemed as if it would be a relatively quick and easy fix. > We've also recently opened some bugs around WCS issues - generally speaking, should one ping the MapServer-Users mailing list to raise awareness of the bug, or just wait and see what happens? -------------- next part -------------- An HTML attachment was scrubbed... URL: From eduardo.kanegae at gmail.com Mon Aug 15 08:16:39 2011 From: eduardo.kanegae at gmail.com (Eduardo Kanegae) Date: Mon, 15 Aug 2011 12:16:39 -0300 Subject: RES: [mapserver-users] ENC: Openlayers Identify Problem In-Reply-To: References: Message-ID: hi Steve, sorry the late feedback but I wanted to let registered what I did wrong: - in this case I'm not using traditional CGI MapServer. I'm running OpenLayers and sending a query request through OpenLayers and my error was that I was not setting map_size param at the url. So, the point returned was never really clicking at the exact position. Now, setting up the map_size with map.size openlayers object, query is running fine: http://host/cgi-bin/mapserv?img.x=304&img.y=241&mode=query&layer=my_layer&zoomdir=0&map=fde69e66887522e78c6f2db37d6ade66.map&savequery=true&imgext=-48.213636667768+-22.227481579782+-48.171253332232+-22.207988420218&map_size=1335+614 regards -- Eduardo Patto Kanegae http://www.webmapit.com 2011/7/5 Steve Lime > > Is that the exact error message? > > Sent from my iPad > On Jul 2, 2011, at 12:48 PM, Eduardo Kanegae wrote: > > Hi Steve, > Just to drop a last note on topic?http://lists.osgeo.org/pipermail/mapserver-users/2011-June/069053.html > - the problem was solved: the layer template file was missing 'mapserver template' header tag. > The strange thing: mapserver was reporting "no items found at this point". > best > -- > Eduardo Patto Kanegae > http://www.webmapit.com.br > +55(19)9610-8768 > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From bhempen at sciops.esa.int Tue Aug 16 03:10:08 2011 From: bhempen at sciops.esa.int (Bryan Hempen) Date: Tue, 16 Aug 2011 12:10:08 +0200 Subject: [mapserver-users] WFS Spatial Filter Problem In-Reply-To: <4E42A959.40401@mapgears.com> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> <4E42A959.40401@mapgears.com> Message-ID: <32467_1313489461_4E4A4235_32467_8716_1_4E4A4200.80206@sciops.esa.int> Hi Daniel, thanks for your input. This, however, was the output of the ms_error.txt! Is there anything that can be concluded from that? Kind regards, Bryan On 10/08/2011 17:52, Daniel Morissette wrote: > Looks like you checked the Apache error_log. With the config that you > quoted, you should find the debug info in /home/bhempen/ms_error.txt. > > > On 11-08-10 08:35 AM, Bryan Hempen wrote: >> Hi David, >> >> I enabled debugging using the following settings: >> >> CONFIG "MS_ERRORFILE" "/home/bhempen/ms_error.txt" >> DEBUG 5 >> CONFIG "CPL_DEBUG" "ON" >> CONFIG "PROJ_DEBUG" "ON" >> >> The only line that shows up after I got an error 500 using the spatial >> filter is: >> >> [Wed Aug 10 14:30:46 2011].451858 CGI Request 1 on process 21100 >> >> Not really helpful, right? >> >> Regards, >> Bryan >> >> On 09/08/2011 15:38, Fawcett, David (MPCA) wrote: >>> >>> Bryan, >>> >>> For testing, I would enable debugging at the MAP or LAYER level. If >>> you set DEBUG 5, I think that you should be able to see the query that >>> MapServer is crafting. >>> >>> More on debugging here: >>> http://mapserver.org/optimization/debugging.html#debugging >>> >>> David. >>> >>> *From:*mapserver-users-bounces at lists.osgeo.org >>> [mailto:mapserver-users-bounces at lists.osgeo.org] *On Behalf Of *Bryan >>> Hempen >>> *Sent:* Tuesday, August 09, 2011 4:15 AM >>> *Cc:* mapserver-users at lists.osgeo.org >>> *Subject:* Re: [mapserver-users] WFS Spatial Filter Problem >>> >>> Dear Kai and Assefa, >>> >>> >>> >>> After you two guys requested me to send you my setup, I exported the >>> content in the databasetable to a shapefile so you can test it. When I >>> tested the spatial filter right after that, it suddenly worked ! This >>> narrows down the possibilities: >>> >>> - The request I send is definitely not the problem anymore. It works >>> with MapServer + shapefile and with GeoServer. >>> >>> - I exported only the geometries to the shapefile in the table with >>> geometrytype = POLYGON because from ~8000 geometries ~10 are >>> linestrings. So I investigated possible problems with the linestring >>> geometries by telling the MapServer not to serve them using a subquery >>> in the mapfile: >>> >>> DATA "the_geom from (select * from alldata where >>> geometrytype(the_geom) = 'POLYGON') as subquery using unique >>> product_id using SRID=4326" >>> >>> Error 500 still occured. Therefore, the data can't be the problem >>> neither, right? >>> >>> - Since I didn't change anything else MapServer must have problems >>> communicating with the PostGIS database, but why Error 500 then? >>> >>> Here is my mapfile: >>> >>> >>> MAP >>> NAME "WFS Server" >>> STATUS ON >>> SIZE 600 400 >>> SYMBOLSET >>> "/var/www/html/psa/bhempen/mapservertest/symbols/symbols.sym" >>> EXTENT -180 -90 180 90 >>> UNITS DD >>> SHAPEPATH "/var/www/html/psa/bhempen/mapservertest/data/" >>> IMAGECOLOR 255 255 255 >>> FONTSET "/var/www/html/psa/bhempen/mapservertest/fonts/fonts.list" >>> MAXSIZE 4096 # needs to be set because otherwise an error will >>> appear when rendering images on large screens >>> >>> >>> #IMAGECOLOR 200 200 200 #commented out for WFS >>> >>> PROJECTION >>> 'init=epsg:4326' >>> END >>> >>> WEB >>> TEMPLATE '/var/www/html/psa/bhempen/mapservertest/template.html' >>> IMAGEPATH '/var/www/html/psa/bhempen/tmp/' >>> IMAGEURL '/psa/bhempen/tmp/' >>> METADATA >>> "wfs_title" "WFS Demo Server for >>> MapServer" ## REQUIRED >>> "wfs_onlineresource" >>> "http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.map&" >>> ## >>> Recommended >>> "wfs_srs" "EPSG:4326" ## Recommended >>> "wfs_abstract" "This text describes my WFS >>> service." ## Recommended >>> END >>> END >>> >>> LAYER >>> NAME "omega" >>> STATUS DEFAULT >>> TYPE POLYGON >>> METADATA >>> "wfs_title" "omega footprints" ##REQUIRED >>> "wfs_srs" "EPSG:4326" ## REQUIRED >>> "gml_include_items" "all" ## Optional (serves all >>> attributes for layer) >>> "gml_featureid" "product_id" ## REQUIRED >>> END >>> PROJECTION >>> "init=epsg:4326" >>> END >>> CONNECTIONTYPE POSTGIS >>> CONNECTION "host=localhost port=xxx dbname=xxx user=xxx >>> password=xxx" >>> DATA "the_geom from alldata using unique product_id using >>> SRID=4326" >>> CLASS >>> STYLE >>> OUTLINECOLOR 125 0 0 >>> END >>> END >>> DUMP TRUE ## REQUIRED >>> END # layer >>> >>> END >>> >>> >>> Does anyone see a problem with the setup? >>> >>> Many thanks to Kai and Assefa for the help so far! I am going to send >>> you the shapefile (which you could import into the database with >>> pgsql2shp), the mapfile, and my client. >>> >>> Kind regards, >>> Bryan >>> >>> ================================================================================================ >>> >>> This message and any attachments are intended for the use of the >>> addressee or addressees only. The unauthorised disclosure, >>> >>> use, dissemination or copying (either in whole or in part) of its >>> content is not permitted. If you received this message in >>> >>> error, please notify the sender and delete it from your system. >>> Emails can be altered and their integrity cannot be guaranteed by >>> >>> the sender. >>> >>> Please consider the environment before printing this email. >>> ================================================================================================= >>> >> >> ================================================================================================ >> >> This message and any attachments are intended for the use of the >> addressee or addressees only. The unauthorised disclosure, >> >> use, dissemination or copying (either in whole or in part) of its >> content is not permitted. If you received this message in >> >> error, please notify the sender and delete it from your system. >> Emails can be altered and their integrity cannot be guaranteed by >> >> the sender. >> >> Please consider the environment before printing this email. >> ================================================================================================= >> >> >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > ================================================================================================ This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. ================================================================================================= From bartvde at osgis.nl Tue Aug 16 04:57:23 2011 From: bartvde at osgis.nl (Bart van den Eijnden (OSGIS)) Date: Tue, 16 Aug 2011 13:57:23 +0200 (CEST) Subject: [mapserver-users] NAME limit of 20 characters Message-ID: <37783.145.50.39.8.1313495843.squirrel@webmail.hostingdiscounter.nl> Hi list, I am bit confused about the 20 character limit for LAYER->NAME that the MAP file documentation suggests. NAME [string] Short name for this layer. Limit is 20 characters. This name is the link between the mapfile and web interfaces that refer to this name. They must be identical. The name should be unique, unless one layer replaces another at different scales. Use the GROUP option to associate layers with each other. Is this limit really true? If I read Steve Lime's reply here this should not be the case: http://osgeo-org.1803224.n2.nabble.com/Character-Limit-for-NAME-and-GROUP-td5922135.html TIA for any clarification. Best regards, Bart From dolson at glifwc.org Tue Aug 16 07:00:39 2011 From: dolson at glifwc.org (Dara Olson) Date: Tue, 16 Aug 2011 09:00:39 -0500 Subject: [mapserver-users] Web application error. Malformed template name Message-ID: <8577CAB2A0F84208AAF10F234AF2A7FD@GISWKSTN2> Good morning. I am having some problems identifying a layer through MapServer and I seem to be stuck. I have a flat table of harvest by waterbody by year by individual in PostgreSQL/PostGIS. I created a "temporary view" of the sum harvested by waterbody by year and joined in geometry which I then made into a crosstab so that each lake would be listed and columns across with harvest by year. It draws successfully in my web mapping application (and view looks fine in postgres), but when I try to use the Identify feature on the website (Mapserver GET URL request) I get the following error in MapServer, [Fri Aug 12 09:57:33 2011].687000 msReturnPage(): Web application error. Malformed template name (). [Fri Aug 12 09:57:33 2011].703000 msQueryByPoint(): Search returned no results. No matching record(s) found. Before doing the crosstab I was getting this error, but I assumed that it didn't like the multiple records linked to the same geometry and that's why I did the crosstab. But still nothing works. Does anyone have any idea of where to begin to debug? Any help would be greatly appreciated. Thanks! Dara Olson, GLIFWC -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.fawcett at state.mn.us Tue Aug 16 07:42:57 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Tue, 16 Aug 2011 09:42:57 -0500 Subject: [mapserver-users] Web application error. Malformed template name In-Reply-To: <8577CAB2A0F84208AAF10F234AF2A7FD@GISWKSTN2> References: <8577CAB2A0F84208AAF10F234AF2A7FD@GISWKSTN2> Message-ID: Dara, Can you share the part of your mapfile that describes this layer? David. From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Dara Olson Sent: Tuesday, August 16, 2011 9:01 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Web application error. Malformed template name Good morning. I am having some problems identifying a layer through MapServer and I seem to be stuck. I have a flat table of harvest by waterbody by year by individual in PostgreSQL/PostGIS. I created a "temporary view" of the sum harvested by waterbody by year and joined in geometry which I then made into a crosstab so that each lake would be listed and columns across with harvest by year. It draws successfully in my web mapping application (and view looks fine in postgres), but when I try to use the Identify feature on the website (Mapserver GET URL request) I get the following error in MapServer, [Fri Aug 12 09:57:33 2011].687000 msReturnPage(): Web application error. Malformed template name (). [Fri Aug 12 09:57:33 2011].703000 msQueryByPoint(): Search returned no results. No matching record(s) found. Before doing the crosstab I was getting this error, but I assumed that it didn't like the multiple records linked to the same geometry and that's why I did the crosstab. But still nothing works. Does anyone have any idea of where to begin to debug? Any help would be greatly appreciated. Thanks! Dara Olson, GLIFWC -------------- next part -------------- An HTML attachment was scrubbed... URL: From dolson at glifwc.org Tue Aug 16 08:03:11 2011 From: dolson at glifwc.org (Dara Olson) Date: Tue, 16 Aug 2011 10:03:11 -0500 Subject: [mapserver-users] Web application error. Malformed template name References: <8577CAB2A0F84208AAF10F234AF2A7FD@GISWKSTN2> Message-ID: <6B4F9915A9E246E797835D3557802BFC@GISWKSTN2> It is below. I am running a web mapping site with GeoMoose(2.0) and MapServer(5.2.1), but I can't seem to find a way to figure out what I am doing wrong or why I am ending up with the error. Any help would be greatly appreciated. Miigwech! Dara MAP SIZE 1920 1920 MAXSIZE 10000 EXTENT -20614760.777156 1751325.1919492 -1927436.1053437 7915207.1517617 UNITS meters SYMBOLSET "..\symbols\glifwc_symbol.sym" FONTSET "..\fonts\fonts.list" CONFIG "MS_ERRORFILE" "d:/Logs/Mapserver/MapServerDEVELSITE.log" OUTPUTFORMAT NAME 'agg/png' DRIVER AGG/PNG IMAGEMODE RGBA FORMATOPTION "TRANSPARENT=TRUE" END IMAGETYPE AGG/PNG TRANSPARENT ON IMAGECOLOR -1 -1 -1 DEBUG 3 ############################### ---- LEGEND ---- ############################### LEGEND STATUS on TRANSPARENT on END ############################### ---- Map projection ---- ############################### PROJECTION "init=epsg:900913" END ############################### ---- LAYERS ---- ############################### LAYER # MN Ogaa Harvest LBS NAME "mn_ogaa_harvest_lbs" TYPE POLYGON CONNECTIONTYPE postgis CONNECTION "host=zzzzzzz user=zzzzzz password=zzzzzz dbname=zzzzzz" PROCESSING "CLOSE_CONNECTION=DEFER" DATA "the_geom900913 from inland.mn_ogaa_harvest_lbs_spatial using unique new_id using srid=900913" PROJECTION "init=epsg:900913" END METADATA "wms_title" "MN Ogaa Harvest Lakes" END CLASS NAME "MN Ogaa Harvest Lakes" STYLE SYMBOL 0 SIZE 6 OUTLINECOLOR -1 -1 -1 COLOR 182 177 145 END TEMPLATE "../identify/ogaa_harvest/mn_ogaa_harvest_lbs_identify.html" END END # MN Ogaa Harvest LBS END #map file My HTML identify template used to display results is, MN Ogaa Harvest in Pounds Lake: [lake] 2011 Harvest: [_2011_harvest] ...
----- Original Message ----- From: Fawcett, David (MPCA) To: Dara Olson ; mapserver-users at lists.osgeo.org Sent: Tuesday, August 16, 2011 9:42 AM Subject: RE: [mapserver-users] Web application error. Malformed template name Dara, Can you share the part of your mapfile that describes this layer? David. From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Dara Olson Sent: Tuesday, August 16, 2011 9:01 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Web application error. Malformed template name Good morning. I am having some problems identifying a layer through MapServer and I seem to be stuck. I have a flat table of harvest by waterbody by year by individual in PostgreSQL/PostGIS. I created a "temporary view" of the sum harvested by waterbody by year and joined in geometry which I then made into a crosstab so that each lake would be listed and columns across with harvest by year. It draws successfully in my web mapping application (and view looks fine in postgres), but when I try to use the Identify feature on the website (Mapserver GET URL request) I get the following error in MapServer, [Fri Aug 12 09:57:33 2011].687000 msReturnPage(): Web application error. Malformed template name (). [Fri Aug 12 09:57:33 2011].703000 msQueryByPoint(): Search returned no results. No matching record(s) found. Before doing the crosstab I was getting this error, but I assumed that it didn't like the multiple records linked to the same geometry and that's why I did the crosstab. But still nothing works. Does anyone have any idea of where to begin to debug? Any help would be greatly appreciated. Thanks! Dara Olson, GLIFWC -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmckenna at gatewaygeomatics.com Tue Aug 16 09:27:37 2011 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 16 Aug 2011 13:27:37 -0300 Subject: [mapserver-users] NAME limit of 20 characters In-Reply-To: <37783.145.50.39.8.1313495843.squirrel@webmail.hostingdiscounter.nl> References: <37783.145.50.39.8.1313495843.squirrel@webmail.hostingdiscounter.nl> Message-ID: <4E4A9A79.5060504@gatewaygeomatics.com> Hi Bart, I looked at this this morning when you reported it...and I also couldn't find where this limit exists. I tested with a 100 character string and didn't have a problem with 6.1-dev. I have removed that limit text from the docs, and I've added a note about spaces, special characters, and starting with numbers (see http://www.mapserver.org/mapfile/layer.html). Thanks! -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 11-08-16 8:57 AM, Bart van den Eijnden (OSGIS) wrote: > Hi list, > > I am bit confused about the 20 character limit for LAYER->NAME that the > MAP file documentation suggests. > > NAME [string] > Short name for this layer. Limit is 20 characters. This name is the > link between the mapfile and web interfaces that refer to this name. > They must be identical. The name should be unique, unless one layer > replaces another at different scales. Use the GROUP option to > associate layers with each other. > > Is this limit really true? > > If I read Steve Lime's reply here this should not be the case: > > http://osgeo-org.1803224.n2.nabble.com/Character-Limit-for-NAME-and-GROUP-td5922135.html > > TIA for any clarification. > > Best regards, > Bart > From david.fawcett at state.mn.us Tue Aug 16 09:55:21 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Tue, 16 Aug 2011 11:55:21 -0500 Subject: [mapserver-users] Web application error. Malformed template name In-Reply-To: <6B4F9915A9E246E797835D3557802BFC@GISWKSTN2> References: <8577CAB2A0F84208AAF10F234AF2A7FD@GISWKSTN2> <6B4F9915A9E246E797835D3557802BFC@GISWKSTN2> Message-ID: Dara, I am pretty sure that relative paths work for templates, but for testing purposes, try using the absolute path to the template. David. From: Dara Olson [mailto:dolson at glifwc.org] Sent: Tuesday, August 16, 2011 10:03 AM To: Fawcett, David (MPCA); mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Web application error. Malformed template name It is below. I am running a web mapping site with GeoMoose(2.0) and MapServer(5.2.1), but I can't seem to find a way to figure out what I am doing wrong or why I am ending up with the error. Any help would be greatly appreciated. Miigwech! Dara MAP SIZE 1920 1920 MAXSIZE 10000 EXTENT -20614760.777156 1751325.1919492 -1927436.1053437 7915207.1517617 UNITS meters SYMBOLSET "..\symbols\glifwc_symbol.sym" FONTSET "..\fonts\fonts.list" CONFIG "MS_ERRORFILE" "d:/Logs/Mapserver/MapServerDEVELSITE.log" OUTPUTFORMAT NAME 'agg/png' DRIVER AGG/PNG IMAGEMODE RGBA FORMATOPTION "TRANSPARENT=TRUE" END IMAGETYPE AGG/PNG TRANSPARENT ON IMAGECOLOR -1 -1 -1 DEBUG 3 ############################### ---- LEGEND ---- ############################### LEGEND STATUS on TRANSPARENT on END ############################### ---- Map projection ---- ############################### PROJECTION "init=epsg:900913" END ############################### ---- LAYERS ---- ############################### LAYER # MN Ogaa Harvest LBS NAME "mn_ogaa_harvest_lbs" TYPE POLYGON CONNECTIONTYPE postgis CONNECTION "host=zzzzzzz user=zzzzzz password=zzzzzz dbname=zzzzzz" PROCESSING "CLOSE_CONNECTION=DEFER" DATA "the_geom900913 from inland.mn_ogaa_harvest_lbs_spatial using unique new_id using srid=900913" PROJECTION "init=epsg:900913" END METADATA "wms_title" "MN Ogaa Harvest Lakes" END CLASS NAME "MN Ogaa Harvest Lakes" STYLE SYMBOL 0 SIZE 6 OUTLINECOLOR -1 -1 -1 COLOR 182 177 145 END TEMPLATE "../identify/ogaa_harvest/mn_ogaa_harvest_lbs_identify.html" END END # MN Ogaa Harvest LBS END #map file My HTML identify template used to display results is, MN Ogaa Harvest in Pounds Lake: [lake] 2011 Harvest: [_2011_harvest] ...
----- Original Message ----- From: Fawcett, David (MPCA) To: Dara Olson ; mapserver-users at lists.osgeo.org Sent: Tuesday, August 16, 2011 9:42 AM Subject: RE: [mapserver-users] Web application error. Malformed template name Dara, Can you share the part of your mapfile that describes this layer? David. From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Dara Olson Sent: Tuesday, August 16, 2011 9:01 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Web application error. Malformed template name Good morning. I am having some problems identifying a layer through MapServer and I seem to be stuck. I have a flat table of harvest by waterbody by year by individual in PostgreSQL/PostGIS. I created a "temporary view" of the sum harvested by waterbody by year and joined in geometry which I then made into a crosstab so that each lake would be listed and columns across with harvest by year. It draws successfully in my web mapping application (and view looks fine in postgres), but when I try to use the Identify feature on the website (Mapserver GET URL request) I get the following error in MapServer, [Fri Aug 12 09:57:33 2011].687000 msReturnPage(): Web application error. Malformed template name (). [Fri Aug 12 09:57:33 2011].703000 msQueryByPoint(): Search returned no results. No matching record(s) found. Before doing the crosstab I was getting this error, but I assumed that it didn't like the multiple records linked to the same geometry and that's why I did the crosstab. But still nothing works. Does anyone have any idea of where to begin to debug? Any help would be greatly appreciated. Thanks! Dara Olson, GLIFWC -------------- next part -------------- An HTML attachment was scrubbed... URL: From dolson at glifwc.org Tue Aug 16 11:19:54 2011 From: dolson at glifwc.org (Dara Olson) Date: Tue, 16 Aug 2011 13:19:54 -0500 Subject: [mapserver-users] Web application error. Malformed template name References: <8577CAB2A0F84208AAF10F234AF2A7FD@GISWKSTN2> <6B4F9915A9E246E797835D3557802BFC@GISWKSTN2> Message-ID: An absolute path did not help. I increased MapServer Debug to 5 and I still don't get any more information. Is there a way to track down where exactly the problem is happening? I thought by creating the view to remove the multiple records by waterbody this would remove this error (so it wouldn't get more than one result from the URL request), but no such luck. Any other suggestions would be greatly appreciated. Dara ----- Original Message ----- From: Fawcett, David (MPCA) To: Dara Olson ; mapserver-users at lists.osgeo.org Sent: Tuesday, August 16, 2011 11:55 AM Subject: RE: [mapserver-users] Web application error. Malformed template name Dara, I am pretty sure that relative paths work for templates, but for testing purposes, try using the absolute path to the template. David. From: Dara Olson [mailto:dolson at glifwc.org] Sent: Tuesday, August 16, 2011 10:03 AM To: Fawcett, David (MPCA); mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Web application error. Malformed template name It is below. I am running a web mapping site with GeoMoose(2.0) and MapServer(5.2.1), but I can't seem to find a way to figure out what I am doing wrong or why I am ending up with the error. Any help would be greatly appreciated. Miigwech! Dara MAP SIZE 1920 1920 MAXSIZE 10000 EXTENT -20614760.777156 1751325.1919492 -1927436.1053437 7915207.1517617 UNITS meters SYMBOLSET "..\symbols\glifwc_symbol.sym" FONTSET "..\fonts\fonts.list" CONFIG "MS_ERRORFILE" "d:/Logs/Mapserver/MapServerDEVELSITE.log" OUTPUTFORMAT NAME 'agg/png' DRIVER AGG/PNG IMAGEMODE RGBA FORMATOPTION "TRANSPARENT=TRUE" END IMAGETYPE AGG/PNG TRANSPARENT ON IMAGECOLOR -1 -1 -1 DEBUG 3 ############################### ---- LEGEND ---- ############################### LEGEND STATUS on TRANSPARENT on END ############################### ---- Map projection ---- ############################### PROJECTION "init=epsg:900913" END ############################### ---- LAYERS ---- ############################### LAYER # MN Ogaa Harvest LBS NAME "mn_ogaa_harvest_lbs" TYPE POLYGON CONNECTIONTYPE postgis CONNECTION "host=zzzzzzz user=zzzzzz password=zzzzzz dbname=zzzzzz" PROCESSING "CLOSE_CONNECTION=DEFER" DATA "the_geom900913 from inland.mn_ogaa_harvest_lbs_spatial using unique new_id using srid=900913" PROJECTION "init=epsg:900913" END METADATA "wms_title" "MN Ogaa Harvest Lakes" END CLASS NAME "MN Ogaa Harvest Lakes" STYLE SYMBOL 0 SIZE 6 OUTLINECOLOR -1 -1 -1 COLOR 182 177 145 END TEMPLATE "../identify/ogaa_harvest/mn_ogaa_harvest_lbs_identify.html" END END # MN Ogaa Harvest LBS END #map file My HTML identify template used to display results is, MN Ogaa Harvest in Pounds Lake: [lake] 2011 Harvest: [_2011_harvest] ...
----- Original Message ----- From: Fawcett, David (MPCA) To: Dara Olson ; mapserver-users at lists.osgeo.org Sent: Tuesday, August 16, 2011 9:42 AM Subject: RE: [mapserver-users] Web application error. Malformed template name Dara, Can you share the part of your mapfile that describes this layer? David. From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Dara Olson Sent: Tuesday, August 16, 2011 9:01 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Web application error. Malformed template name Good morning. I am having some problems identifying a layer through MapServer and I seem to be stuck. I have a flat table of harvest by waterbody by year by individual in PostgreSQL/PostGIS. I created a "temporary view" of the sum harvested by waterbody by year and joined in geometry which I then made into a crosstab so that each lake would be listed and columns across with harvest by year. It draws successfully in my web mapping application (and view looks fine in postgres), but when I try to use the Identify feature on the website (Mapserver GET URL request) I get the following error in MapServer, [Fri Aug 12 09:57:33 2011].687000 msReturnPage(): Web application error. Malformed template name (). [Fri Aug 12 09:57:33 2011].703000 msQueryByPoint(): Search returned no results. No matching record(s) found. Before doing the crosstab I was getting this error, but I assumed that it didn't like the multiple records linked to the same geometry and that's why I did the crosstab. But still nothing works. Does anyone have any idea of where to begin to debug? Any help would be greatly appreciated. Thanks! Dara Olson, GLIFWC -------------- next part -------------- An HTML attachment was scrubbed... URL: From dolson at glifwc.org Tue Aug 16 12:32:16 2011 From: dolson at glifwc.org (Dara Olson) Date: Tue, 16 Aug 2011 14:32:16 -0500 Subject: [mapserver-users] Web application error. Malformed template name Message-ID: <4AC4114F5683486EB7D7457091436E41@GISWKSTN2> I found the problem - I was using a bigint value for the unique key in the layer definition and it was not a primary key or have any unique constraint on it. I brought in a "gid" (int4) from the joined table with geometry that was in the temp view and used that as the unique value in the map layer definition and it works perfectly. I found this out by attempting to access the PostGIS view through Quantum GIS. I am still kind of confused why this is, but it works. David - Thanks for the help! Dara ----- Original Message ----- From: Dara Olson To: Fawcett, David (MPCA) ; mapserver-users at lists.osgeo.org Sent: Tuesday, August 16, 2011 1:19 PM Subject: Re: [mapserver-users] Web application error. Malformed template name An absolute path did not help. I increased MapServer Debug to 5 and I still don't get any more information. Is there a way to track down where exactly the problem is happening? I thought by creating the view to remove the multiple records by waterbody this would remove this error (so it wouldn't get more than one result from the URL request), but no such luck. Any other suggestions would be greatly appreciated. Dara ----- Original Message ----- From: Fawcett, David (MPCA) To: Dara Olson ; mapserver-users at lists.osgeo.org Sent: Tuesday, August 16, 2011 11:55 AM Subject: RE: [mapserver-users] Web application error. Malformed template name Dara, I am pretty sure that relative paths work for templates, but for testing purposes, try using the absolute path to the template. David. From: Dara Olson [mailto:dolson at glifwc.org] Sent: Tuesday, August 16, 2011 10:03 AM To: Fawcett, David (MPCA); mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Web application error. Malformed template name It is below. I am running a web mapping site with GeoMoose(2.0) and MapServer(5.2.1), but I can't seem to find a way to figure out what I am doing wrong or why I am ending up with the error. Any help would be greatly appreciated. Miigwech! Dara MAP SIZE 1920 1920 MAXSIZE 10000 EXTENT -20614760.777156 1751325.1919492 -1927436.1053437 7915207.1517617 UNITS meters SYMBOLSET "..\symbols\glifwc_symbol.sym" FONTSET "..\fonts\fonts.list" CONFIG "MS_ERRORFILE" "d:/Logs/Mapserver/MapServerDEVELSITE.log" OUTPUTFORMAT NAME 'agg/png' DRIVER AGG/PNG IMAGEMODE RGBA FORMATOPTION "TRANSPARENT=TRUE" END IMAGETYPE AGG/PNG TRANSPARENT ON IMAGECOLOR -1 -1 -1 DEBUG 3 ############################### ---- LEGEND ---- ############################### LEGEND STATUS on TRANSPARENT on END ############################### ---- Map projection ---- ############################### PROJECTION "init=epsg:900913" END ############################### ---- LAYERS ---- ############################### LAYER # MN Ogaa Harvest LBS NAME "mn_ogaa_harvest_lbs" TYPE POLYGON CONNECTIONTYPE postgis CONNECTION "host=zzzzzzz user=zzzzzz password=zzzzzz dbname=zzzzzz" PROCESSING "CLOSE_CONNECTION=DEFER" DATA "the_geom900913 from inland.mn_ogaa_harvest_lbs_spatial using unique new_id using srid=900913" PROJECTION "init=epsg:900913" END METADATA "wms_title" "MN Ogaa Harvest Lakes" END CLASS NAME "MN Ogaa Harvest Lakes" STYLE SYMBOL 0 SIZE 6 OUTLINECOLOR -1 -1 -1 COLOR 182 177 145 END TEMPLATE "../identify/ogaa_harvest/mn_ogaa_harvest_lbs_identify.html" END END # MN Ogaa Harvest LBS END #map file My HTML identify template used to display results is, MN Ogaa Harvest in Pounds Lake: [lake] 2011 Harvest: [_2011_harvest] ...
----- Original Message ----- From: Fawcett, David (MPCA) To: Dara Olson ; mapserver-users at lists.osgeo.org Sent: Tuesday, August 16, 2011 9:42 AM Subject: RE: [mapserver-users] Web application error. Malformed template name Dara, Can you share the part of your mapfile that describes this layer? David. From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Dara Olson Sent: Tuesday, August 16, 2011 9:01 AM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Web application error. Malformed template name Good morning. I am having some problems identifying a layer through MapServer and I seem to be stuck. I have a flat table of harvest by waterbody by year by individual in PostgreSQL/PostGIS. I created a "temporary view" of the sum harvested by waterbody by year and joined in geometry which I then made into a crosstab so that each lake would be listed and columns across with harvest by year. It draws successfully in my web mapping application (and view looks fine in postgres), but when I try to use the Identify feature on the website (Mapserver GET URL request) I get the following error in MapServer, [Fri Aug 12 09:57:33 2011].687000 msReturnPage(): Web application error. Malformed template name (). [Fri Aug 12 09:57:33 2011].703000 msQueryByPoint(): Search returned no results. No matching record(s) found. Before doing the crosstab I was getting this error, but I assumed that it didn't like the multiple records linked to the same geometry and that's why I did the crosstab. But still nothing works. Does anyone have any idea of where to begin to debug? Any help would be greatly appreciated. Thanks! Dara Olson, GLIFWC -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.fawcett at state.mn.us Tue Aug 16 13:04:51 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Tue, 16 Aug 2011 15:04:51 -0500 Subject: [mapserver-users] runtime substitution - class name Message-ID: Is it still possible to runtime-sub a class name in 6.0.1? I used to do it like this in 4.x: http://myserver/cgi-bin/mapserv?mode=legend&map=mymap.map&map_basemap_class_0_name=fitger I am trying to do it like this in 6.0.1: http://myserver/cgi-bin/mapserv?mode=map&map=/web/mymap.map&map.layer[0].class[1]=NAME+%27fitger%27 I get this error message: loadClass(): Unknown identifier. Parsing error near (NAME):(line 1) I have attempted to use a validation block also, but can't find an example of what key name to use for map objects (e.g. class name) Thanks, David. From david.fawcett at state.mn.us Tue Aug 16 13:15:07 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Tue, 16 Aug 2011 15:15:07 -0500 Subject: [mapserver-users] RE: runtime substitution - class name In-Reply-To: References: Message-ID: OK, As usual, the best method in debugging is to post to the list and then give it one last try... At 6.X, you can't change the name properties of classes, layers, etc. Steve Lime documents this pretty clearly in this email message: http://lists.osgeo.org/pipermail/mapserver-users/2011-April/068560.html The TITLE property is now accessible though. I had tried this, but not apparently at the same time that I was applying a validation pattern. This URL works: http://myserver/cgi-bin/mapserv?mode=legend&map=mymap.map&map.layer[0].class[1]=TITLE+%27fitger%27 I have a layer-level validation block. The expression is a little more generous than my test case needs, but fits the real data. VALIDATION 'title' '^[a-zA-Z0-9\, ]+$' END David. -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Fawcett, David (MPCA) Sent: Tuesday, August 16, 2011 3:05 PM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] runtime substitution - class name Is it still possible to runtime-sub a class name in 6.0.1? I used to do it like this in 4.x: http://myserver/cgi-bin/mapserv?mode=legend&map=mymap.map&map_basemap_class_0_name=fitger I am trying to do it like this in 6.0.1: http://myserver/cgi-bin/mapserv?mode=map&map=/web/mymap.map&map.layer[0].class[1]=NAME+%27fitger%27 I get this error message: loadClass(): Unknown identifier. Parsing error near (NAME):(line 1) I have attempted to use a validation block also, but can't find an example of what key name to use for map objects (e.g. class name) Thanks, David. _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From Keith.Moss at landgate.wa.gov.au Tue Aug 16 18:26:21 2011 From: Keith.Moss at landgate.wa.gov.au (Keith Moss) Date: Wed, 17 Aug 2011 09:26:21 +0800 Subject: [mapserver-users] Re: TileIndex & WCS Bug Reports References: <82C223B25A75614D9F884563CE191C14086AAC9E@MAIL.dli.wa.gov.au> <84446DEF76453C439E9E97E438E13A63019861@suutari.haapa.mmm.fi> Message-ID: <82C223B25A75614D9F884563CE191C14086AACA7@MAIL.dli.wa.gov.au> Thanks Jukka, we'll have a look into using .vrt files. __________________________________ Keith Moss Satellite Remote Sensing Services Operations Landgate 65 Brockway Road, FLOREAT WA 6014 PO Box 741 Wembley WA 6913 Ph. (08) 9387 0332 | Fx. (08) 9383 7142 keith.moss at landgate.wa.gov.au www.landgate.wa.gov.au ________________________________ From: mapserver-users-bounces at lists.osgeo.org on behalf of Rahkonen Jukka Sent: Mon 15/08/2011 14:09 To: Keith Moss; 'mapserver-users at lists.osgeo.org' Subject: [mapserver-users] Re: TileIndex & WCS Bug Reports Hi, I can see from our WCS mapfiles that for some reason I have written them to use .vrt files (made with buildvrt tool http://gdal.org/gdalbuildvrt.html) as input instead of tileindex. It may be that tileindex did not work for me either. -Jukka Rahkonen- Keith Moss wrote: > Hi, > A few months ago we opened a bug on tileindexes: http://trac.osgeo.org/mapserver/ticket/3882 . > There hasn't been any activity on the bug yet - we were wondering if anybody would be willing to look at the issue for us? It seemed as if it would be a relatively quick and easy fix. > We've also recently opened some bugs around WCS issues - generally speaking, should one ping the MapServer-Users mailing list to raise awareness of the bug, or just wait and see what happens? This e-mail and any files transmitted with it are intended only for the use of the addressee(s). It may contain information that is confidential and privileged, in which case neither is intended to be waived or lost by mistaken delivery to you. If you are not an intended recipient, any use, interference with, disclosure, distribution or copying of this material is unauthorised and prohibited. If you receive this e-mail in error, please notify the sender by return e-mail and delete the message and any attachments from your system. Unless specifically indicated, this e-mail does not constitute formal advice or commitment by the sender or the Western Australian Land Information Authority (Landgate). Information in this message not relating to the official business of Landgate shall be understood as neither given nor endorsed by it. It is your responsibility to check any attachments for viruses and defects before opening or sending them on. Landgate?s liability is limited to re-supplying affected attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bhempen at sciops.esa.int Wed Aug 17 02:55:20 2011 From: bhempen at sciops.esa.int (Bryan Hempen) Date: Wed, 17 Aug 2011 11:55:20 +0200 Subject: AW: [mapserver-users] WFS Spatial Filter Problem In-Reply-To: <56B587E7C40D2F43B54FDC1BA897AC6D037AF1DA@KS-EVS1.smi.sachsen.de> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net><32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> <56B587E7C40D2F43B54FDC1BA897AC6D037AF1DA@KS-EVS1.smi.sachsen.de> Message-ID: <32461_1313574994_4E4B9052_32461_2628_1_4E4B9008.5060705@sciops.esa.int> Hey guys, my current status report. I have tried the following list of things: - as proposed by Andreas, used shp2img. Works perfectly fine! - as proposed by Julien, took a look at the Apache error log. Here is a small excerpt of what it shows: [Wed Aug 17 10:42:15 2011] [error] [client 10.68.180.121] 3c34000000-3c3403d000 r-xp 00000000 fd:00 3123859 /usr/lib64/libldap_r-2.3.so.0 .2.31, referer: http://ssols02.esac.esa.int/psa/bhempen/tree.html ... [Wed Aug 17 10:42:15 2011] [error] [client 10.68.180.121] 3c34a1c000-3c34a1d000 rw-p 0001c000 fd:00 3118384 /usr/lib64/libgeos_c.so.1.6.2 , referer: http://ssols02.esac.esa.int/psa/bhempen/tree.html ... [Wed Aug 17 10:42:15 2011] [error] [client 10.68.180.121] Premature end of scrip t headers: mapserv, referer: http://ssols02.esac.esa.int/psa/bhempen/tree.html In case it could be useful to see the whole log, please just tell me. Now, to wrap things up again adding some new insights by testing with different versions of the MapServer. This is what happened: When I try to use the WFS FE Spatial Filter Intersect with MapServer 5.6.5 on a PostGIS layer, it doesn't work and I get an Error 500. When, however, I use a WFS FE Spatial Filter like Intersect with MapServer 5.6.5 on a shapefile layer with the SAME data as the PostGIS layer contains, it works! When I try to use the WFS FE Spatial Filter BBOX with MapServer 5.6.5 on a PostGIS layer, it works! When I use a WFS FE non-spatial filter like PropertyIsEqualTo and/or combined with logical filters like AND or OR combined with the WFS FE Spatial Filter BBOX with MapServer 5.6.5 on a shapefile layer or a PostGIS layer with the the SAME data, it works! When I try to use the WFS FE Spatial Filter Intersect with MapServer 6.0.1 on a PostGIS layer, sometimes no results are returned and sometimes only some. The results are not accurate. When I try to use the WFS FE Spatial Filter Intersect with MapServer 6.0.1 on a shapefile layer, sometimes no results are returned and sometimes only some. The results are not accurate. When I use a WFS FE non-spatial filter like PropertyIsEqualTo and/or combined with logical filters like AND or OR combined with the WFS FE Spatial Filter BBOX with MapServer 6.0.1 on a shapefile layer or a PostGIS layer with the the SAME data, it seems to work, but I am not 100% sure. Therefore: No problem with Apache setup, mapfiles, data, client/requests. Should be a MapServer bug... Using the same PostGIS db and shapefile all the time and mapfiles modified as minimal as possible. Kind regards, Bryan On 10/08/2011 15:16, Eichner, Andreas - SID-NLKM wrote: > Hi, > > HTTP error code 500 means: Internal Server error and is usually reported when the (F)CGI process dies. Probably a simple NULL pointer dereference due to a missing check which results in a segmentation fault... Ever tried the thing with shp2img? If this also segfaults try recompiling with debug enabled and run it trough gdb. > > Greets. > >> -----Urspr?ngliche Nachricht----- >> Von: mapserver-users-bounces at lists.osgeo.org >> [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag >> von Bryan Hempen >> Gesendet: Mittwoch, 10. August 2011 14:35 >> An: Fawcett, David (MPCA) >> Cc: mapserver-users at lists.osgeo.org >> Betreff: Re: [mapserver-users] WFS Spatial Filter Problem >> >> Hi David, >> >> I enabled debugging using the following settings: >> >> CONFIG "MS_ERRORFILE" "/home/bhempen/ms_error.txt" >> DEBUG 5 >> CONFIG "CPL_DEBUG" "ON" >> CONFIG "PROJ_DEBUG" "ON" >> >> The only line that shows up after I got an error 500 using >> the spatial filter is: >> >> [Wed Aug 10 14:30:46 2011].451858 CGI Request 1 on process 21100 >> >> Not really helpful, right? >> >> Regards, >> Bryan >> >> On 09/08/2011 15:38, Fawcett, David (MPCA) wrote: >> >> Bryan, >> >> >> >> For testing, I would enable debugging at the MAP or >> LAYER level. If you set DEBUG 5, I think that you should be >> able to see the query that MapServer is crafting. >> >> >> >> More on debugging here: >> http://mapserver.org/optimization/debugging.html#debugging >> >> >> >> David. >> >> >> >> From: mapserver-users-bounces at lists.osgeo.org >> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of >> Bryan Hempen >> Sent: Tuesday, August 09, 2011 4:15 AM >> Cc: mapserver-users at lists.osgeo.org >> Subject: Re: [mapserver-users] WFS Spatial Filter Problem >> >> >> >> Dear Kai and Assefa, >> >> >> >> >> >> After you two guys requested me to send you my setup, I >> exported the content in the databasetable to a shapefile so >> you can test it. When I tested the spatial filter right after >> that, it suddenly worked ! This narrows down the possibilities: >> >> - The request I send is definitely not the problem >> anymore. It works with MapServer + shapefile and with GeoServer. >> >> - I exported only the geometries to the shapefile in >> the table with geometrytype = POLYGON because from ~8000 >> geometries ~10 are linestrings. So I investigated possible >> problems with the linestring geometries by telling the >> MapServer not to serve them using a subquery in the mapfile: >> >> DATA "the_geom from (select * from alldata where >> geometrytype(the_geom) = 'POLYGON') as subquery using unique >> product_id using SRID=4326" >> >> Error 500 still occured. Therefore, the data can't be >> the problem neither, right? >> >> - Since I didn't change anything else MapServer must >> have problems communicating with the PostGIS database, but >> why Error 500 then? >> >> Here is my mapfile: >> >> >> MAP >> NAME "WFS Server" >> STATUS ON >> SIZE 600 400 >> SYMBOLSET >> "/var/www/html/psa/bhempen/mapservertest/symbols/symbols.sym" >> EXTENT -180 -90 180 90 >> UNITS DD >> SHAPEPATH "/var/www/html/psa/bhempen/mapservertest/data/" >> IMAGECOLOR 255 255 255 >> FONTSET >> "/var/www/html/psa/bhempen/mapservertest/fonts/fonts.list" >> MAXSIZE 4096 # needs to be set because otherwise an >> error will appear when rendering images on large screens >> >> >> #IMAGECOLOR 200 200 200 #commented out for WFS >> >> PROJECTION >> 'init=epsg:4326' >> END >> >> WEB >> TEMPLATE >> '/var/www/html/psa/bhempen/mapservertest/template.html' >> IMAGEPATH '/var/www/html/psa/bhempen/tmp/' >> IMAGEURL '/psa/bhempen/tmp/' >> METADATA >> "wfs_title" "WFS Demo >> Server for MapServer" ## REQUIRED >> "wfs_onlineresource" >> "http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.ma >> p&" >> > p&> ## Recommended >> "wfs_srs" "EPSG:4326" ## >> Recommended >> "wfs_abstract" "This text >> describes my WFS service." ## Recommended >> END >> END >> >> LAYER >> NAME "omega" >> STATUS DEFAULT >> TYPE POLYGON >> METADATA >> "wfs_title" "omega footprints" ##REQUIRED >> "wfs_srs" "EPSG:4326" ## REQUIRED >> "gml_include_items" "all" ## Optional >> (serves all attributes for layer) >> "gml_featureid" "product_id" ## REQUIRED >> END >> PROJECTION >> "init=epsg:4326" >> END >> CONNECTIONTYPE POSTGIS >> CONNECTION "host=localhost port=xxx dbname=xxx >> user=xxx password=xxx" >> DATA "the_geom from alldata using unique product_id >> using SRID=4326" >> CLASS >> STYLE >> OUTLINECOLOR 125 0 0 >> END >> END >> DUMP TRUE ## REQUIRED >> END # layer >> >> END >> >> >> >> >> Does anyone see a problem with the setup? >> >> Many thanks to Kai and Assefa for the help so far! I am >> going to send you the shapefile (which you could import into >> the database with pgsql2shp), the mapfile, and my client. >> >> Kind regards, >> Bryan >> >> >> ============================================================== >> ================================== >> This message and any attachments are intended for the >> use of the addressee or addressees only. The unauthorised disclosure, >> >> use, dissemination or copying (either in whole or in >> part) of its content is not permitted. If you received this >> message in >> >> error, please notify the sender and delete it from your >> system. Emails can be altered and their integrity cannot be >> guaranteed by >> >> the sender. >> >> Please consider the environment before printing this email. >> >> ============================================================== >> =================================== >> >> >> ============================================================== >> ================================== >> This message and any attachments are intended for the use of >> the addressee or addressees only. The unauthorised disclosure, >> >> use, dissemination or copying (either in whole or in part) of >> its content is not permitted. If you received this message in >> >> error, please notify the sender and delete it from your >> system. Emails can be altered and their integrity cannot be >> guaranteed by >> >> the sender. >> >> Please consider the environment before printing this email. >> ============================================================== >> =================================== >> ================================================================================================ This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. ================================================================================================= From esmin.gracic at gmail.com Wed Aug 17 03:55:49 2011 From: esmin.gracic at gmail.com (=?UTF-8?Q?Esmin_Graci=C4=87?=) Date: Wed, 17 Aug 2011 12:55:49 +0200 Subject: [mapserver-users] free multilayer GIS data Message-ID: Hi all, I need to make a presentation on free gis stack (apache phpmapscript pg pgrouting) to some interested party. My question is do you know where I could get some nice free GIS data with multiple layers like roads (to build pgrouting stuff on), houses, objects, gasline, powerline, optical cables, water etc... This is for demo only, so area does not have to more than 1km2. Pointing in right direction, would be helpful, too. Thanks, Esmin. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Andreas.Eichner at sid.sachsen.de Wed Aug 17 05:06:48 2011 From: Andreas.Eichner at sid.sachsen.de (Eichner, Andreas - SID-NLKM) Date: Wed, 17 Aug 2011 14:06:48 +0200 Subject: AW: AW: [mapserver-users] WFS Spatial Filter Problem References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net><32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> <56B587E7C40D2F43B54FDC1BA897AC6D037AF1DA@KS-EVS1.smi.sachsen.de> <32461_1313574994_4E4B9052_32461_2628_1_4E4B9008.5060705@sciops.esa.int> Message-ID: <56B587E7C40D2F43B54FDC1BA897AC6D037AF1E6@KS-EVS1.smi.sachsen.de> OK, now run the CGI on the command line and append the QUERY_STRING parameter carrying the request parameters: $ /usr/lib/cgi-bin/mapserv QUERY_STRING='map=&service=WFS&request=GetCapabilities' This should give you the capabilities document. If that works use your failing one. This should expectedly fail. If you can't guess right now what causes the crash you can now use gdb to locate the error if you compiled with the debug option enabled. Let us know when you find more detailes about the cause. Regards > -----Urspr?ngliche Nachricht----- > Von: Bryan Hempen [mailto:bhempen at sciops.esa.int] > Gesendet: Mittwoch, 17. August 2011 11:55 > An: Eichner, Andreas - SID-NLKM > Cc: mapserver-users at lists.osgeo.org > Betreff: Re: AW: [mapserver-users] WFS Spatial Filter Problem > > Hey guys, > > my current status report. I have tried the following list of things: > > - as proposed by Andreas, used shp2img. Works perfectly fine! > > - as proposed by Julien, took a look at the Apache error log. > Here is a > small excerpt of what it shows: > > [Wed Aug 17 10:42:15 2011] [error] [client 10.68.180.121] > 3c34000000-3c3403d000 > r-xp 00000000 fd:00 3123859 > /usr/lib64/libldap_r-2.3.so.0 > .2.31, referer: http://ssols02.esac.esa.int/psa/bhempen/tree.html > > ... > > [Wed Aug 17 10:42:15 2011] [error] [client 10.68.180.121] > 3c34a1c000-3c34a1d000 > rw-p 0001c000 fd:00 3118384 > /usr/lib64/libgeos_c.so.1.6.2 > , referer: http://ssols02.esac.esa.int/psa/bhempen/tree.html > > ... > > [Wed Aug 17 10:42:15 2011] [error] [client 10.68.180.121] > Premature end > of scrip > t headers: mapserv, referer: > http://ssols02.esac.esa.int/psa/bhempen/tree.html > > In case it could be useful to see the whole log, please just tell me. > > Now, to wrap things up again adding some new insights by testing with > different versions of the MapServer. This is what happened: > > > When I try to use the WFS FE Spatial Filter Intersect with MapServer > 5.6.5 on a PostGIS layer, it doesn't work and I get an Error 500. > When, however, I use a WFS FE Spatial Filter like Intersect with > MapServer 5.6.5 on a shapefile layer with the SAME data as > the PostGIS > layer contains, it works! > When I try to use the WFS FE Spatial Filter BBOX with > MapServer 5.6.5 on > a PostGIS layer, it works! > When I use a WFS FE non-spatial filter like PropertyIsEqualTo and/or > combined with logical filters like AND or OR combined with the WFS FE > Spatial Filter BBOX with MapServer 5.6.5 on a shapefile layer or a > PostGIS layer with the the SAME data, it works! > When I try to use the WFS FE Spatial Filter Intersect with MapServer > 6.0.1 on a PostGIS layer, sometimes no results are returned and > sometimes only some. The results are not accurate. > When I try to use the WFS FE Spatial Filter Intersect with MapServer > 6.0.1 on a shapefile layer, sometimes no results are returned and > sometimes only some. The results are not accurate. > When I use a WFS FE non-spatial filter like PropertyIsEqualTo and/or > combined with logical filters like AND or OR combined with the WFS FE > Spatial Filter BBOX with MapServer 6.0.1 on a shapefile layer or a > PostGIS layer with the the SAME data, it seems to work, but I am not > 100% sure. > > Therefore: No problem with Apache setup, mapfiles, data, > client/requests. Should be a MapServer bug... > > Using the same PostGIS db and shapefile all the time and mapfiles > modified as minimal as possible. > > Kind regards, > Bryan > > On 10/08/2011 15:16, Eichner, Andreas - SID-NLKM wrote: > > Hi, > > > > HTTP error code 500 means: Internal Server error and is > usually reported when the (F)CGI process dies. Probably a > simple NULL pointer dereference due to a missing check which > results in a segmentation fault... Ever tried the thing with > shp2img? If this also segfaults try recompiling with debug > enabled and run it trough gdb. > > > > Greets. > > > >> -----Urspr?ngliche Nachricht----- > >> Von: mapserver-users-bounces at lists.osgeo.org > >> [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag > >> von Bryan Hempen > >> Gesendet: Mittwoch, 10. August 2011 14:35 > >> An: Fawcett, David (MPCA) > >> Cc: mapserver-users at lists.osgeo.org > >> Betreff: Re: [mapserver-users] WFS Spatial Filter Problem > >> > >> Hi David, > >> > >> I enabled debugging using the following settings: > >> > >> CONFIG "MS_ERRORFILE" "/home/bhempen/ms_error.txt" > >> DEBUG 5 > >> CONFIG "CPL_DEBUG" "ON" > >> CONFIG "PROJ_DEBUG" "ON" > >> > >> The only line that shows up after I got an error 500 using > >> the spatial filter is: > >> > >> [Wed Aug 10 14:30:46 2011].451858 CGI Request 1 on process 21100 > >> > >> Not really helpful, right? > >> > >> Regards, > >> Bryan > >> > >> On 09/08/2011 15:38, Fawcett, David (MPCA) wrote: > >> > >> Bryan, > >> > >> > >> > >> For testing, I would enable debugging at the MAP or > >> LAYER level. If you set DEBUG 5, I think that you should be > >> able to see the query that MapServer is crafting. > >> > >> > >> > >> More on debugging here: > >> http://mapserver.org/optimization/debugging.html#debugging > >> > >> > >> > >> David. > >> > >> > >> > >> From: mapserver-users-bounces at lists.osgeo.org > >> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of > >> Bryan Hempen > >> Sent: Tuesday, August 09, 2011 4:15 AM > >> Cc: mapserver-users at lists.osgeo.org > >> Subject: Re: [mapserver-users] WFS Spatial Filter Problem > >> > >> > >> > >> Dear Kai and Assefa, > >> > >> > >> > >> > >> > >> After you two guys requested me to send you my setup, I > >> exported the content in the databasetable to a shapefile so > >> you can test it. When I tested the spatial filter right after > >> that, it suddenly worked ! This narrows down the possibilities: > >> > >> - The request I send is definitely not the problem > >> anymore. It works with MapServer + shapefile and with GeoServer. > >> > >> - I exported only the geometries to the shapefile in > >> the table with geometrytype = POLYGON because from ~8000 > >> geometries ~10 are linestrings. So I investigated possible > >> problems with the linestring geometries by telling the > >> MapServer not to serve them using a subquery in the mapfile: > >> > >> DATA "the_geom from (select * from alldata where > >> geometrytype(the_geom) = 'POLYGON') as subquery using unique > >> product_id using SRID=4326" > >> > >> Error 500 still occured. Therefore, the data can't be > >> the problem neither, right? > >> > >> - Since I didn't change anything else MapServer must > >> have problems communicating with the PostGIS database, but > >> why Error 500 then? > >> > >> Here is my mapfile: > >> > >> > >> MAP > >> NAME "WFS Server" > >> STATUS ON > >> SIZE 600 400 > >> SYMBOLSET > >> "/var/www/html/psa/bhempen/mapservertest/symbols/symbols.sym" > >> EXTENT -180 -90 180 90 > >> UNITS DD > >> SHAPEPATH "/var/www/html/psa/bhempen/mapservertest/data/" > >> IMAGECOLOR 255 255 255 > >> FONTSET > >> "/var/www/html/psa/bhempen/mapservertest/fonts/fonts.list" > >> MAXSIZE 4096 # needs to be set because otherwise an > >> error will appear when rendering images on large screens > >> > >> > >> #IMAGECOLOR 200 200 200 #commented out for WFS > >> > >> PROJECTION > >> 'init=epsg:4326' > >> END > >> > >> WEB > >> TEMPLATE > >> '/var/www/html/psa/bhempen/mapservertest/template.html' > >> IMAGEPATH '/var/www/html/psa/bhempen/tmp/' > >> IMAGEURL '/psa/bhempen/tmp/' > >> METADATA > >> "wfs_title" "WFS Demo > >> Server for MapServer" ## REQUIRED > >> "wfs_onlineresource" > >> "http://localhost/cgi-bin/psa/mapserv?map=/home/bhempen/wfs.ma > >> p&" > >> >> p&> ## Recommended > >> "wfs_srs" "EPSG:4326" ## > >> Recommended > >> "wfs_abstract" "This text > >> describes my WFS service." ## Recommended > >> END > >> END > >> > >> LAYER > >> NAME "omega" > >> STATUS DEFAULT > >> TYPE POLYGON > >> METADATA > >> "wfs_title" "omega footprints" ##REQUIRED > >> "wfs_srs" "EPSG:4326" ## REQUIRED > >> "gml_include_items" "all" ## Optional > >> (serves all attributes for layer) > >> "gml_featureid" "product_id" ## REQUIRED > >> END > >> PROJECTION > >> "init=epsg:4326" > >> END > >> CONNECTIONTYPE POSTGIS > >> CONNECTION "host=localhost port=xxx dbname=xxx > >> user=xxx password=xxx" > >> DATA "the_geom from alldata using unique product_id > >> using SRID=4326" > >> CLASS > >> STYLE > >> OUTLINECOLOR 125 0 0 > >> END > >> END > >> DUMP TRUE ## REQUIRED > >> END # layer > >> > >> END > >> > >> > >> > >> > >> Does anyone see a problem with the setup? > >> > >> Many thanks to Kai and Assefa for the help so far! I am > >> going to send you the shapefile (which you could import into > >> the database with pgsql2shp), the mapfile, and my client. > >> > >> Kind regards, > >> Bryan > >> > >> > >> ============================================================== > >> ================================== > >> This message and any attachments are intended for the > >> use of the addressee or addressees only. The unauthorised > disclosure, > >> > >> use, dissemination or copying (either in whole or in > >> part) of its content is not permitted. If you received this > >> message in > >> > >> error, please notify the sender and delete it from your > >> system. Emails can be altered and their integrity cannot be > >> guaranteed by > >> > >> the sender. > >> > >> Please consider the environment before printing this email. > >> > >> ============================================================== > >> =================================== > >> > >> > >> ============================================================== > >> ================================== > >> This message and any attachments are intended for the use of > >> the addressee or addressees only. The unauthorised disclosure, > >> > >> use, dissemination or copying (either in whole or in part) of > >> its content is not permitted. If you received this message in > >> > >> error, please notify the sender and delete it from your > >> system. Emails can be altered and their integrity cannot be > >> guaranteed by > >> > >> the sender. > >> > >> Please consider the environment before printing this email. > >> ============================================================== > >> =================================== > >> > > > ============================================================== > ================================== > This message and any attachments are intended for the use of > the addressee or addressees only. The unauthorised disclosure, > > use, dissemination or copying (either in whole or in part) of > its content is not permitted. If you received this message in > > error, please notify the sender and delete it from your > system. Emails can be altered and their integrity cannot be > guaranteed by > > the sender. > > Please consider the environment before printing this email. > ============================================================== > =================================== > > From wimvanbelle at gmail.com Wed Aug 17 05:25:22 2011 From: wimvanbelle at gmail.com (Wim Vanbelle) Date: Wed, 17 Aug 2011 14:25:22 +0200 Subject: [mapserver-users] free multilayer GIS data In-Reply-To: References: Message-ID: I'd start here: http://downloads.cloudmade.com/ And then look for additional data in the OpenStreetMap project. On top of those, googling around for 'open data' also comes up with a lot of info :). On 17 August 2011 12:55, Esmin Graci? wrote: > Hi all, > > I need to make a presentation on free gis stack (apache phpmapscript pg > pgrouting) to some interested party. > > My question is do you know where I could get some nice free GIS data with > multiple layers like roads (to build pgrouting stuff on), houses, objects, > gasline, powerline, optical cables, water etc... > This is for demo only, so area does not have to more than 1km2. > > Pointing in right direction, would be helpful, too. > > Thanks, Esmin. > > > > > _______________________________________________ > 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 david.fawcett at state.mn.us Wed Aug 17 06:39:40 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Wed, 17 Aug 2011 08:39:40 -0500 Subject: [mapserver-users] free multilayer GIS data In-Reply-To: References: Message-ID: For data at a smaller scale, you may also want to look at the Natural Earth data sets. Raster and vector, clean data, with attributes, liberal (Public Domain) license. David. From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Wim Vanbelle Sent: Wednesday, August 17, 2011 7:25 AM To: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] free multilayer GIS data I'd start here: http://downloads.cloudmade.com/ And then look for additional data in the OpenStreetMap project. On top of those, googling around for 'open data' also comes up with a lot of info :). On 17 August 2011 12:55, Esmin Graci? > wrote: Hi all, I need to make a presentation on free gis stack (apache phpmapscript pg pgrouting) to some interested party. My question is do you know where I could get some nice free GIS data with multiple layers like roads (to build pgrouting stuff on), houses, objects, gasline, powerline, optical cables, water etc... This is for demo only, so area does not have to more than 1km2. Pointing in right direction, would be helpful, too. Thanks, Esmin. _______________________________________________ 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 Jukka.Rahkonen at mmmtike.fi Wed Aug 17 06:40:16 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Wed, 17 Aug 2011 13:40:16 +0000 Subject: [mapserver-users] Invalid pdf file from WMS In-Reply-To: <32467_1313489461_4E4A4235_32467_8716_1_4E4A4200.80206@sciops.esa.int> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> <4E42A959.40401@mapgears.com> <32467_1313489461_4E4A4235_32467_8716_1_4E4A4200.80206@sciops.esa.int> Message-ID: <84446DEF76453C439E9E97E438E13A63019DCF@suutari.haapa.mmm.fi> Hi, This request from Mapserver 6.0 gives me a nice pdf file: http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= However, if I double the bounding box the resulting pdf cannot be opened by Acrobat reader. http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=1728&HEIGHT=1324&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= The latter gives fine image with format=image/png. Any idea about what is going wrong? -Jukka Rahkonen- From thomas.bonfort at gmail.com Wed Aug 17 06:46:05 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Wed, 17 Aug 2011 15:46:05 +0200 Subject: [mapserver-users] Invalid pdf file from WMS In-Reply-To: <84446DEF76453C439E9E97E438E13A63019DCF@suutari.haapa.mmm.fi> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> <4E42A959.40401@mapgears.com> <32467_1313489461_4E4A4235_32467_8716_1_4E4A4200.80206@sciops.esa.int> <84446DEF76453C439E9E97E438E13A63019DCF@suutari.haapa.mmm.fi> Message-ID: the second one is incomplete, the request seems to be failing. can you run the request locally to see if it segfaults, and if so provide a backtrace: /path/to/mapserver-cgi QUERY_STRING='map=/path/to/map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES=' -- thomas On Wed, Aug 17, 2011 at 15:40, Rahkonen Jukka wrote: > Hi, > > This request from Mapserver 6.0 gives me a nice pdf file: > http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= > > However, if I double the bounding box the resulting pdf cannot be opened by Acrobat reader. > http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=1728&HEIGHT=1324&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= > > The latter gives fine image with format=image/png. Any idea about what is going wrong? > > -Jukka Rahkonen-_______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From david.fawcett at state.mn.us Wed Aug 17 06:49:32 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Wed, 17 Aug 2011 08:49:32 -0500 Subject: [mapserver-users] PDF Generation - file suffix? In-Reply-To: <84446DEF76453C439E9E97E438E13A63019DCF@suutari.haapa.mmm.fi> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> <4E42A959.40401@mapgears.com> <32467_1313489461_4E4A4235_32467_8716_1_4E4A4200.80206@sciops.esa.int> <84446DEF76453C439E9E97E438E13A63019DCF@suutari.haapa.mmm.fi> Message-ID: I don't want to pollute Jukka's thread about large .pdf creation, so I am forking it. The .pdf file generated by his request renders fast and looks nice, but the file doesn't have a .pdf suffix. This confused my browser and didn't automatically associate the file with Acrobat Reader. This isn't a huge issue for me as a user, but if I am developing something for a more general audience, it will be a problem. Is there a way to ensure that the generated .pdf has the correct file suffix? http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= David. From bhempen at sciops.esa.int Wed Aug 17 08:04:16 2011 From: bhempen at sciops.esa.int (Bryan Hempen) Date: Wed, 17 Aug 2011 17:04:16 +0200 Subject: [mapserver-users] WCS GetCoverage responses in multi-part mime format Message-ID: <32470_1313593510_4E4BD8A6_32470_168406_4_4E4BD870.2070004@sciops.esa.int> Hi there! I am currently setting up a WCS server using MapServer 5.6.5. I am serving hyperspectral images and my goal is to visualize a subset of bands within a BBOX in a webclient. This should work fine if WCS 1.1.0 GetCoverage requests would not return results in a multi-part mime format as stated on http://mapserver.org/ogc/wcs_server.html#getcoverage. Browsers can't seem to deal with this type of format. I can't use WCS 1.0.0 requests because they do not allow for subsetting of bands. Since I use MapServer version 5.6.5, WCS 2.0 is not supported, but if a WCS 2.0 (as supported by MapServer 6.x) also returns GetCoverage requests in a multi-part mime format it would be useless for me anyway. Is there any way to turn off the response of WCS GetCoverage requests in a multi-part mime format in MapServer? If I upgrade to WCS 2.0, will I still have the same problem? Or does anyone know how to make a browser visualize the image-part of the reponse? I can't find anything useful on the web. Thanks for your help, Bryan ================================================================================================ This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender. Please consider the environment before printing this email. ================================================================================================= From Jukka.Rahkonen at mmmtike.fi Wed Aug 17 12:36:59 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Wed, 17 Aug 2011 19:36:59 +0000 Subject: [mapserver-users] Invalid pdf file from WMS In-Reply-To: References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> <4E42A959.40401@mapgears.com> <32467_1313489461_4E4A4235_32467_8716_1_4E4A4200.80206@sciops.esa.int> <84446DEF76453C439E9E97E438E13A63019DCF@suutari.haapa.mmm.fi>, Message-ID: <84446DEF76453C439E9E97E438E13A63019E7D@suutari.haapa.mmm.fi> Hi, Command with big BBOX does lead into segmantation fault. Unfortunately I am just an amateur and I have no idea about what is a backtrace and how I could provide it to you. The server is a virtual Linux box (Ubuntu). -Jukka Rahkonen- thomas bonfort wrote: > the second one is incomplete, the request seems to be failing. > can you run the request locally to see if it segfaults, and if so provide a backtrace: > /path/to/mapserver-cgi QUERY_STRING='map=/path/to/map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES=' -- thomas On Wed, Aug 17, 2011 at 15:40, Rahkonen Jukka wrote: > Hi, > >> This request from Mapserver 6.0 gives me a nice pdf file: >> http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= > > However, if I double the bounding box the resulting pdf cannot be opened by Acrobat reader. > http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=1728&HEIGHT=1324&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= > > The latter gives fine image with format=image/png. Any idea about what is going wrong? > > -Jukka Rahkonen-_______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From thomas.bonfort at gmail.com Wed Aug 17 12:56:45 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Wed, 17 Aug 2011 21:56:45 +0200 Subject: [mapserver-users] Invalid pdf file from WMS In-Reply-To: <84446DEF76453C439E9E97E438E13A63019E7D@suutari.haapa.mmm.fi> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> <4E42A959.40401@mapgears.com> <32467_1313489461_4E4A4235_32467_8716_1_4E4A4200.80206@sciops.esa.int> <84446DEF76453C439E9E97E438E13A63019DCF@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A63019E7D@suutari.haapa.mmm.fi> Message-ID: if gdb is installed on the system, you do: gdb /path/to/mapserv $ run QUERY_STRING='map=...&....' (...program runs and spits out the beginning of the pdf..., then segfaults) $ bt -- thomas On Wed, Aug 17, 2011 at 21:36, Rahkonen Jukka wrote: > Hi, > > Command with big BBOX does lead into segmantation fault. ?Unfortunately I am just an amateur and I have no idea about what is a backtrace and how I could provide it to you. The server is a virtual Linux box (Ubuntu). > > -Jukka Rahkonen- > > thomas bonfort wrote: > >> the second one is incomplete, the request seems to be failing. > >> can you run the request locally to see if it segfaults, and if so > provide a backtrace: > >> /path/to/mapserver-cgi > QUERY_STRING='map=/path/to/map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES=' > > -- > thomas > > On Wed, Aug 17, 2011 at 15:40, Rahkonen Jukka wrote: >> Hi, >> >>> This request from Mapserver 6.0 gives me a nice pdf file: >>> http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= >> >> However, if I double the bounding box the resulting pdf cannot be opened by Acrobat reader. >> http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=1728&HEIGHT=1324&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= >> >> The latter gives fine image with format=image/png. Any idea about what is going wrong? >> >> -Jukka Rahkonen-_______________________________________________ >> 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 Aug 17 13:46:55 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Wed, 17 Aug 2011 20:46:55 +0000 Subject: [mapserver-users] Invalid pdf file from WMS In-Reply-To: References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> <4E42A959.40401@mapgears.com> <32467_1313489461_4E4A4235_32467_8716_1_4E4A4200.80206@sciops.esa.int> <84446DEF76453C439E9E97E438E13A63019DCF@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A63019E7D@suutari.haapa.mmm.fi>, Message-ID: <84446DEF76453C439E9E97E438E13A63019EAD@suutari.haapa.mmm.fi> Hi, Amazing. I got this (gdb) bt #0 0x0013a258 in FT_Done_Face () from /usr/lib/libfreetype.so.6 #1 0x00f447c3 in ?? () from /usr/lib/libcairo.so.2 #2 0x00f4ba19 in cairo_font_face_destroy () from /usr/lib/libcairo.so.2 #3 0x0813a8b4 in ?? () #4 0x0813a9c8 in cleanupCairo () #5 0x080c5aee in ?? () #6 0x0810b406 in ?? () #7 0x0807207d in ?? () #8 0x0805c2f4 in ?? () #9 0x00fefbd6 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6 #10 0x08057881 in ?? () -Jukka- ________________________________________ L?hett?j?: thomas bonfort [thomas.bonfort at gmail.com] L?hetetty: 17. elokuuta 2011 22:56 Vastaanottaja: Rahkonen Jukka Kopio: mapserver-users at lists.osgeo.org Aihe: Re: [mapserver-users] Invalid pdf file from WMS if gdb is installed on the system, you do: gdb /path/to/mapserv $ run QUERY_STRING='map=...&....' (...program runs and spits out the beginning of the pdf..., then segfaults) $ bt -- thomas On Wed, Aug 17, 2011 at 21:36, Rahkonen Jukka wrote: > Hi, > > Command with big BBOX does lead into segmantation fault. Unfortunately I am just an amateur and I have no idea about what is a backtrace and how I could provide it to you. The server is a virtual Linux box (Ubuntu). > > -Jukka Rahkonen- > > thomas bonfort wrote: > >> the second one is incomplete, the request seems to be failing. > >> can you run the request locally to see if it segfaults, and if so > provide a backtrace: > >> /path/to/mapserver-cgi > QUERY_STRING='map=/path/to/map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES=' > > -- > thomas > > On Wed, Aug 17, 2011 at 15:40, Rahkonen Jukka wrote: >> Hi, >> >>> This request from Mapserver 6.0 gives me a nice pdf file: >>> http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= >> >> However, if I double the bounding box the resulting pdf cannot be opened by Acrobat reader. >> http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=1728&HEIGHT=1324&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= >> >> The latter gives fine image with format=image/png. Any idea about what is going wrong? >> >> -Jukka Rahkonen-_______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > From msubedee at yahoo.com Wed Aug 17 14:59:07 2011 From: msubedee at yahoo.com (Mukesh Subedee) Date: Wed, 17 Aug 2011 14:59:07 -0700 (PDT) Subject: [mapserver-users] using mod_wsgi with mapserver Message-ID: <1313618347.53375.YahooMailNeo@web161421.mail.bf1.yahoo.com> Hi all, I have configured and tested a simple application with mod_wsgi and found that its working properly. Now I am trying to use mod_wsgi with MapServer. I have configured my Apache virtual host for wsgi as:? ? Alias / /home/public_html/wsgi/ ? ? ? ? ? ? Options ExecCGI Indexes ? ? ? ? DirectoryIndex index.html index.wsgi index.cgi ? ? ? ? AddHandler cgi-script .cgi ? ? ? ? AddHandler wsgi-script .wsgi ? ? ? ? #AllowOverride None ? ? ? ? Order allow,deny ? ? ? ? Allow from all ? ? I tried running similarly as python mapscript but could not get the result.?I could not find any example that uses mod_wsgi with mapscript. Anyone have any idea how it can be used? Any working example? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From chris.green at ibstv.co.uk Thu Aug 18 00:02:16 2011 From: chris.green at ibstv.co.uk (Chris Green) Date: Thu, 18 Aug 2011 08:02:16 +0100 Subject: [mapserver-users] mapsript legend Message-ID: <042901cc5d74$c545b090$4fd111b0$@green@ibstv.co.uk> Hi all I have a map created via Mapscript under Mapserver 6.0 but I can't find a way to add a legend. Recent examples are hard to find but I found the following dating from 2002 which seemed simple enough: $legend = $map->legend; $legend->set(width,40); $legend->set(height,100); $legend->imagecolor->setRGB(240,220,200); # tan $legend->outlinecolor->setRGB(1,1,1); # black $legend->set(status, MS_EMBED); $legend->set(position, MS_UL); // SET LEGEND LABEL PROPERTIES $lg_label = $legend->label; $lg_label->set(font, "arial"); $lg_label->set(type, MS_TRUETYPE); $lg_label->set(size, 10); $lg_label->set(minsize, 6); $lg_label->set(maxsize, 12); $lg_label->color->setRGB(100,100,100); $legend->set(postlabelcache, MS_TRUE); // DRAW LEGEND $legendImage=$map->drawLegend(); Unfortunately this produces no output. Can anyone give me any clues why? Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.bonfort at gmail.com Thu Aug 18 00:11:00 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Thu, 18 Aug 2011 09:11:00 +0200 Subject: [mapserver-users] Invalid pdf file from WMS In-Reply-To: <84446DEF76453C439E9E97E438E13A63019EAD@suutari.haapa.mmm.fi> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> <4E42A959.40401@mapgears.com> <32467_1313489461_4E4A4235_32467_8716_1_4E4A4200.80206@sciops.esa.int> <84446DEF76453C439E9E97E438E13A63019DCF@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A63019E7D@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A63019EAD@suutari.haapa.mmm.fi> Message-ID: this seems to be a cairo/pdf issue, as the cairo/png works fine: http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=1728&HEIGHT=1324&LAYERS=default&TRANSPARENT=TRUE&FORMAT=cairopng&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= what cairo version are you using? can you upgrade it? -- thomas On Wed, Aug 17, 2011 at 22:46, Rahkonen Jukka wrote: > Hi, > > Amazing. I got this > > (gdb) bt > #0 ?0x0013a258 in FT_Done_Face () from /usr/lib/libfreetype.so.6 > #1 ?0x00f447c3 in ?? () from /usr/lib/libcairo.so.2 > #2 ?0x00f4ba19 in cairo_font_face_destroy () from /usr/lib/libcairo.so.2 > #3 ?0x0813a8b4 in ?? () > #4 ?0x0813a9c8 in cleanupCairo () > #5 ?0x080c5aee in ?? () > #6 ?0x0810b406 in ?? () > #7 ?0x0807207d in ?? () > #8 ?0x0805c2f4 in ?? () > #9 ?0x00fefbd6 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6 > #10 0x08057881 in ?? () > > -Jukka- > ________________________________________ > L?hett?j?: thomas bonfort [thomas.bonfort at gmail.com] > L?hetetty: 17. elokuuta 2011 22:56 > Vastaanottaja: Rahkonen Jukka > Kopio: mapserver-users at lists.osgeo.org > Aihe: Re: [mapserver-users] Invalid pdf file from WMS > > if gdb is installed on the system, you do: > > gdb /path/to/mapserv > $ run QUERY_STRING='map=...&....' > (...program runs and spits out the beginning of the pdf..., then segfaults) > $ bt > > -- > thomas > > On Wed, Aug 17, 2011 at 21:36, Rahkonen Jukka wrote: >> Hi, >> >> Command with big BBOX does lead into segmantation fault. ?Unfortunately I am just an amateur and I have no idea about what is a backtrace and how I could provide it to you. The server is a virtual Linux box (Ubuntu). >> >> -Jukka Rahkonen- >> >> thomas bonfort wrote: >> >>> the second one is incomplete, the request seems to be failing. >> >>> can you run the request locally to see if it segfaults, and if so >> provide a backtrace: >> >>> /path/to/mapserver-cgi >> QUERY_STRING='map=/path/to/map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES=' >> >> -- >> thomas >> >> On Wed, Aug 17, 2011 at 15:40, Rahkonen Jukka wrote: >>> Hi, >>> >>>> This request from Mapserver 6.0 gives me a nice pdf file: >>>> http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= >>> >>> However, if I double the bounding box the resulting pdf cannot be opened by Acrobat reader. >>> http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=1728&HEIGHT=1324&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&SRS=EPSG:2393&STYLES= >>> >>> The latter gives fine image with format=image/png. Any idea about what is going wrong? >>> >>> -Jukka Rahkonen-_______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>> >> > From Jukka.Rahkonen at mmmtike.fi Thu Aug 18 00:25:35 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Thu, 18 Aug 2011 07:25:35 +0000 Subject: [mapserver-users] Invalid pdf file from WMS In-Reply-To: References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> <4E42A959.40401@mapgears.com> <32467_1313489461_4E4A4235_32467_8716_1_4E4A4200.80206@sciops.esa.int> <84446DEF76453C439E9E97E438E13A63019DCF@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A63019E7D@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A63019EAD@suutari.haapa.mmm.fi> Message-ID: <84446DEF76453C439E9E97E438E13A63019F1E@suutari.haapa.mmm.fi> Hi, I believe I istalled Mapserver by doing something like sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable sudo apt-get update sudo apt-get install cgi-mapserver mapserver-bin If I can upgrade cairo, it depends on what you mean with "can" :) I have enough rights for the server to do it but I have used very very little Linux and do not know how to do it. But I am able to copy provided commands like in the successful gdb case. -Jukka Rahkonen- thomas bonfort wrote: > > this seems to be a cairo/pdf issue, as the cairo/png works fine: > http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERV ICE=WMS&VERSION=1.1.1&WIDTH=1728&HEIGHT=1324> &LAYERS=default&TRANSPARENT=TRUE&FORMAT=cairopng&BBOX=3409763. 750050978,6956187.032331026,3411904.266676571,6957827.104097395> &SRS=EPSG:2393&STYLES= > > what cairo version are you using? can you upgrade it? > > -- > thomas > > On Wed, Aug 17, 2011 at 22:46, Rahkonen Jukka > wrote: > > Hi, > > > > Amazing. I got this > > > > (gdb) bt > > #0 ?0x0013a258 in FT_Done_Face () from /usr/lib/libfreetype.so.6 > > #1 ?0x00f447c3 in ?? () from /usr/lib/libcairo.so.2 > > #2 ?0x00f4ba19 in cairo_font_face_destroy () from > /usr/lib/libcairo.so.2 > > #3 ?0x0813a8b4 in ?? () > > #4 ?0x0813a9c8 in cleanupCairo () > > #5 ?0x080c5aee in ?? () > > #6 ?0x0810b406 in ?? () > > #7 ?0x0807207d in ?? () > > #8 ?0x0805c2f4 in ?? () > > #9 ?0x00fefbd6 in __libc_start_main () from > /lib/tls/i686/cmov/libc.so.6 > > #10 0x08057881 in ?? () > > > > -Jukka- > > ________________________________________ > > L?hett?j?: thomas bonfort [thomas.bonfort at gmail.com] > > L?hetetty: 17. elokuuta 2011 22:56 > > Vastaanottaja: Rahkonen Jukka > > Kopio: mapserver-users at lists.osgeo.org > > Aihe: Re: [mapserver-users] Invalid pdf file from WMS > > > > if gdb is installed on the system, you do: > > > > gdb /path/to/mapserv > > $ run QUERY_STRING='map=...&....' > > (...program runs and spits out the beginning of the pdf..., > then segfaults) > > $ bt > > > > -- > > thomas > > > > On Wed, Aug 17, 2011 at 21:36, Rahkonen Jukka > wrote: > >> Hi, > >> > >> Command with big BBOX does lead into segmantation fault. ? Unfortunately I am just an amateur and I have no idea about what is > a backtrace and how I could provide it to you. The server is > a virtual Linux box (Ubuntu). > >> > >> -Jukka Rahkonen- > >> > >> thomas bonfort wrote: > >> > >>> the second one is incomplete, the request seems to be failing. > >> > >>> can you run the request locally to see if it segfaults, and if so > >> provide a backtrace: > >> > >>> /path/to/mapserver-cgi > >> > QUERY_STRING='map=/path/to/map&REQUEST=GetMap&SERVICE=WMS&VERS > ION=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE &FORMAT=application/x-pdf&BBOX=> 3409763.750050978,6956187.032331026,3411904.266676571,6957827. > 104097395&SRS=EPSG:2393&STYLES=' > >> > >> -- > >> thomas > >> > >> On Wed, Aug 17, 2011 at 15:40, Rahkonen Jukka > wrote: > >>> Hi, > >>> > >>>> This request from Mapserver 6.0 gives me a nice pdf file: > >>>> > http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERV ICE=WMS&VERSION=1.1.1&WIDTH=864&HEIGHT=662> &LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX > =3409763.750050978,6956187.032331026,3411904.266676571,6957827 > .104097395&SRS=EPSG:2393&STYLES= > >>> > >>> However, if I double the bounding box the resulting pdf > cannot be opened by Acrobat reader. > >>> > http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERV ICE=WMS&VERSION=1.1.1&WIDTH=1728&HEIGHT=1324> &LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BBOX > =3409763.750050978,6956187.032331026,3411904.266676571,6957827 > .104097395&SRS=EPSG:2393&STYLES= > >>> > >>> The latter gives fine image with format=image/png. Any > idea about what is going wrong? > >>> > >>> -Jukka Rahkonen-_______________________________________________ > >>> mapserver-users mailing list > >>> mapserver-users at lists.osgeo.org > >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users > >>> > >> > > > From silasharmeen at gmail.com Thu Aug 18 01:29:39 2011 From: silasharmeen at gmail.com (silasharmeen at gmail.com) Date: Thu, 18 Aug 2011 01:29:39 -0700 Subject: [mapserver-users] wrong nuymber of arguments for bbox Message-ID: <32954028.31632.1313656179628.JavaMail.nabble@jim.nabble.com> i want to add grib file in my .map file.i am now with this Error "WMS server Error:wrong number of arguments for bbox" From stephan at meissl.name Thu Aug 18 06:05:44 2011 From: stephan at meissl.name (Stephan =?ISO-8859-1?Q?Mei=DFl?=) Date: Thu, 18 Aug 2011 15:05:44 +0200 Subject: [mapserver-users] using mod_wsgi with mapserver In-Reply-To: <1313618347.53375.YahooMailNeo@web161421.mail.bf1.yahoo.com> References: <1313618347.53375.YahooMailNeo@web161421.mail.bf1.yahoo.com> Message-ID: <1313672744.31238.93.camel@io> Hi Mukesh, your Python script "wsgi-script.wsgi" needs to have a method named "application()" which needs to accept two parameters and has to return the response body (see e.g. [1] for details). Inside this method you can use MapScript like in the below incomplete example (see [2] for details): def application(environ, start_response): ows_req = mapscript.OWSRequest() ... mapscript.msIO_installStdoutToBuffer() dispatch_status = map.OWSDispatch( ows_req ) mapscript.msIO_stripStdoutBufferContentType() result = mapscript.msIO_getStdoutBufferBytes() ... return [result] HTH, Stephan [1] http://webpython.codepoint.net/wsgi_application_interface [2] http://mapserver.org/mapscript/mapscript.html#mapscript-functions On Wed, 2011-08-17 at 14:59 -0700, Mukesh Subedee wrote: > Hi all, > > > I have configured and tested a simple application with mod_wsgi and > found that its working properly. Now I am trying to use mod_wsgi with > MapServer. I have configured my Apache virtual host for wsgi as: > > Alias / /home/public_html/wsgi/ > > > Options ExecCGI Indexes > DirectoryIndex index.html index.wsgi index.cgi > > AddHandler cgi-script .cgi > > AddHandler wsgi-script .wsgi > #AllowOverride None > > Order allow,deny > Allow from all > > > > I tried running similarly as python mapscript but could not get the > result. I could not find any example that uses mod_wsgi with > mapscript. Anyone have any idea how it can be used? Any working > example? > > > Thanks, > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From stephan at meissl.name Thu Aug 18 06:29:52 2011 From: stephan at meissl.name (Stephan =?ISO-8859-1?Q?Mei=DFl?=) Date: Thu, 18 Aug 2011 15:29:52 +0200 Subject: [mapserver-users] WCS GetCoverage responses in multi-part mime format In-Reply-To: <32470_1313593510_4E4BD8A6_32470_168406_4_4E4BD870.2070004@sciops.esa.int> References: <32470_1313593510_4E4BD8A6_32470_168406_4_4E4BD870.2070004@sciops.esa.int> Message-ID: <1313674192.31238.120.camel@io> Bryan, from my experience firefox does pretty good with multipart files. Usually the first part is of type "text/xml" which is shown in the browser directly and the second part is opened in an external image viewer. Unfortunately I don't know a way how to turn multipart of with WCS 1.1. However, I do know that in WCS 2.0 you explicitly have to request multipart files ("mediatype=multipart/mixed") which means by default plain image files are returned. Please note that WCS 2.0 is a fairly new standard which adopts the new modular specification model of OGC and some of the extensions are not yet published which might cause some problems for the time being. Best regards, Stephan On Wed, 2011-08-17 at 17:04 +0200, Bryan Hempen wrote: > Hi there! > > I am currently setting up a WCS server using MapServer 5.6.5. I am > serving hyperspectral images and my goal is to visualize a subset of > bands within a BBOX in a webclient. This should work fine if WCS 1.1.0 > GetCoverage requests would not return results in a multi-part mime > format as stated on > http://mapserver.org/ogc/wcs_server.html#getcoverage. Browsers can't > seem to deal with this type of format. > > I can't use WCS 1.0.0 requests because they do not allow for subsetting > of bands. > Since I use MapServer version 5.6.5, WCS 2.0 is not supported, but if a > WCS 2.0 (as supported by MapServer 6.x) also returns GetCoverage > requests in a multi-part mime format it would be useless for me anyway. > > Is there any way to turn off the response of WCS GetCoverage requests in > a multi-part mime format in MapServer? > > If I upgrade to WCS 2.0, will I still have the same problem? > > Or does anyone know how to make a browser visualize the image-part of > the reponse? I can't find anything useful on the web. > > Thanks for your help, > Bryan > > ================================================================================================ > This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, > > use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in > > error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by > > the sender. > > Please consider the environment before printing this email. > ================================================================================================= > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From Stuart.Harlan at modot.mo.gov Thu Aug 18 07:10:12 2011 From: Stuart.Harlan at modot.mo.gov (Stuart.Harlan at modot.mo.gov) Date: Thu, 18 Aug 2011 09:10:12 -0500 Subject: [mapserver-users] Java Crash Message-ID: I compiled MapServer 6.0.1 on Windows, with threads, and removed the components marked "unsafe". I also built the Java Mapscript component, targeting the 1.5 JVM. I can generate a map image, and save it to a file using the Java method "imageObj.save(filename, map)". However, when I try to call "imageObj.getBytes", the JVM crashes. Any ideas? Thanks. Stuart Harlan -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.brunner at camptocamp.com Thu Aug 18 08:49:50 2011 From: stephane.brunner at camptocamp.com (=?ISO-8859-1?Q?St=E9phane_Brunner?=) Date: Thu, 18 Aug 2011 17:49:50 +0200 Subject: [mapserver-users] Problem GetFeature with geom filter on WFS In-Reply-To: References: Message-ID: Hello Steve, Sorry for the delay. I as on holiday last couple of weeks but the issue is still a blocker for us. Your say ? PostGIS should be returning an appropriate set of candidate features ? but with our request PostGIS returns only the 100 first features (a subset of all features) without taking any geographical aspect into account. MapServer filters them correctly but as we get only the 100 first results from the DB, we miss many objects and/or they are not related to the area where we want to apply a geographical filter. We've done a test on how MapServer handles the 100 first results and it's working. We also tested the behavior with a SHP file and it works like a charm, there is no limitation. For our understanding, there is an issue in the way mapserver pass the query to PostGIS as there is an inappropriate LIMIT value in the SQL statement and mapserver doesn't seem to pass a BBOX in order to prefilter the set in the DB. Best regards St?phane Brunner 2011/7/30 Steve Lime : > The filter encoding code only translates certain things into native SQL, the rest is handled in a uniform way within MapServer. Hopefully this will change over time and more processing will be moved to the database but there hasn't been time to do that yet, maybe for 6.2. > > PostGIS should be returning an appropriate set of candidate features for MapServer to perform additional filtering. Shapefiles work the same way. If you look at the SQL executed by Postgres you should see all of the matching features plus a few more. > > Steve > > Sent from my iPad > > On Jul 28, 2011, at 9:18 AM, St?phane Brunner wrote: > >> Hello, >> >> I log the sql request on spatial filter and I have this: >> select "oid","nummer","gemeinde","gueltigkeit","flgrundb","quote","eigentuemer","adresse_lang",encode(ST_AsBinary(ST_Force_2D("geom"),'NDR'),'hex') >> as geom,"oid" from (SELECT oid, t1.geom, t1.nummer, t2.gemeinde, >> t1.gueltigkeit1_txt as gueltigkeit, t2.flgrundb, ((t2.zaehler::text || >> '/'::text) || t2.nenner::text) AS quote, t2.eigentuemer, >> (((t2.adresse::text || ', '::text) || t2.plz::text) || ' '::text) || >> t2.ort::text AS adresse_lang FROM av.liegenschaften_liegenschaft_area >> as t1, av.view_gemlis_geomaste_parzelle as t2 WHERE t1.gdid = t2.gdeid >> and t1.nummer = t2.parznr::text) AS foo where geom && >> GeomFromText('POLYGON((620000 218000,620000 278000,690000 >> 278000,690000 218000,620000 218000))',-1) limit 100 >> >> I didn't see any postggis filter than I try to do a spatial filter on >> one of the 100 first results >> Than I have a correct result ... >> >> Than why mapserver doesn't use postgis spatial filter ? Does I miss something ? >> >> Thank-you in advance >> St?phane Brunner >> >> >> >> 2011/7/26 St?phane Brunner : >>> Hello, >>> >>> I just test it with a shape file, and it's working... >>> I will investigate a little bit more to know why it's not working with postgres. >>> >>> Sincerely >>> St?phane Brunner >>> >>> >>> 2011/7/25 Steve Lime : >>>> Never mind on version, I saw 6.0.0 in the response... ;-) Steve >>>> >>>> On Mon, Jul 25, 2011 at 6:19 AM, St?phane Brunner >>>> wrote: >>>>> >>>>> Hello, >>>>> >>>>> I have the mapfile [0]. when I done a GetFeature on the nummer [1] I >>>>> have 4 results [2] (with duplicate but it's an other issue). >>>>> When I done a spatial filter [3] I have no results [4] but I should >>>>> have at least one result ... >>>>> >>>>> Thanks in advance for having a look on this issue. >>>>> >>>>> Sincerely yours >>>>> St?phane Brunner >>>>> >>>>> Following: specified, GetCapabilities [5], describefeaturetype [6]. >>>>> >>>>> mapfile [0]: >>>>> MAP >>>>> ? ?NAME "map" >>>>> >>>>> ? ?EXTENT 620000 218000 690000 278000 >>>>> >>>>> ? ?UNITS METERS >>>>> ? ?IMAGETYPE jpeg >>>>> ? ?RESOLUTION 72 >>>>> ? ?DEFRESOLUTION 72 >>>>> ? ?IMAGECOLOR 255 255 255 >>>>> ? ?STATUS ON >>>>> ? ?FONTSET "fonts.conf" >>>>> ? ?SYMBOLSET "symbole.sym" >>>>> ? ?MAXSIZE 5000 >>>>> >>>>> ? ?PROJECTION >>>>> ? ? ? ?"init=epsg:21781" >>>>> ? ?END >>>>> >>>>> ? ?#### >>>>> ? ?# Used by overlays >>>>> ? ?#### >>>>> ? ?OUTPUTFORMAT >>>>> ? ? ? ?NAME png256 >>>>> ? ? ? ?DRIVER AGG/PNG >>>>> ? ? ? ?MIMETYPE "image/png256" >>>>> ? ? ? ?IMAGEMODE RGBA >>>>> ? ? ? ?EXTENSION "png" >>>>> ? ? ? ?FORMATOPTION "INTERLACE=OFF" >>>>> ? ? ? ?FORMATOPTION "QUANTIZE_FORCE=ON" >>>>> ? ? ? ?FORMATOPTION "QUANTIZE_DITHER=OFF" >>>>> ? ? ? ?FORMATOPTION "QUANTIZE_COLORS=256" >>>>> ? ?END >>>>> ? ?OUTPUTFORMAT >>>>> ? ? ? ?NAME png >>>>> ? ? ? ?DRIVER AGG/PNG >>>>> ? ? ? ?MIMETYPE "image/png" >>>>> ? ? ? ?IMAGEMODE RGBA >>>>> ? ? ? ?EXTENSION "png" >>>>> ? ? ? ?FORMATOPTION "INTERLACE=OFF" >>>>> ? ? ? ?FORMATOPTION "QUANTIZE_DITHER=OFF" >>>>> ? ?END >>>>> >>>>> ? ?WEB >>>>> ? ? ? ?METADATA >>>>> ? ? ? ? ? ?"ows_title" "map" >>>>> ? ? ? ? ? ?"ows_srs" "epsg:21781" >>>>> ? ? ? ? ? ?"ows_encoding" "UTF-8" >>>>> ? ? ? ? ? ?"wms_feature_info_mime_type" "application/vnd.ogc.gml" >>>>> ? ? ? ? ? ?"wms_enable_request" "*" >>>>> ? ? ? ? ? ?"ows_enable_request" "*" >>>>> ? ? ? ? ? ?"gml_include_items" "all" >>>>> ? ? ? ? ? ?"gml_featureid" "id" >>>>> ? ? ? ? ? ?"wfs_title" "map" >>>>> ? ? ? ? ? ?"wfs_srs" "epsg:21781" >>>>> ? ? ? ?END >>>>> ? ? ? ?IMAGEPATH '/var/tmp/' >>>>> ? ?END >>>>> >>>>> ? ?LEGEND >>>>> ? ? ? ?IMAGECOLOR 240 240 240 >>>>> ? ? ? ?LABEL >>>>> ? ? ? ? ? ?FONT arial >>>>> ? ? ? ? ? ?ANTIALIAS true >>>>> ? ? ? ? ? ?TYPE truetype >>>>> ? ? ? ? ? ?SIZE 9 >>>>> ? ? ? ? ? ?COLOR 0 0 0 >>>>> ? ? ? ?END >>>>> ? ?END >>>>> >>>>> >>>>> LAYER >>>>> ?NAME "Liegenschaft_Query" >>>>> ?TYPE POLYGON >>>>> ?STATUS ON >>>>> ?TEMPLATE fooOnlyForWMSGetFeatureInfo >>>>> ?CONNECTIONTYPE postgis >>>>> ?PROCESSING "CLOSE_CONNECTION=DEFER" >>>>> ?CONNECTION "user=www-data password=www-data dbname=dev host=localhost" >>>>> ?DATA "geom from (SELECT oid, t1.geom, t1.nummer FROM >>>>> av.view_i_liegenschaft_all AS t1) AS foo using unique oid using >>>>> SRID=-1" >>>>> # ?GROUP "TOPIC_Liegenschaften_LN" >>>>> ?EXTENT 620000 218000 690000 278000 >>>>> ?METADATA >>>>> ? ?"ows_title" "Liegenschaft_Query" >>>>> ? ?"ows_srs" "epsg:21781" >>>>> ? ?"id_attribute_string" "oid" >>>>> ? ?"ows_featureid" "oid" >>>>> ? ?"ows_geometries" "geom" >>>>> ? ?"ows_geom_type" "polygon" >>>>> ? ?"query_returned_attributes" "nummer" >>>>> ? ?"gml_include_items" "oid,nummer,geom" >>>>> ? ?"gml_geometries" "geom" >>>>> ? ?"gml_geom_type" "polygon" >>>>> ? ?"gml_nummer_type" "Character" >>>>> ? ?#"gml_groups" "TOPIC_Liegenschaften_LN" >>>>> ? ?"gml_featureid" "oid" >>>>> ? ?"wfs_title" "Liegenschaft_Query" >>>>> ? ?"wfs_srs" "epsg:21781" >>>>> ?END >>>>> ?DUMP TRUE >>>>> ?PROJECTION >>>>> ? ? ?"init=epsg:21781" >>>>> ?END >>>>> >>>>> ?CLASS >>>>> ? ?NAME "Liegenschaft" >>>>> ? ?STYLE >>>>> ? ? ?SYMBOL "circle" >>>>> ? ? ?SIZE 3 >>>>> ? ? ?OUTLINECOLOR 0 0 0 >>>>> ? ?END >>>>> ?END >>>>> END >>>>> END >>>>> >>>>> query on the nummer [1]: >>>>> >>>> version="1.0.0" maxFeatures="100" >>>>> xsi:schemaLocation="http://www.opengis.net/wfs >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >>>>> >>>> xmlns:feature="http://mapserver.gis.umn.edu/mapserver"> >>>>> >>>>> >>>>> nummer >>>>> 3634 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> response on the nummer [2]: >>>>> >>>>> >>>> ? xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>>>> ? xmlns:wfs="http://www.opengis.net/wfs" >>>>> ? xmlns:gml="http://www.opengis.net/gml" >>>>> ? xmlns:ogc="http://www.opengis.net/ogc" >>>>> ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>> ? xsi:schemaLocation="http://www.opengis.net/wfs >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd >>>>> ? ? ? ? ? ? ? ? ? ? ? http://mapserver.gis.umn.edu/mapserver >>>>> >>>>> http://c2cpc89.camptocamp.com/sbrunner/mapserv?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=feature:Liegenschaft_Query&OUTPUTFORMAT=XMLSCHEMA"> >>>>> ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ? ? ? ?661054.808000,244611.321000 >>>>> 663053.704000,244888.622000 >>>>> ? ? ? ? >>>>> ? ? ? >>>>> ? ? >>>>> ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ? ? ? ? >>>>> ? ? ? ? ? ? ? ? ? ? ? ?661054.808000,244854.251000 >>>>> 661088.687000,244888.622000 >>>>> ? ? ? ? ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ? >>>>> ? ? ? ? ? ? >>>>> ? ? ? ? ? ? ?661076.579000,244888.622000 >>>>> 661054.808000,244875.484000 661062.744000,244858.448000 >>>>> 661064.653000,244854.251000 661088.687000,244869.173000 >>>>> 661076.579000,244888.622000 >>>>> ? ? ? ? ? ? >>>>> ? ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ?2380997 >>>>> ? ? ? ?3634 >>>>> ? ? ? >>>>> ? ? >>>>> ? ? >>>>> ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ? ? ? ? >>>>> ? ? ? ? ? ? ? ? ? ? ? ?661054.808000,244854.251000 >>>>> 661088.687000,244888.622000 >>>>> ? ? ? ? ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ? >>>>> ? ? ? ? ? ? >>>>> ? ? ? ? ? ? ?661076.579000,244888.622000 >>>>> 661054.808000,244875.484000 661062.744000,244858.448000 >>>>> 661064.653000,244854.251000 661088.687000,244869.173000 >>>>> 661076.579000,244888.622000 >>>>> ? ? ? ? ? ? >>>>> ? ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ?2380997 >>>>> ? ? ? ?3634 >>>>> ? ? ? >>>>> ? ? >>>>> ? ? >>>>> ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ? ? ? ? >>>>> ? ? ? ? ? ? ? ? ? ? ? ?663017.565000,244611.321000 >>>>> 663053.704000,244650.084000 >>>>> ? ? ? ? ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ? >>>>> ? ? ? ? ? ? >>>>> ? ? ? ? ? ? ?663017.565000,244635.722000 >>>>> 663033.235000,244611.321000 663045.949000,244619.485000 >>>>> 663053.704000,244626.417000 663034.337000,244650.084000 >>>>> 663017.565000,244635.722000 >>>>> ? ? ? ? ? ? >>>>> ? ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ?2384539 >>>>> ? ? ? ?3634 >>>>> ? ? ? >>>>> ? ? >>>>> ? ? >>>>> ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ? ? ? ? >>>>> ? ? ? ? ? ? ? ? ? ? ? ?663017.565000,244611.321000 >>>>> 663053.704000,244650.084000 >>>>> ? ? ? ? ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ? >>>>> ? ? ? ? ? ? >>>>> ? ? ? ? ? ? ?663017.565000,244635.722000 >>>>> 663033.235000,244611.321000 663045.949000,244619.485000 >>>>> 663053.704000,244626.417000 663034.337000,244650.084000 >>>>> 663017.565000,244635.722000 >>>>> ? ? ? ? ? ? >>>>> ? ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ?2384539 >>>>> ? ? ? ?3634 >>>>> ? ? ? >>>>> ? ? >>>>> >>>>> >>>>> >>>>> query with spatial filter [3]: >>>>> >>>> version="1.0.0" maxFeatures="100" >>>>> xsi:schemaLocation="http://www.opengis.net/wfs >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >>>>> >>>> xmlns:feature="http://mapserver.gis.umn.edu/mapserver"> >>>>> >>>>> >>>>> geom >>>>> >>>>> 661070.024,244872.084 >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> response with spatial filter [4]: >>>>> >>>>> >>>> ? xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>>>> ? xmlns:wfs="http://www.opengis.net/wfs" >>>>> ? xmlns:gml="http://www.opengis.net/gml" >>>>> ? xmlns:ogc="http://www.opengis.net/ogc" >>>>> ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>> ? xsi:schemaLocation="http://www.opengis.net/wfs >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd >>>>> ? ? ? ? ? ? ? ? ? ? ? http://mapserver.gis.umn.edu/mapserver >>>>> >>>>> http://c2cpc89.camptocamp.com/sbrunner/mapserv?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=feature:Liegenschaft_Query&OUTPUTFORMAT=XMLSCHEMA"> >>>>> ? >>>>> ? ? ?missing >>>>> ? >>>>> >>>>> >>>>> >>>>> GetCapabilities [5]: >>>>> >>>>> >>>> ? version="1.0.0" >>>>> ? updateSequence="0" >>>>> ? xmlns="http://www.opengis.net/wfs" >>>>> ? xmlns:ogc="http://www.opengis.net/ogc" >>>>> ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>> ? xsi:schemaLocation="http://www.opengis.net/wfs >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd"> >>>>> >>>>> >>>>> >>>>> >>>>> ?MapServer WFS >>>>> ?Amtliche Vermessung >>>>> ?Die amtliche Vermessung nach DM01 Darstellung als WMS >>>>> Dienst f?r MapFish Projekte >>>>> >>>>> ?http://c2cpc89.camptocamp.com/sbrunner/mapserv? >>>>> >>>>> >>>>> >>>>> >>>>> ? >>>>> ? ? >>>>> ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ?>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" >>>>> /> >>>>> ? ? ? ? >>>>> ? ? ? >>>>> >>>>> ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ?>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" /> >>>>> ? ? ? ? >>>>> ? ? ? >>>>> ? ? >>>>> ? ? >>>>> ? ? ? >>>>> ? ? ? ? >>>>> >>>>> ? ? ? >>>>> ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ?>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" >>>>> /> >>>>> ? ? ? ? >>>>> ? ? ? >>>>> ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ?>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" /> >>>>> >>>>> ? ? ? ? >>>>> ? ? ? >>>>> ? ? >>>>> ? ? >>>>> ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? >>>>> ? ? ? >>>>> ? ? ? ? >>>>> >>>>> ? ? ? ? ?>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" >>>>> /> >>>>> ? ? ? ? >>>>> ? ? ? >>>>> ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? ? ?>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" /> >>>>> ? ? ? ? >>>>> ? ? ? >>>>> ? ? >>>>> >>>>> ? >>>>> >>>>> >>>>> >>>>> ? >>>>> ? ? >>>>> ? >>>>> ? ? >>>>> ? ? ? ?Liegenschaft_Query >>>>> ? ? ? ?Liegenschaft_Query >>>>> >>>>> ? ? ? ?epsg:21781 >>>>> ? ? ? ?>>>> maxy="278000" /> >>>>> ? ? >>>>> ? ? >>>>> ? ? ? ?Liegenschaft_Query_ALL >>>>> ? ? ? ?Liegenschaft_Query_ALL >>>>> ? ? ? ?epsg:21781 >>>>> >>>>> ? ? ? ?>>>> maxy="278000" /> >>>>> ? ? >>>>> >>>>> >>>>> >>>>> ? >>>>> ? ? >>>>> ? ? ? >>>>> ? ? ? >>>>> ? ? ? >>>>> >>>>> ? ? ? >>>>> ? ? ? >>>>> ? ? ? >>>>> ? ? ? >>>>> ? ? ? >>>>> ? ? ? >>>>> ? ? ? >>>>> ? ? >>>>> ? >>>>> >>>>> ? >>>>> ? ? >>>>> ? ? >>>>> ? ? ? >>>>> ? ? ? >>>>> ? ? ? >>>>> ? ? >>>>> ? >>>>> >>>>> >>>>> >>>>> >>>>> describefeaturetype [6]: >>>>> >>>>> >>>> ? targetNamespace="http://mapserver.gis.umn.edu/mapserver" >>>>> ? xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>>>> ? xmlns:ogc="http://www.opengis.net/ogc" >>>>> ? xmlns:xsd="http://www.w3.org/2001/XMLSchema" >>>>> ? xmlns="http://www.w3.org/2001/XMLSchema" >>>>> ? xmlns:gml="http://www.opengis.net/gml" >>>>> ? elementFormDefault="qualified" version="0.1" > >>>>> >>>>> ?>>>> ? ? ? ? ?schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd" >>>>> /> >>>>> >>>>> ?>>>> ? ? ? ? ? type="ms:Liegenschaft_QueryType" >>>>> ? ? ? ? ? substitutionGroup="gml:_Feature" /> >>>>> >>>>> ? >>>>> ? ? >>>>> ? ? ? >>>>> ? ? ? ? >>>>> >>>>> ? ? ? ? ?>>>> minOccurs="0" maxOccurs="1"/> >>>>> ? ? ? ? ? >>>>> ? ? ? ? ? >>>>> ? ? ? ? >>>>> ? ? ? >>>>> ? ? >>>>> ? >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> camptocamp.com >>>>> mapfish.org >>>>> _______________________________________________ >>>>> mapserver-users mailing list >>>>> mapserver-users at lists.osgeo.org >>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>>> >>>> >>> >>> >>> >>> -- >>> camptocamp.com >>> mapfish.org >>> >> >> >> >> -- >> camptocamp.com >> mapfish.org > -- camptocamp.com mapfish.org From Jukka.Rahkonen at mmmtike.fi Thu Aug 18 09:23:08 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Thu, 18 Aug 2011 16:23:08 +0000 Subject: [mapserver-users] Problem GetFeature with geom filter on WFS In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A6301A120@suutari.haapa.mmm.fi> Hi, I agree that if Mapserver is doing the final filtering then passing maxFeatures="100" value for the query selecting the candidates is not right. But have you tested what happens if you run your WFS query without maxFeatures? It would be good to know if the result set is OK then. -Jukka Rahkonen- St?phane Brunner wrote: > > Hello Steve, > > Sorry for the delay. I as on holiday last couple of weeks but the > issue is still a blocker for us. > > Your say ? PostGIS should be returning an appropriate set of candidate > features ? but with our request PostGIS returns only the 100 first > features (a subset of all features) without taking any geographical > aspect into account. MapServer filters them correctly but as we get > only the 100 first results from the DB, we miss many objects and/or > they are not related to the area where we want to apply a geographical > filter. We've done a test on how MapServer handles the 100 first > results and it's working. > > We also tested the behavior with a SHP file and it works like a charm, > there is no limitation. For our understanding, there is an issue in > the way mapserver pass the query to PostGIS as there is an > inappropriate LIMIT value in the SQL statement and mapserver doesn't > seem to pass a BBOX in order to prefilter the set in the DB. > > Best regards > St?phane Brunner > > > 2011/7/30 Steve Lime : > > The filter encoding code only translates certain things > into native SQL, the rest is handled in a uniform way within > MapServer. Hopefully this will change over time and more > processing will be moved to the database but there hasn't > been time to do that yet, maybe for 6.2. > > > > PostGIS should be returning an appropriate set of candidate > features for MapServer to perform additional filtering. > Shapefiles work the same way. If you look at the SQL executed > by Postgres you should see all of the matching features plus > a few more. > > > > Steve > > > > Sent from my iPad > > > > On Jul 28, 2011, at 9:18 AM, St?phane Brunner > wrote: > > > >> Hello, > >> > >> I log the sql request on spatial filter and I have this: > >> select > "oid","nummer","gemeinde","gueltigkeit","flgrundb","quote","ei > gentuemer","adresse_lang",encode(ST_AsBinary(ST_Force_2D("geom "),'NDR'),'hex') > >> as geom,"oid" from (SELECT oid, t1.geom, t1.nummer, t2.gemeinde, > >> t1.gueltigkeit1_txt as gueltigkeit, t2.flgrundb, > ((t2.zaehler::text || > >> '/'::text) || t2.nenner::text) AS quote, t2.eigentuemer, > >> (((t2.adresse::text || ', '::text) || t2.plz::text) || ' > '::text) || > >> t2.ort::text AS adresse_lang FROM > av.liegenschaften_liegenschaft_area > >> as t1, av.view_gemlis_geomaste_parzelle as t2 WHERE > t1.gdid = t2.gdeid > >> and t1.nummer = t2.parznr::text) AS foo where geom && > >> GeomFromText('POLYGON((620000 218000,620000 278000,690000 > >> 278000,690000 218000,620000 218000))',-1) limit 100 > >> > >> I didn't see any postggis filter than I try to do a > spatial filter on > >> one of the 100 first results > >> Than I have a correct result ... > >> > >> Than why mapserver doesn't use postgis spatial filter ? > Does I miss something ? > >> > >> Thank-you in advance > >> St?phane Brunner > >> > >> > >> > >> 2011/7/26 St?phane Brunner : > >>> Hello, > >>> > >>> I just test it with a shape file, and it's working... > >>> I will investigate a little bit more to know why it's not > working with postgres. > >>> > >>> Sincerely > >>> St?phane Brunner > >>> > >>> > >>> 2011/7/25 Steve Lime : > >>>> Never mind on version, I saw 6.0.0 in the response... ;-) Steve > >>>> > >>>> On Mon, Jul 25, 2011 at 6:19 AM, St?phane Brunner > >>>> wrote: > >>>>> > >>>>> Hello, > >>>>> > >>>>> I have the mapfile [0]. when I done a GetFeature on the > nummer [1] I > >>>>> have 4 results [2] (with duplicate but it's an other issue). > >>>>> When I done a spatial filter [3] I have no results [4] > but I should > >>>>> have at least one result ... > >>>>> > >>>>> Thanks in advance for having a look on this issue. > >>>>> > >>>>> Sincerely yours > >>>>> St?phane Brunner > >>>>> > >>>>> Following: specified, GetCapabilities [5], > describefeaturetype [6]. > >>>>> > >>>>> mapfile [0]: > >>>>> MAP > >>>>> ? ?NAME "map" > >>>>> > >>>>> ? ?EXTENT 620000 218000 690000 278000 > >>>>> > >>>>> ? ?UNITS METERS > >>>>> ? ?IMAGETYPE jpeg > >>>>> ? ?RESOLUTION 72 > >>>>> ? ?DEFRESOLUTION 72 > >>>>> ? ?IMAGECOLOR 255 255 255 > >>>>> ? ?STATUS ON > >>>>> ? ?FONTSET "fonts.conf" > >>>>> ? ?SYMBOLSET "symbole.sym" > >>>>> ? ?MAXSIZE 5000 > >>>>> > >>>>> ? ?PROJECTION > >>>>> ? ? ? ?"init=epsg:21781" > >>>>> ? ?END > >>>>> > >>>>> ? ?#### > >>>>> ? ?# Used by overlays > >>>>> ? ?#### > >>>>> ? ?OUTPUTFORMAT > >>>>> ? ? ? ?NAME png256 > >>>>> ? ? ? ?DRIVER AGG/PNG > >>>>> ? ? ? ?MIMETYPE "image/png256" > >>>>> ? ? ? ?IMAGEMODE RGBA > >>>>> ? ? ? ?EXTENSION "png" > >>>>> ? ? ? ?FORMATOPTION "INTERLACE=OFF" > >>>>> ? ? ? ?FORMATOPTION "QUANTIZE_FORCE=ON" > >>>>> ? ? ? ?FORMATOPTION "QUANTIZE_DITHER=OFF" > >>>>> ? ? ? ?FORMATOPTION "QUANTIZE_COLORS=256" > >>>>> ? ?END > >>>>> ? ?OUTPUTFORMAT > >>>>> ? ? ? ?NAME png > >>>>> ? ? ? ?DRIVER AGG/PNG > >>>>> ? ? ? ?MIMETYPE "image/png" > >>>>> ? ? ? ?IMAGEMODE RGBA > >>>>> ? ? ? ?EXTENSION "png" > >>>>> ? ? ? ?FORMATOPTION "INTERLACE=OFF" > >>>>> ? ? ? ?FORMATOPTION "QUANTIZE_DITHER=OFF" > >>>>> ? ?END > >>>>> > >>>>> ? ?WEB > >>>>> ? ? ? ?METADATA > >>>>> ? ? ? ? ? ?"ows_title" "map" > >>>>> ? ? ? ? ? ?"ows_srs" "epsg:21781" > >>>>> ? ? ? ? ? ?"ows_encoding" "UTF-8" > >>>>> ? ? ? ? ? ?"wms_feature_info_mime_type" > "application/vnd.ogc.gml" > >>>>> ? ? ? ? ? ?"wms_enable_request" "*" > >>>>> ? ? ? ? ? ?"ows_enable_request" "*" > >>>>> ? ? ? ? ? ?"gml_include_items" "all" > >>>>> ? ? ? ? ? ?"gml_featureid" "id" > >>>>> ? ? ? ? ? ?"wfs_title" "map" > >>>>> ? ? ? ? ? ?"wfs_srs" "epsg:21781" > >>>>> ? ? ? ?END > >>>>> ? ? ? ?IMAGEPATH '/var/tmp/' > >>>>> ? ?END > >>>>> > >>>>> ? ?LEGEND > >>>>> ? ? ? ?IMAGECOLOR 240 240 240 > >>>>> ? ? ? ?LABEL > >>>>> ? ? ? ? ? ?FONT arial > >>>>> ? ? ? ? ? ?ANTIALIAS true > >>>>> ? ? ? ? ? ?TYPE truetype > >>>>> ? ? ? ? ? ?SIZE 9 > >>>>> ? ? ? ? ? ?COLOR 0 0 0 > >>>>> ? ? ? ?END > >>>>> ? ?END > >>>>> > >>>>> > >>>>> LAYER > >>>>> ?NAME "Liegenschaft_Query" > >>>>> ?TYPE POLYGON > >>>>> ?STATUS ON > >>>>> ?TEMPLATE fooOnlyForWMSGetFeatureInfo > >>>>> ?CONNECTIONTYPE postgis > >>>>> ?PROCESSING "CLOSE_CONNECTION=DEFER" > >>>>> ?CONNECTION "user=www-data password=www-data dbname=dev > host=localhost" > >>>>> ?DATA "geom from (SELECT oid, t1.geom, t1.nummer FROM > >>>>> av.view_i_liegenschaft_all AS t1) AS foo using unique oid using > >>>>> SRID=-1" > >>>>> # ?GROUP "TOPIC_Liegenschaften_LN" > >>>>> ?EXTENT 620000 218000 690000 278000 > >>>>> ?METADATA > >>>>> ? ?"ows_title" "Liegenschaft_Query" > >>>>> ? ?"ows_srs" "epsg:21781" > >>>>> ? ?"id_attribute_string" "oid" > >>>>> ? ?"ows_featureid" "oid" > >>>>> ? ?"ows_geometries" "geom" > >>>>> ? ?"ows_geom_type" "polygon" > >>>>> ? ?"query_returned_attributes" "nummer" > >>>>> ? ?"gml_include_items" "oid,nummer,geom" > >>>>> ? ?"gml_geometries" "geom" > >>>>> ? ?"gml_geom_type" "polygon" > >>>>> ? ?"gml_nummer_type" "Character" > >>>>> ? ?#"gml_groups" "TOPIC_Liegenschaften_LN" > >>>>> ? ?"gml_featureid" "oid" > >>>>> ? ?"wfs_title" "Liegenschaft_Query" > >>>>> ? ?"wfs_srs" "epsg:21781" > >>>>> ?END > >>>>> ?DUMP TRUE > >>>>> ?PROJECTION > >>>>> ? ? ?"init=epsg:21781" > >>>>> ?END > >>>>> > >>>>> ?CLASS > >>>>> ? ?NAME "Liegenschaft" > >>>>> ? ?STYLE > >>>>> ? ? ?SYMBOL "circle" > >>>>> ? ? ?SIZE 3 > >>>>> ? ? ?OUTLINECOLOR 0 0 0 > >>>>> ? ?END > >>>>> ?END > >>>>> END > >>>>> END > >>>>> > >>>>> query on the nummer [1]: > >>>>> service="WFS" > >>>>> version="1.0.0" maxFeatures="100" > >>>>> xsi:schemaLocation="http://www.opengis.net/wfs > >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" > >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > >>>>> >>>>> xmlns:feature="http://mapserver.gis.umn.edu/mapserver"> > >>>>> > >>>>> > >>>>> nummer > >>>>> 3634 > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> response on the nummer [2]: > >>>>> > >>>>> >>>>> ? xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > >>>>> ? xmlns:wfs="http://www.opengis.net/wfs" > >>>>> ? xmlns:gml="http://www.opengis.net/gml" > >>>>> ? xmlns:ogc="http://www.opengis.net/ogc" > >>>>> ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >>>>> ? xsi:schemaLocation="http://www.opengis.net/wfs > >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd > >>>>> ? ? ? ? ? ? ? ? ? ? ? http://mapserver.gis.umn.edu/mapserver > >>>>> > >>>>> > http://c2cpc89.camptocamp.com/sbrunner/mapserv?SERVICE=WFS& ;VERSION=1.0.0> &REQUEST=DescribeFeatureType&TYPENAME=feature:Liegensc > haft_Query&OUTPUTFORMAT=XMLSCHEMA"> > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? ? ? ?661054.808000,244611.321000 > >>>>> 663053.704000,244888.622000 > >>>>> ? ? ? ? > >>>>> ? ? ? > >>>>> ? ? > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? ? ? ? > >>>>> ? ? ? ? ? ? ? ? ? ? ? ? 661054.808000,244854.251000 > >>>>> 661088.687000,244888.622000 > >>>>> ? ? ? ? ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? > >>>>> ? ? ? ? ? ? > >>>>> ? ? ? ? ? ? ?661076.579000,244888.622000 > >>>>> 661054.808000,244875.484000 661062.744000,244858.448000 > >>>>> 661064.653000,244854.251000 661088.687000,244869.173000 > >>>>> 661076.579000,244888.622000 > >>>>> ? ? ? ? ? ? > >>>>> ? ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ?2380997 > >>>>> ? ? ? ?3634 > >>>>> ? ? ? > >>>>> ? ? > >>>>> ? ? > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? ? ? ? > >>>>> ? ? ? ? ? ? ? ? ? ? ? ? 661054.808000,244854.251000 > >>>>> 661088.687000,244888.622000 > >>>>> ? ? ? ? ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? > >>>>> ? ? ? ? ? ? > >>>>> ? ? ? ? ? ? ?661076.579000,244888.622000 > >>>>> 661054.808000,244875.484000 661062.744000,244858.448000 > >>>>> 661064.653000,244854.251000 661088.687000,244869.173000 > >>>>> 661076.579000,244888.622000 > >>>>> ? ? ? ? ? ? > >>>>> ? ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ?2380997 > >>>>> ? ? ? ?3634 > >>>>> ? ? ? > >>>>> ? ? > >>>>> ? ? > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? ? ? ? > >>>>> ? ? ? ? ? ? ? ? ? ? ? ? 663017.565000,244611.321000 > >>>>> 663053.704000,244650.084000 > >>>>> ? ? ? ? ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? > >>>>> ? ? ? ? ? ? > >>>>> ? ? ? ? ? ? ?663017.565000,244635.722000 > >>>>> 663033.235000,244611.321000 663045.949000,244619.485000 > >>>>> 663053.704000,244626.417000 663034.337000,244650.084000 > >>>>> 663017.565000,244635.722000 > >>>>> ? ? ? ? ? ? > >>>>> ? ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ?2384539 > >>>>> ? ? ? ?3634 > >>>>> ? ? ? > >>>>> ? ? > >>>>> ? ? > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? ? ? ? > >>>>> ? ? ? ? ? ? ? ? ? ? ? ? 663017.565000,244611.321000 > >>>>> 663053.704000,244650.084000 > >>>>> ? ? ? ? ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? > >>>>> ? ? ? ? ? ? > >>>>> ? ? ? ? ? ? ?663017.565000,244635.722000 > >>>>> 663033.235000,244611.321000 663045.949000,244619.485000 > >>>>> 663053.704000,244626.417000 663034.337000,244650.084000 > >>>>> 663017.565000,244635.722000 > >>>>> ? ? ? ? ? ? > >>>>> ? ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ?2384539 > >>>>> ? ? ? ?3634 > >>>>> ? ? ? > >>>>> ? ? > >>>>> > >>>>> > >>>>> > >>>>> query with spatial filter [3]: > >>>>> service="WFS" > >>>>> version="1.0.0" maxFeatures="100" > >>>>> xsi:schemaLocation="http://www.opengis.net/wfs > >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" > >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > >>>>> >>>>> xmlns:feature="http://mapserver.gis.umn.edu/mapserver"> > >>>>> > >>>>> > >>>>> geom > >>>>> srsName="EPSG:21781"> > >>>>> 661070.024,244872.084 > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> response with spatial filter [4]: > >>>>> > >>>>> >>>>> ? xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > >>>>> ? xmlns:wfs="http://www.opengis.net/wfs" > >>>>> ? xmlns:gml="http://www.opengis.net/gml" > >>>>> ? xmlns:ogc="http://www.opengis.net/ogc" > >>>>> ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >>>>> ? xsi:schemaLocation="http://www.opengis.net/wfs > >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd > >>>>> ? ? ? ? ? ? ? ? ? ? ? http://mapserver.gis.umn.edu/mapserver > >>>>> > >>>>> > http://c2cpc89.camptocamp.com/sbrunner/mapserv?SERVICE=WFS& ;VERSION=1.0.0> &REQUEST=DescribeFeatureType&TYPENAME=feature:Liegensc > haft_Query&OUTPUTFORMAT=XMLSCHEMA"> > >>>>> ? > >>>>> ? ? ?missing > >>>>> ? > >>>>> > >>>>> > >>>>> > >>>>> GetCapabilities [5]: > >>>>> > >>>>> >>>>> ? version="1.0.0" > >>>>> ? updateSequence="0" > >>>>> ? xmlns="http://www.opengis.net/wfs" > >>>>> ? xmlns:ogc="http://www.opengis.net/ogc" > >>>>> ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >>>>> ? xsi:schemaLocation="http://www.opengis.net/wfs > >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd"> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> ?MapServer WFS > >>>>> ?Amtliche Vermessung > >>>>> ?Die amtliche Vermessung nach DM01 Darstellung als WMS > >>>>> Dienst f?r MapFish Projekte > >>>>> > >>>>> ? > http://c2cpc89.camptocamp.com/sbrunner/mapserv ? > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> ? > >>>>> ? ? > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? >>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" > >>>>> /> > >>>>> ? ? ? ? > >>>>> ? ? ? > >>>>> > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? >>>>> > onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" /> > >>>>> ? ? ? ? > >>>>> ? ? ? > >>>>> ? ? > >>>>> ? ? > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? >>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" > >>>>> /> > >>>>> ? ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? >>>>> > onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" /> > >>>>> > >>>>> ? ? ? ? > >>>>> ? ? ? > >>>>> ? ? > >>>>> ? ? > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> > >>>>> ? ? ? ? ? >>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" > >>>>> /> > >>>>> ? ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? ? ? >>>>> > onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" /> > >>>>> ? ? ? ? > >>>>> ? ? ? > >>>>> ? ? > >>>>> > >>>>> ? > >>>>> > >>>>> > >>>>> > >>>>> ? > >>>>> ? ? > >>>>> ? > >>>>> ? ? > >>>>> ? ? ? ?Liegenschaft_Query > >>>>> ? ? ? ?Liegenschaft_Query > >>>>> > >>>>> ? ? ? ?epsg:21781 > >>>>> ? ? ? ? maxx="690000" > >>>>> maxy="278000" /> > >>>>> ? ? > >>>>> ? ? > >>>>> ? ? ? ?Liegenschaft_Query_ALL > >>>>> ? ? ? ?Liegenschaft_Query_ALL > >>>>> ? ? ? ?epsg:21781 > >>>>> > >>>>> ? ? ? ? maxx="690000" > >>>>> maxy="278000" /> > >>>>> ? ? > >>>>> > >>>>> > >>>>> > >>>>> ? > >>>>> ? ? > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> ? ? > >>>>> ? > >>>>> > >>>>> ? > >>>>> ? ? > >>>>> ? ? > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> ? ? ? > >>>>> ? ? > >>>>> ? > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> describefeaturetype [6]: > >>>>> > >>>>> >>>>> ? targetNamespace="http://mapserver.gis.umn.edu/mapserver" > >>>>> ? xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > >>>>> ? xmlns:ogc="http://www.opengis.net/ogc" > >>>>> ? xmlns:xsd="http://www.w3.org/2001/XMLSchema" > >>>>> ? xmlns="http://www.w3.org/2001/XMLSchema" > >>>>> ? xmlns:gml="http://www.opengis.net/gml" > >>>>> ? elementFormDefault="qualified" version="0.1" > > >>>>> > >>>>> ? >>>>> ? ? ? ? ? schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd" > >>>>> /> > >>>>> > >>>>> ? >>>>> ? ? ? ? ? type="ms:Liegenschaft_QueryType" > >>>>> ? ? ? ? ? substitutionGroup="gml:_Feature" /> > >>>>> > >>>>> ? > >>>>> ? ? > >>>>> ? ? ? > >>>>> ? ? ? ? > >>>>> > >>>>> ? ? ? ? ? >>>>> minOccurs="0" maxOccurs="1"/> > >>>>> ? ? ? ? ? > >>>>> ? ? ? ? ? > >>>>> ? ? ? ? > >>>>> ? ? ? > >>>>> ? ? > >>>>> ? > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> camptocamp.com > >>>>> mapfish.org > >>>>> _______________________________________________ > >>>>> mapserver-users mailing list > >>>>> mapserver-users at lists.osgeo.org > >>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users > >>>> > >>>> > >>> > >>> > >>> > >>> -- > >>> camptocamp.com > >>> mapfish.org > >>> > >> > >> > >> > >> -- > >> camptocamp.com > >> mapfish.org > > > > > > -- > camptocamp.com > mapfish.org > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From chris.green at ibstv.co.uk Thu Aug 18 10:04:16 2011 From: chris.green at ibstv.co.uk (Chris Green) Date: Thu, 18 Aug 2011 18:04:16 +0100 Subject: [mapserver-users] Map size question? In-Reply-To: <042901cc5d74$c545b090$4fd111b0$@green@ibstv.co.uk> References: <042901cc5d74$c545b090$4fd111b0$@green@ibstv.co.uk> Message-ID: <053501cc5dc8$de60f400$9b22dc00$@green@ibstv.co.uk> After quite a while thinking I could not produce a legend I have realised that the legend is actually there, just off the edge of my map. Now I see that although my map file specifies a map size of 640 x 480 pixels, if in single tile mode the map image being produced is actually 1110 x 660 pixels. Alternatively with multiple tiles I get 12 tiles of 250 x 250 pixels which is 1024 x 768 pixels. It seems that the size parameter in the map file is being ignored (even setting the values to 0 0 or omitting the SIZE parameter altogether makes no difference). MAXSIZE doesn't seem to help either. I can't find a way to get the image size that I want, can anyone help? Chris From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Chris Green Sent: 18 August 2011 08:02 To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] mapsript legend Hi all I have a map created via Mapscript under Mapserver 6.0 but I can't find a way to add a legend. Recent examples are hard to find but I found the following dating from 2002 which seemed simple enough: $legend = $map->legend; $legend->set(width,40); $legend->set(height,100); $legend->imagecolor->setRGB(240,220,200); # tan $legend->outlinecolor->setRGB(1,1,1); # black $legend->set(status, MS_EMBED); $legend->set(position, MS_UL); // SET LEGEND LABEL PROPERTIES $lg_label = $legend->label; $lg_label->set(font, "arial"); $lg_label->set(type, MS_TRUETYPE); $lg_label->set(size, 10); $lg_label->set(minsize, 6); $lg_label->set(maxsize, 12); $lg_label->color->setRGB(100,100,100); $legend->set(postlabelcache, MS_TRUE); // DRAW LEGEND $legendImage=$map->drawLegend(); Unfortunately this produces no output. Can anyone give me any clues why? Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.fawcett at state.mn.us Thu Aug 18 10:38:08 2011 From: david.fawcett at state.mn.us (Fawcett, David (MPCA)) Date: Thu, 18 Aug 2011 12:38:08 -0500 Subject: [mapserver-users] Map size question? In-Reply-To: <053501cc5dc8$de60f400$9b22dc00$@green@ibstv.co.uk> References: <042901cc5d74$c545b090$4fd111b0$@green@ibstv.co.uk> <053501cc5dc8$de60f400$9b22dc00$@green@ibstv.co.uk> Message-ID: Chris, If you are in tile mode, I assume that you probably don't want an embedded legend on each tile. Have you thought about doing a separate call/request/object for the legend? If you were doing this via CGI, I would recommend doing a separate mode=legend request. David. From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Chris Green Sent: Thursday, August 18, 2011 12:04 PM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Map size question? After quite a while thinking I could not produce a legend I have realised that the legend is actually there, just off the edge of my map. Now I see that although my map file specifies a map size of 640 x 480 pixels, if in single tile mode the map image being produced is actually 1110 x 660 pixels. Alternatively with multiple tiles I get 12 tiles of 250 x 250 pixels which is 1024 x 768 pixels. It seems that the size parameter in the map file is being ignored (even setting the values to 0 0 or omitting the SIZE parameter altogether makes no difference). MAXSIZE doesn't seem to help either. I can't find a way to get the image size that I want, can anyone help? Chris From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Chris Green Sent: 18 August 2011 08:02 To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] mapsript legend Hi all I have a map created via Mapscript under Mapserver 6.0 but I can't find a way to add a legend. Recent examples are hard to find but I found the following dating from 2002 which seemed simple enough: $legend = $map->legend; $legend->set(width,40); $legend->set(height,100); $legend->imagecolor->setRGB(240,220,200); # tan $legend->outlinecolor->setRGB(1,1,1); # black $legend->set(status, MS_EMBED); $legend->set(position, MS_UL); // SET LEGEND LABEL PROPERTIES $lg_label = $legend->label; $lg_label->set(font, "arial"); $lg_label->set(type, MS_TRUETYPE); $lg_label->set(size, 10); $lg_label->set(minsize, 6); $lg_label->set(maxsize, 12); $lg_label->color->setRGB(100,100,100); $legend->set(postlabelcache, MS_TRUE); // DRAW LEGEND $legendImage=$map->drawLegend(); Unfortunately this produces no output. Can anyone give me any clues why? Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From tiedtke at gmail.com Thu Aug 18 15:50:37 2011 From: tiedtke at gmail.com (Thiago Tiedtke dos Reis) Date: Thu, 18 Aug 2011 19:50:37 -0300 Subject: [mapserver-users] Java Crash In-Reply-To: References: Message-ID: Hi Stuart, I don't know if are related problems ... This same problem happens with me, when I trying to build a extension for Tcl without a little patch. After the patch, the method getBytes then works fine for me...see: http://trac.osgeo.org/mapserver/ticket/1533 Good lucky! Thiago Tiedtke dos Reis 2011/8/18 > I compiled MapServer 6.0.1 on Windows, with threads, and removed the > components marked "unsafe". I also built the Java Mapscript component, > targeting the 1.5 JVM. I can generate a map image, and save it to a file > using the Java method "imageObj.save(filename, map)". However, when I try > to call "imageObj.getBytes", the JVM crashes. Any ideas? Thanks. > > Stuart Harlan > _______________________________________________ > 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 eresnick at tapestrysolutions.com Thu Aug 18 16:46:47 2011 From: eresnick at tapestrysolutions.com (Ed Resnick) Date: Thu, 18 Aug 2011 16:46:47 -0700 Subject: [mapserver-users] Problem displaying a NAD83 tile in WGS84 (or via WMS) Message-ID: <821DFFD0027A51448486B39C85CAB8B94E42345322@tapca032> I have a MrSID file in NAD83 projection (EPGS 4269) which I want to display via WMS in WGS84 projection (EPGS 4326). I cannot get this to work. I have tried setting the entire map-file's projection to 4269, with the extent specified in that projection (in meters), and shp2img shows the image, but attempting to view it via WMS (requesting the 4326 projection) does not work, and the GetCapabilities response file is completely wrong - the LatLonBoundingBox tags actually list the 4269 bounding box in meters. Excerpt: The BoundingBox is correct; the LatLonBoundingBox obviously is not. I have also tried specifying 4326 as the map projection and 4269 as the layer projection, with the map's extent in lat/lon and the layer's extent as the above value (meters). Not only did this not work, but even shp2img just shows a blank image. If I change the map's extent to the value in meters (even though its projection is specified as 4326), then shp2img works, but the WMS feed still does not; the GetCapabilities still is wrong. Is MapServer simply buggy or is there a solution? From wal3 at mindspring.com Thu Aug 18 16:43:57 2011 From: wal3 at mindspring.com (Worth Lutz) Date: Thu, 18 Aug 2011 19:43:57 -0400 Subject: [mapserver-users] Invalid pdf file from WMS In-Reply-To: References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int><14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int><20110808152715.84000@gmx.net><32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int><32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int><4E42A959.40401@mapgears.com><32467_1313489461_4E4A4235_32467_8716_1_4E4A4200.80206@sciops.esa.int><84446DEF76453C439E9E97E438E13A63019DCF@suutari.haapa.mmm.fi><84446DEF76453C439E9E97E438E13A63019E7D@suutari.haapa.mmm.fi><84446DEF76453C439E9E97E438E13A63019EAD@suutari.haapa.mmm.fi> Message-ID: <400C7054CFC44D649267C738FEB43994@worthlaptop> I can get php MapScript to segfault drawing PDF maps when the same PNG map works fine. I had to crank up the allowed memory and allowed time in PHP to get my maps to work. I will submit a bug report and test case when I understand the problem better. I am trying to develop a method of creating a large set of PDF maps dynamically with PHP and and am finally figuring it out. Worth Lutz -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of thomas bonfort Sent: Thursday, August 18, 2011 3:11 AM To: Rahkonen Jukka Cc: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Invalid pdf file from WMS this seems to be a cairo/pdf issue, as the cairo/png works fine: http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSIO N=1.1.1&WIDTH=1728&HEIGHT=1324&LAYERS=default&TRANSPARENT=TRUE&FORMAT=cairop ng&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097 395&SRS=EPSG:2393&STYLES= what cairo version are you using? can you upgrade it? -- thomas On Wed, Aug 17, 2011 at 22:46, Rahkonen Jukka wrote: > Hi, > > Amazing. I got this > > (gdb) bt > #0 ?0x0013a258 in FT_Done_Face () from /usr/lib/libfreetype.so.6 > #1 ?0x00f447c3 in ?? () from /usr/lib/libcairo.so.2 > #2 ?0x00f4ba19 in cairo_font_face_destroy () from /usr/lib/libcairo.so.2 > #3 ?0x0813a8b4 in ?? () > #4 ?0x0813a9c8 in cleanupCairo () > #5 ?0x080c5aee in ?? () > #6 ?0x0810b406 in ?? () > #7 ?0x0807207d in ?? () > #8 ?0x0805c2f4 in ?? () > #9 ?0x00fefbd6 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6 > #10 0x08057881 in ?? () > > -Jukka- > ________________________________________ > L?hett?j?: thomas bonfort [thomas.bonfort at gmail.com] > L?hetetty: 17. elokuuta 2011 22:56 > Vastaanottaja: Rahkonen Jukka > Kopio: mapserver-users at lists.osgeo.org > Aihe: Re: [mapserver-users] Invalid pdf file from WMS > > if gdb is installed on the system, you do: > > gdb /path/to/mapserv > $ run QUERY_STRING='map=...&....' > (...program runs and spits out the beginning of the pdf..., then segfaults) > $ bt > > -- > thomas > > On Wed, Aug 17, 2011 at 21:36, Rahkonen Jukka wrote: >> Hi, >> >> Command with big BBOX does lead into segmantation fault. ?Unfortunately I am just an amateur and I have no idea about what is a backtrace and how I could provide it to you. The server is a virtual Linux box (Ubuntu). >> >> -Jukka Rahkonen- >> >> thomas bonfort wrote: >> >>> the second one is incomplete, the request seems to be failing. >> >>> can you run the request locally to see if it segfaults, and if so >> provide a backtrace: >> >>> /path/to/mapserver-cgi >> QUERY_STRING='map=/path/to/map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDT H=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BB OX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&S RS=EPSG:2393&STYLES=' >> >> -- >> thomas >> >> On Wed, Aug 17, 2011 at 15:40, Rahkonen Jukka wrote: >>> Hi, >>> >>>> This request from Mapserver 6.0 gives me a nice pdf file: >>>> http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSIO N=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=applicat ion/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827 .104097395&SRS=EPSG:2393&STYLES= >>> >>> However, if I double the bounding box the resulting pdf cannot be opened by Acrobat reader. >>> http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSIO N=1.1.1&WIDTH=1728&HEIGHT=1324&LAYERS=default&TRANSPARENT=TRUE&FORMAT=applic ation/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,69578 27.104097395&SRS=EPSG:2393&STYLES= >>> >>> The latter gives fine image with format=image/png. Any idea about what is going wrong? >>> >>> -Jukka Rahkonen-_______________________________________________ >>> 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 ----- No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1392 / Virus Database: 1520/3841 - Release Date: 08/17/11 From Jukka.Rahkonen at mmmtike.fi Thu Aug 18 21:51:00 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Fri, 19 Aug 2011 04:51:00 +0000 Subject: [mapserver-users] Problem displaying a NAD83 tile in WGS84 (or via WMS) In-Reply-To: <821DFFD0027A51448486B39C85CAB8B94E42345322@tapca032> References: <821DFFD0027A51448486B39C85CAB8B94E42345322@tapca032> Message-ID: <84446DEF76453C439E9E97E438E13A6301B6D7@suutari.haapa.mmm.fi> Hi, Could you give a bit more information? Your use case is the most common that exists and all instructions should be at http://mapserver.org/ogc/wms_server.html It would be good to see the gdalinfo report of your image and your mapfile and the exact WMS request you were using including the WMS version. At least these parts of mapfile are important MAP level: extent, projection and metadata (wms_srs and wms_inable_request at least) LAYER level projection. I can see some really odd LatLonBoundingBoxes in my own MS 6.0 WMS service too. I will investigate them a bit further. If it is just that the Mapserver is creating the GetCapabilities document wrong then the WMS service should still be usable. -Jukka Rahkonen- > -----Alkuper?inen viesti----- > L?hett?j?: mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Ed Resnick > L?hetetty: 19. elokuuta 2011 2:47 > Vastaanottaja: mapserver-users at lists.osgeo.org > Aihe: [mapserver-users] Problem displaying a NAD83 tile in > WGS84 (or via WMS) > > I have a MrSID file in NAD83 projection (EPGS 4269) which I > want to display via WMS in WGS84 projection (EPGS 4326). I > cannot get this to work. > > I have tried setting the entire map-file's projection to > 4269, with the extent specified in that projection (in > meters), and shp2img shows the image, but attempting to view > it via WMS (requesting the 4326 projection) does not work, > and the GetCapabilities response file is completely wrong - > the LatLonBoundingBox tags actually list the 4269 bounding > box in meters. Excerpt: > > maxx="556972" maxy="5.04804e+006" /> > minx="555230" miny="5.04658e+006" > maxx="556972" maxy="5.04804e+006" /> > > The BoundingBox is correct; the LatLonBoundingBox obviously is not. > > I have also tried specifying 4326 as the map projection and > 4269 as the layer projection, with the map's extent in > lat/lon and the layer's extent as the above value (meters). > Not only did this not work, but even shp2img just shows a > blank image. If I change the map's extent to the value in > meters (even though its projection is specified as 4326), > then shp2img works, but the WMS feed still does not; the > GetCapabilities still is wrong. > > Is MapServer simply buggy or is there a > solution?_______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From thomas.bonfort at gmail.com Fri Aug 19 00:19:43 2011 From: thomas.bonfort at gmail.com (thomas bonfort) Date: Fri, 19 Aug 2011 09:19:43 +0200 Subject: [mapserver-users] Invalid pdf file from WMS In-Reply-To: <400C7054CFC44D649267C738FEB43994@worthlaptop> References: <25280_1312542190_4E3BCDEE_25280_1080043_1_4E3BCDB9.7080001@sciops.esa.int> <14352_1312815562_4E3FF9CA_14352_411_9_4E3FF996.7010408@sciops.esa.int> <20110808152715.84000@gmx.net> <32470_1312881331_4E40FAB3_32470_17542_1_4E40FA7C.80006@sciops.esa.int> <32470_1312979761_4E427B30_32470_43876_1_4E427AFA.3060104@sciops.esa.int> <4E42A959.40401@mapgears.com> <32467_1313489461_4E4A4235_32467_8716_1_4E4A4200.80206@sciops.esa.int> <84446DEF76453C439E9E97E438E13A63019DCF@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A63019E7D@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A63019EAD@suutari.haapa.mmm.fi> <400C7054CFC44D649267C738FEB43994@worthlaptop> Message-ID: Worth, a bugreport with a self contained test case is the correct next step. please try to take php out of the loop, a shp2img call causing the crash would be ideal. thanks, thomas On Fri, Aug 19, 2011 at 01:43, Worth Lutz wrote: > I can get php MapScript to segfault drawing PDF maps when the same PNG map > works fine. ?I had to crank up the allowed memory and allowed time in PHP to > get my maps to work. ?I will submit a bug report and test case when I > understand the problem better. ?I am trying to develop a method of creating > a large set of PDF maps dynamically with PHP and and am finally figuring it > out. > > Worth Lutz > > > > -----Original Message----- > From: mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of thomas bonfort > Sent: Thursday, August 18, 2011 3:11 AM > To: Rahkonen Jukka > Cc: mapserver-users at lists.osgeo.org > Subject: Re: [mapserver-users] Invalid pdf file from WMS > > this seems to be a cairo/pdf issue, as the cairo/png works fine: > http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSIO > N=1.1.1&WIDTH=1728&HEIGHT=1324&LAYERS=default&TRANSPARENT=TRUE&FORMAT=cairop > ng&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097 > 395&SRS=EPSG:2393&STYLES= > > what cairo version are you using? can you upgrade it? > > -- > thomas > > On Wed, Aug 17, 2011 at 22:46, Rahkonen Jukka > wrote: >> Hi, >> >> Amazing. I got this >> >> (gdb) bt >> #0 ?0x0013a258 in FT_Done_Face () from /usr/lib/libfreetype.so.6 >> #1 ?0x00f447c3 in ?? () from /usr/lib/libcairo.so.2 >> #2 ?0x00f4ba19 in cairo_font_face_destroy () from /usr/lib/libcairo.so.2 >> #3 ?0x0813a8b4 in ?? () >> #4 ?0x0813a9c8 in cleanupCairo () >> #5 ?0x080c5aee in ?? () >> #6 ?0x0810b406 in ?? () >> #7 ?0x0807207d in ?? () >> #8 ?0x0805c2f4 in ?? () >> #9 ?0x00fefbd6 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6 >> #10 0x08057881 in ?? () >> >> -Jukka- >> ________________________________________ >> L?hett?j?: thomas bonfort [thomas.bonfort at gmail.com] >> L?hetetty: 17. elokuuta 2011 22:56 >> Vastaanottaja: Rahkonen Jukka >> Kopio: mapserver-users at lists.osgeo.org >> Aihe: Re: [mapserver-users] Invalid pdf file from WMS >> >> if gdb is installed on the system, you do: >> >> gdb /path/to/mapserv >> $ run QUERY_STRING='map=...&....' >> (...program runs and spits out the beginning of the pdf..., then > segfaults) >> $ bt >> >> -- >> thomas >> >> On Wed, Aug 17, 2011 at 21:36, Rahkonen Jukka > wrote: >>> Hi, >>> >>> Command with big BBOX does lead into segmantation fault. ?Unfortunately I > am just an amateur and I have no idea about what is a backtrace and how I > could provide it to you. The server is a virtual Linux box (Ubuntu). >>> >>> -Jukka Rahkonen- >>> >>> thomas bonfort wrote: >>> >>>> the second one is incomplete, the request seems to be failing. >>> >>>> can you run the request locally to see if it segfaults, and if so >>> provide a backtrace: >>> >>>> /path/to/mapserver-cgi >>> > QUERY_STRING='map=/path/to/map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDT > H=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=application/x-pdf&BB > OX=3409763.750050978,6956187.032331026,3411904.266676571,6957827.104097395&S > RS=EPSG:2393&STYLES=' >>> >>> -- >>> thomas >>> >>> On Wed, Aug 17, 2011 at 15:40, Rahkonen Jukka > wrote: >>>> Hi, >>>> >>>>> This request from Mapserver 6.0 gives me a nice pdf file: >>>>> > http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSIO > N=1.1.1&WIDTH=864&HEIGHT=662&LAYERS=default&TRANSPARENT=TRUE&FORMAT=applicat > ion/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,6957827 > .104097395&SRS=EPSG:2393&STYLES= >>>> >>>> However, if I double the bounding box the resulting pdf cannot be opened > by Acrobat reader. >>>> > http://188.64.1.61/cgi-bin/osm-mapserver_i?REQUEST=GetMap&SERVICE=WMS&VERSIO > N=1.1.1&WIDTH=1728&HEIGHT=1324&LAYERS=default&TRANSPARENT=TRUE&FORMAT=applic > ation/x-pdf&BBOX=3409763.750050978,6956187.032331026,3411904.266676571,69578 > 27.104097395&SRS=EPSG:2393&STYLES= >>>> >>>> The latter gives fine image with format=image/png. Any idea about what > is going wrong? >>>> >>>> -Jukka Rahkonen-_______________________________________________ >>>> 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 > ----- > No virus found in this message. > Checked by AVG - www.avg.com > Version: 10.0.1392 / Virus Database: 1520/3841 - Release Date: 08/17/11 > > From baas at speerit.nl Fri Aug 19 01:25:43 2011 From: baas at speerit.nl (Jelmer Baas) Date: Fri, 19 Aug 2011 08:25:43 +0000 Subject: [mapserver-users] Error with WFS request from MapInfo Message-ID: Hello list, I've been struggling with this issue for a while, now. When I try to add a WFS layer in MapInfo, I receive the following error (from the mapserver logfile): prepare_database(): Query error. Error declaring cursor: ERROR: BOX3D parser - couldnt parse. It should look like: BOX3D(xmin ymin zmin,xmax ymax zmax) or BOX3D(xmin ymin,xmax ymax) LINE 1: ...:text from pandactueel WHERE geometrie && setSRID('BOX3D(-1.... ^ With query string: DECLARE mycursor BINARY CURSOR FOR SELECT asbinary(force_collection(force_2d(geo)),'NDR'),oid::text from mytable WHERE geo && setSRID('BOX3D(-1.#INF -1.#INF,1390604146415.56 -16080812.3872859)'::BOX3D, 28992 ) The layer itself works, via normal GetMap requests. This is my mapfile: MAP NAME TEST STATUS ON UNITS meters FONTSET "fontset.txt" DEBUG 5 CONFIG "MS_ERRORFILE" "c:\temp\mapserver.log" IMAGECOLOR 255 55 255 OUTPUTFORMAT NAME aggpng24 DRIVER AGG/PNG TRANSPARENT ON IMAGEMODE RGBA MIMETYPE "image/png" EXTENSION "png" END WEB METADATA "wms_title" "TEST" "wfs_title" "TEST" "wms_srs" "epsg:4326 epsg:900913" "wfs_srs" "epsg:4326 epsg:900913" "wms_onlineresource" "***" "wfs_onlineresource" "***" END # METADATA END #web SYMBOLSET "symbols_mapinfo2.sym" PROJECTION "init=epsg:4326" END LAYER TYPE POLYGON STATUS ON DUMP TRUE CONNECTIONTYPE POSTGIS CONNECTION "host=localhost dbname=TEST user=postgres password=*** port=5432" DATA "geo from mytable using unique oid using srid=28992" NAME mytest CLASS NAME " mytest " STYLE COLOR 0 0 250 OUTLINECOLOR 0 250 0 END END PROJECTION "init=epsg:28992" END MINSCALE 1 MAXSCALE 80000000 METADATA "wms_title" " mytest " "wms_srs" "epsg:4326 epsg:900913" "wfs_title" " mytest " "wfs_srs" "epsg:4326 epsg:900913" "gml_featureid" "oid" "gml_include_items" "all" END # METADATA END END # Map File MapInfo sends its requests as post (I'd prefer get...) and after using a packet sniffer I found out it sends this: I use MapServer version 5.4.2, by the way. Can anyone tell me what I'm missing? Should I add extends in the MapFile or something? And where do those weird numbers come from? Regards, Jelmer Baas Speer IT B.V. From Jukka.Rahkonen at mmmtike.fi Fri Aug 19 02:04:46 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Fri, 19 Aug 2011 09:04:46 +0000 Subject: [mapserver-users] Re: Error with WFS request from MapInfo In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A6301B741@suutari.haapa.mmm.fi> Hi, I would start by addind EXTENT to MAP level. WFS 1.0.0 does not support reprojection so select the desired output srsName and use that as map level PROJECTION. Express extents to suit that projection. Mapserver has been pretty poor WFS server for real GIS clients but it is getting better. However, I cannot promise you any amazing interoperability. At least I would recommend you to update to 6.0. If you want to get some good feelings about WFS consider having a try with TinyOWS first. It works only with PostGIS (v. 1.5 or higher) but that looks to be OK for you. I have managed to read features from TinyOWS with Kosmo GIS, gvSIG, QGis, uDig, ArcGIS, MapInfo, Gaia, SIS Map Browser and iGeoDesktop. With some clients even attribute and spatial filters work. Come back to Mapserver WFS later and start making bug reports. Glad that you learned already to study the POST traffic, it is really a must with WFS debugging. I am using Fiddler for that purpose. MapInfo seems to send a most basic WFS call (or stupid, just orders the whole layer from you) so that should not be a trouble in this case. Once you get the extents corrected you can continue and wait excited if MapInfo will have troubles with checking the schemas and parsing the GML that comes from Mapserver. -Jukka Rahkonen- > -----Alkuper?inen viesti----- > L?hett?j?: mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Jelmer Baas > L?hetetty: 19. elokuuta 2011 11:26 > Vastaanottaja: mapserver-users at lists.osgeo.org > Aihe: [mapserver-users] Error with WFS request from MapInfo > > Hello list, > > I've been struggling with this issue for a while, now. When I > try to add a WFS layer in MapInfo, I receive the following > error (from the mapserver logfile): > prepare_database(): Query error. Error declaring cursor: > ERROR: BOX3D parser - couldnt parse. It should look like: > BOX3D(xmin ymin zmin,xmax ymax zmax) or BOX3D(xmin ymin,xmax ymax) > LINE 1: ...:text from pandactueel WHERE geometrie && > setSRID('BOX3D(-1.... > ^ > > With query string: DECLARE mycursor BINARY CURSOR FOR SELECT > asbinary(force_collection(force_2d(geo)),'NDR'),oid::text > from mytable WHERE geo && setSRID('BOX3D(-1.#INF > -1.#INF,1390604146415.56 -16080812.3872859)'::BOX3D, 28992 ) > > The layer itself works, via normal GetMap requests. > > This is my mapfile: > > MAP > NAME TEST > STATUS ON > UNITS meters > FONTSET "fontset.txt" > DEBUG 5 > CONFIG "MS_ERRORFILE" "c:\temp\mapserver.log" > IMAGECOLOR 255 55 255 > OUTPUTFORMAT > NAME aggpng24 > DRIVER AGG/PNG > TRANSPARENT ON > IMAGEMODE RGBA > MIMETYPE "image/png" > EXTENSION "png" > END > > WEB > METADATA > "wms_title" "TEST" > "wfs_title" "TEST" > "wms_srs" "epsg:4326 epsg:900913" > "wfs_srs" "epsg:4326 epsg:900913" > "wms_onlineresource" "***" > "wfs_onlineresource" "***" > END # METADATA > END #web > > > SYMBOLSET "symbols_mapinfo2.sym" > PROJECTION > "init=epsg:4326" > END > LAYER > TYPE POLYGON > STATUS ON > DUMP TRUE > CONNECTIONTYPE POSTGIS > CONNECTION "host=localhost dbname=TEST user=postgres > password=*** port=5432" > DATA "geo from mytable using unique oid using srid=28992" > NAME mytest > CLASS > NAME " mytest " > STYLE > COLOR 0 0 250 > OUTLINECOLOR 0 250 0 > END > END > PROJECTION > "init=epsg:28992" > END > MINSCALE 1 > MAXSCALE 80000000 > METADATA > "wms_title" " mytest " > "wms_srs" "epsg:4326 epsg:900913" > "wfs_title" " mytest " > "wfs_srs" "epsg:4326 epsg:900913" > "gml_featureid" "oid" > "gml_include_items" "all" > END # METADATA > END > END # Map File > > > MapInfo sends its requests as post (I'd prefer get...) and > after using a packet sniffer I found out it sends this: > > xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > xmlns:gml="http://www.opengis.net/gml" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns="http://www.opengis.net/wfs" > xsi:schemaLocation="http://www.opengis.net/wfs > ../wfs/1.0.0/WFS-basic.xsd" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> typeName=" mytest"/> > > I use MapServer version 5.4.2, by the way. > > Can anyone tell me what I'm missing? Should I add extends in > the MapFile or something? And where do those weird numbers come from? > > Regards, > Jelmer Baas > Speer IT B.V. > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From Jukka.Rahkonen at mmmtike.fi Fri Aug 19 03:41:03 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Fri, 19 Aug 2011 10:41:03 +0000 Subject: [mapserver-users] Re: Error with WFS request from MapInfo In-Reply-To: References: <84446DEF76453C439E9E97E438E13A6301B741@suutari.haapa.mmm.fi> Message-ID: <84446DEF76453C439E9E97E438E13A6301B788@suutari.haapa.mmm.fi> Hi, You can also try to add this to LAYER wfs_extent Description: (Optional) Used for the layer's BoundingBox tag for cases where it is impossible (or very inefficient) for MapServer to probe the data source to figure its extents. The value for this metadata is "minx miny maxx maxy" separated by spaces, with the values in the layer's projection units. If wfs_extent is provided then it has priority and MapServer will NOT try to read the source file's extents. And of course you should always be the boss and test with the basic hand written requests first before letting the GIS client to add for the complexity. Something like these: http://myserver.xx/cgi-bin/mapserv.exe?service=wfs&version=1.0.0&request=getCapabilities&map=path/to/the/wfs.map http://myserver.xx/cgi-bin/mapserv.exe?service=wfs&version=1.0.0&request=DescribeFeatureType&typeName=mytest&map=path/to/the/wfs.map http://myserver.xx/cgi-bin/mapserv.exe?service=wfs&version=1.0.0&request=GetFeature&typeName=mytest&maxFeatures=10&map=path/to/the/wfs.map -Jukka Rahkonen- > -----Alkuper?inen viesti----- > L?hett?j?: Jelmer Baas [mailto:baas at speerit.nl] > L?hetetty: 19. elokuuta 2011 12:45 > Vastaanottaja: Rahkonen Jukka; 'mapserver-users at lists.osgeo.org' > Aihe: RE: Error with WFS request from MapInfo > > Jukka, > > Thanks for your pointers, I'll check out other WFS servers > and see how far I get. I did add the extent as EXTENT -180 > -90 180 90 in the map file but that doesn't seem to change anything. > > Regards > Jelmer Baas > > > -----Original Message----- > > From: Rahkonen Jukka [mailto:Jukka.Rahkonen at mmmtike.fi] > > Sent: vrijdag 19 augustus 2011 11:05 > > To: Jelmer Baas; 'mapserver-users at lists.osgeo.org' > > Subject: Re: Error with WFS request from MapInfo > > > > Hi, > > > > I would start by addind EXTENT to MAP level. WFS 1.0.0 does > not support > > reprojection so select the desired output srsName and use > that as map level > > PROJECTION. Express extents to suit that projection. > > > > Mapserver has been pretty poor WFS server for real GIS > clients but it is > > getting better. However, I cannot promise you any amazing > interoperability. > > At least I would recommend you to update to 6.0. If you > want to get some > > good feelings about WFS consider having a try with TinyOWS > first. It works > > only with PostGIS (v. 1.5 or higher) but that looks to be > OK for you. I have > > managed to read features from TinyOWS with Kosmo GIS, > gvSIG, QGis, uDig, > > ArcGIS, MapInfo, Gaia, SIS Map Browser and iGeoDesktop. > With some clients > > even attribute and spatial filters work. Come back to > Mapserver WFS later > > and start making bug reports. Glad that you learned already > to study the > > POST traffic, it is really a must with WFS debugging. I am > using Fiddler for that > > purpose. > > > > MapInfo seems to send a most basic WFS call (or stupid, > just orders the > > whole layer from you) so that should not be a trouble in > this case. Once you > > get the extents corrected you can continue and wait excited > if MapInfo will > > have troubles with checking the schemas and parsing the GML > that comes > > from Mapserver. > > > > -Jukka Rahkonen- > > > > > > > > > > > -----Alkuper?inen viesti----- > > > L?hett?j?: mapserver-users-bounces at lists.osgeo.org > > > [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta > Jelmer Baas > > > L?hetetty: 19. elokuuta 2011 11:26 > > > Vastaanottaja: mapserver-users at lists.osgeo.org > > > Aihe: [mapserver-users] Error with WFS request from MapInfo > > > > > > Hello list, > > > > > > I've been struggling with this issue for a while, now. When I > > > try to add a WFS layer in MapInfo, I receive the following > > > error (from the mapserver logfile): > > > prepare_database(): Query error. Error declaring cursor: > > > ERROR: BOX3D parser - couldnt parse. It should look like: > > > BOX3D(xmin ymin zmin,xmax ymax zmax) or BOX3D(xmin ymin,xmax > > ymax) > > > LINE 1: ...:text from pandactueel WHERE geometrie && > > > setSRID('BOX3D(-1.... > > > ^ > > > > > > With query string: DECLARE mycursor BINARY CURSOR FOR SELECT > > > asbinary(force_collection(force_2d(geo)),'NDR'),oid::text > > > from mytable WHERE geo && setSRID('BOX3D(-1.#INF > > > -1.#INF,1390604146415.56 -16080812.3872859)'::BOX3D, 28992 ) > > > > > > The layer itself works, via normal GetMap requests. > > > > > > This is my mapfile: > > > > > > MAP > > > NAME TEST > > > STATUS ON > > > UNITS meters > > > FONTSET "fontset.txt" > > > DEBUG 5 > > > CONFIG "MS_ERRORFILE" "c:\temp\mapserver.log" > > > IMAGECOLOR 255 55 255 > > > OUTPUTFORMAT > > > NAME aggpng24 > > > DRIVER AGG/PNG > > > TRANSPARENT ON > > > IMAGEMODE RGBA > > > MIMETYPE "image/png" > > > EXTENSION "png" > > > END > > > > > > WEB > > > METADATA > > > "wms_title" "TEST" > > > "wfs_title" "TEST" > > > "wms_srs" "epsg:4326 epsg:900913" > > > "wfs_srs" "epsg:4326 epsg:900913" > > > "wms_onlineresource" "***" > > > "wfs_onlineresource" "***" > > > END # METADATA > > > END #web > > > > > > > > > SYMBOLSET "symbols_mapinfo2.sym" > > > PROJECTION > > > "init=epsg:4326" > > > END > > > LAYER > > > TYPE POLYGON > > > STATUS ON > > > DUMP TRUE > > > CONNECTIONTYPE POSTGIS > > > CONNECTION "host=localhost dbname=TEST user=postgres > > > password=*** port=5432" > > > DATA "geo from mytable using unique oid using > srid=28992" > > > NAME mytest > > > CLASS > > > NAME " mytest " > > > STYLE > > > COLOR 0 0 250 > > > OUTLINECOLOR 0 250 0 > > > END > > > END > > > PROJECTION > > > "init=epsg:28992" > > > END > > > MINSCALE 1 > > > MAXSCALE 80000000 > > > METADATA > > > "wms_title" " mytest " > > > "wms_srs" "epsg:4326 epsg:900913" > > > "wfs_title" " mytest " > > > "wfs_srs" "epsg:4326 epsg:900913" > > > "gml_featureid" "oid" > > > "gml_include_items" "all" > > > END # METADATA > > > END > > > END # Map File > > > > > > > > > MapInfo sends its requests as post (I'd prefer get...) and > > > after using a packet sniffer I found out it sends this: > > > > > > > > xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > > > xmlns:gml="http://www.opengis.net/gml" > > > xmlns:ogc="http://www.opengis.net/ogc" > > > xmlns="http://www.opengis.net/wfs" > > > xsi:schemaLocation="http://www.opengis.net/wfs > > > ../wfs/1.0.0/WFS-basic.xsd" > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > typeName=" mytest"/> > > > > > > I use MapServer version 5.4.2, by the way. > > > > > > Can anyone tell me what I'm missing? Should I add extends in > > > the MapFile or something? And where do those weird numbers come > > from? > > > > > > Regards, > > > Jelmer Baas > > > Speer IT B.V. > > > _______________________________________________ > > > mapserver-users mailing list > > > mapserver-users at lists.osgeo.org > > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > From ludovic.granjon at u-bourgogne.fr Fri Aug 19 04:42:17 2011 From: ludovic.granjon at u-bourgogne.fr (Ludovic Granjon) Date: Fri, 19 Aug 2011 13:42:17 +0200 Subject: [mapserver-users] XML mapfile Message-ID: <4E4E4C19.4030801@u-bourgogne.fr> Hello Someone is using mapfiles in xml? I tried but it does not work, is there such a minimal mapfile in xml to try? Is there a documentation ? I tried unsuccessfully http://trac.osgeo.org/mapserver/browser/trunk/mapserver/xmlmapfile Thanks Ludovic -------------- next part -------------- A non-text attachment was scrubbed... Name: ludovic_granjon.vcf Type: text/x-vcard Size: 149 bytes Desc: not available URL: From aboudreault at mapgears.com Fri Aug 19 05:20:07 2011 From: aboudreault at mapgears.com (Alan Boudreault) Date: Fri, 19 Aug 2011 08:20:07 -0400 Subject: [mapserver-users] XML mapfile In-Reply-To: <4E4E4C19.4030801@u-bourgogne.fr> References: <4E4E4C19.4030801@u-bourgogne.fr> Message-ID: <201108190820.08432.aboudreault@mapgears.com> IIRC, the mapfiles in svn were only to test translation and loading. You can take a small standard mapfile you have and write it in xml. It should be very straighforward and you can use the svn mapfiles as example. Let me know if you need further help. Alan On August 19, 2011 07:42:17 am Ludovic Granjon wrote: > Hello > Someone is using mapfiles in xml? > I tried but it does not work, is there such a minimal mapfile in xml to > try? Is there a documentation ? I tried unsuccessfully > http://trac.osgeo.org/mapserver/browser/trunk/mapserver/xmlmapfile > Thanks > > Ludovic From ludovic.granjon at u-bourgogne.fr Fri Aug 19 05:40:39 2011 From: ludovic.granjon at u-bourgogne.fr (Ludovic Granjon) Date: Fri, 19 Aug 2011 14:40:39 +0200 Subject: [mapserver-users] XML mapfile In-Reply-To: <201108190820.08432.aboudreault@mapgears.com> References: <4E4E4C19.4030801@u-bourgogne.fr> <201108190820.08432.aboudreault@mapgears.com> Message-ID: <4E4E59C7.7060204@u-bourgogne.fr> Thanks Alan Yes that's what I try to do but when I try to launch xmlstarlet I always have an invalid mapfile; for exemple I join my mapfile And the message of xmlstartlet is : "mapfile-test_ludo.xml:69: element LayerSet: Schemas validity error : Element '{http://www.mapserver.org/mapserver}LayerSet': This element is not expected. Expected is ( {http://www.mapserver.org/mapserver}Web )." If I delete the LayerSet bloc it's ok but it's annoying ... If I try with my very little mapfile.map, it seems that it always miss some bloc so I must insert legend, scalebar, etc Thanks for your help Ludovic Le 19/08/2011 14:20, Alan Boudreault a ?crit : > IIRC, the mapfiles in svn were only to test translation and loading. You can > take a small standard mapfile you have and write it in xml. It should be very > straighforward and you can use the svn mapfiles as example. > > Let me know if you need further help. > > Alan > > On August 19, 2011 07:42:17 am Ludovic Granjon wrote: >> Hello >> Someone is using mapfiles in xml? >> I tried but it does not work, is there such a minimal mapfile in xml to >> try? Is there a documentation ? I tried unsuccessfully >> http://trac.osgeo.org/mapserver/browser/trunk/mapserver/xmlmapfile >> Thanks >> >> Ludovic > -------------- next part -------------- A non-text attachment was scrubbed... Name: mapfile-test_ludo.xml Type: text/xml Size: 2519 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ludovic_granjon.vcf Type: text/x-vcard Size: 149 bytes Desc: not available URL: From aboudreault at mapgears.com Fri Aug 19 06:17:06 2011 From: aboudreault at mapgears.com (Alan Boudreault) Date: Fri, 19 Aug 2011 09:17:06 -0400 Subject: [mapserver-users] XML mapfile In-Reply-To: <4E4E59C7.7060204@u-bourgogne.fr> References: <4E4E4C19.4030801@u-bourgogne.fr> <201108190820.08432.aboudreault@mapgears.com> <4E4E59C7.7060204@u-bourgogne.fr> Message-ID: <201108190917.06716.aboudreault@mapgears.com> Paste your mapfile on pastebin.com if you can. Alan On August 19, 2011 08:40:39 am Ludovic Granjon wrote: > Thanks Alan > > Yes that's what I try to do but when I try to launch xmlstarlet I always > have an invalid mapfile; > for exemple I join my mapfile > And the message of xmlstartlet is : > > "mapfile-test_ludo.xml:69: element LayerSet: Schemas validity error : > Element '{http://www.mapserver.org/mapserver}LayerSet': This element is > not expected. Expected is ( {http://www.mapserver.org/mapserver}Web )." > > If I delete the LayerSet bloc it's ok but it's annoying ... > > If I try with my very little mapfile.map, it seems that it always miss > some bloc so I must insert legend, scalebar, etc > > Thanks for your help > > Ludovic > > Le 19/08/2011 14:20, Alan Boudreault a ?crit : > > IIRC, the mapfiles in svn were only to test translation and loading. You > > can take a small standard mapfile you have and write it in xml. It > > should be very straighforward and you can use the svn mapfiles as > > example. > > > > Let me know if you need further help. > > > > Alan > > > > On August 19, 2011 07:42:17 am Ludovic Granjon wrote: > >> Hello > >> Someone is using mapfiles in xml? > >> I tried but it does not work, is there such a minimal mapfile in xml to > >> try? Is there a documentation ? I tried unsuccessfully > >> http://trac.osgeo.org/mapserver/browser/trunk/mapserver/xmlmapfile > >> Thanks > >> > >> Ludovic -- Alan Boudreault Mapgears http://www.mapgears.com From wimvanbelle at gmail.com Fri Aug 19 06:22:21 2011 From: wimvanbelle at gmail.com (Wim Vanbelle) Date: Fri, 19 Aug 2011 15:22:21 +0200 Subject: [mapserver-users] Vectorizing/digitizing points that have been rendered as raster Message-ID: Hi, Currently we have a lot of big datasets with points (think 50k points for instance) that we can now cluster service side with mapserver (cool). That works like a charm, but now we would like to fetch information if you click on them. (be it a clustered icon, or a non clustered). The client we are using is google maps with custom javascript code. As far as I'm aware, I need to perform a WFS request for this. I haven't got any problems setting that up, but what should be passed as a filter? Can we just pass a point as a filter in the request, or are we forced to supply a bounding box. I'm wondering if there are common solutions to tackle a similar problem. Thanks in advance. Best regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ludovic.granjon at u-bourgogne.fr Fri Aug 19 06:34:18 2011 From: ludovic.granjon at u-bourgogne.fr (Ludovic Granjon) Date: Fri, 19 Aug 2011 15:34:18 +0200 Subject: [mapserver-users] XML mapfile In-Reply-To: <201108190917.06716.aboudreault@mapgears.com> References: <4E4E4C19.4030801@u-bourgogne.fr> <201108190820.08432.aboudreault@mapgears.com> <4E4E59C7.7060204@u-bourgogne.fr> <201108190917.06716.aboudreault@mapgears.com> Message-ID: <4E4E665A.1060000@u-bourgogne.fr> Yes no problem http://pastebin.com/fPz6qgXx Thanks Le 19/08/2011 15:17, Alan Boudreault a ?crit : > Paste your mapfile on pastebin.com if you can. > > Alan > > On August 19, 2011 08:40:39 am Ludovic Granjon wrote: >> Thanks Alan >> >> Yes that's what I try to do but when I try to launch xmlstarlet I always >> have an invalid mapfile; >> for exemple I join my mapfile >> And the message of xmlstartlet is : >> >> "mapfile-test_ludo.xml:69: element LayerSet: Schemas validity error : >> Element '{http://www.mapserver.org/mapserver}LayerSet': This element is >> not expected. Expected is ( {http://www.mapserver.org/mapserver}Web )." >> >> If I delete the LayerSet bloc it's ok but it's annoying ... >> >> If I try with my very little mapfile.map, it seems that it always miss >> some bloc so I must insert legend, scalebar, etc >> >> Thanks for your help >> >> Ludovic >> >> Le 19/08/2011 14:20, Alan Boudreault a ?crit : >>> IIRC, the mapfiles in svn were only to test translation and loading. You >>> can take a small standard mapfile you have and write it in xml. It >>> should be very straighforward and you can use the svn mapfiles as >>> example. >>> >>> Let me know if you need further help. >>> >>> Alan >>> >>> On August 19, 2011 07:42:17 am Ludovic Granjon wrote: >>>> Hello >>>> Someone is using mapfiles in xml? >>>> I tried but it does not work, is there such a minimal mapfile in xml to >>>> try? Is there a documentation ? I tried unsuccessfully >>>> http://trac.osgeo.org/mapserver/browser/trunk/mapserver/xmlmapfile >>>> Thanks >>>> >>>> Ludovic -------------- next part -------------- A non-text attachment was scrubbed... Name: ludovic_granjon.vcf Type: text/x-vcard Size: 149 bytes Desc: not available URL: From Jukka.Rahkonen at mmmtike.fi Fri Aug 19 06:55:00 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Fri, 19 Aug 2011 13:55:00 +0000 Subject: [mapserver-users] Vectorizing/digitizing points that have been rendered as raster In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A6301D0AD@suutari.haapa.mmm.fi> Hi, Mapserver 6.0 is listing these filter capabilities I am not totally sure that all of them really works. Now it depends a bit about your need what filter to use. DWithin from the point should give exact results but probably you would need to adjust the distance according to the map scale. BBOX might be faster but then you must make a rectangle around the clicked point. About the same result can be obtained also with WMS GetFeatureInfo. Configure a suitable outputformat (text/plain, text/html or gml), use big enough feature_count and reasonable pixel based tolerance in the mapfile. -Jukka Rahkonen- Wim Vanbelle wrote Hi, Currently we have a lot of big datasets with points (think 50k points for instance) that we can now cluster service side with mapserver (cool). That works like a charm, but now we would like to fetch information if you click on them. (be it a clustered icon, or a non clustered). The client we are using is google maps with custom javascript code. As far as I'm aware, I need to perform a WFS request for this. I haven't got any problems setting that up, but what should be passed as a filter? Can we just pass a point as a filter in the request, or are we forced to supply a bounding box. I'm wondering if there are common solutions to tackle a similar problem. Thanks in advance. Best regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ludovic.granjon at u-bourgogne.fr Fri Aug 19 07:04:35 2011 From: ludovic.granjon at u-bourgogne.fr (Ludovic Granjon) Date: Fri, 19 Aug 2011 16:04:35 +0200 Subject: [mapserver-users] XML mapfile In-Reply-To: <4E4E665A.1060000@u-bourgogne.fr> References: <4E4E4C19.4030801@u-bourgogne.fr> <201108190820.08432.aboudreault@mapgears.com> <4E4E59C7.7060204@u-bourgogne.fr> <201108190917.06716.aboudreault@mapgears.com> <4E4E665A.1060000@u-bourgogne.fr> Message-ID: <4E4E6D73.1000603@u-bourgogne.fr> Ok it seems to be ok, my mapfile xml is valid and I can generate a .map who work fine. I join my minimum mapfile. Thanks Alan Le 19/08/2011 15:34, Ludovic Granjon a ?crit : > Yes no problem > http://pastebin.com/fPz6qgXx > Thanks > > Le 19/08/2011 15:17, Alan Boudreault a ?crit : >> Paste your mapfile on pastebin.com if you can. >> >> Alan >> >> On August 19, 2011 08:40:39 am Ludovic Granjon wrote: >>> Thanks Alan >>> >>> Yes that's what I try to do but when I try to launch xmlstarlet I >>> always >>> have an invalid mapfile; >>> for exemple I join my mapfile >>> And the message of xmlstartlet is : >>> >>> "mapfile-test_ludo.xml:69: element LayerSet: Schemas validity error : >>> Element '{http://www.mapserver.org/mapserver}LayerSet': This element is >>> not expected. Expected is ( {http://www.mapserver.org/mapserver}Web )." >>> >>> If I delete the LayerSet bloc it's ok but it's annoying ... >>> >>> If I try with my very little mapfile.map, it seems that it always miss >>> some bloc so I must insert legend, scalebar, etc >>> >>> Thanks for your help >>> >>> Ludovic >>> >>> Le 19/08/2011 14:20, Alan Boudreault a ?crit : >>>> IIRC, the mapfiles in svn were only to test translation and >>>> loading. You >>>> can take a small standard mapfile you have and write it in xml. It >>>> should be very straighforward and you can use the svn mapfiles as >>>> example. >>>> >>>> Let me know if you need further help. >>>> >>>> Alan >>>> >>>> On August 19, 2011 07:42:17 am Ludovic Granjon wrote: >>>>> Hello >>>>> Someone is using mapfiles in xml? >>>>> I tried but it does not work, is there such a minimal mapfile in >>>>> xml to >>>>> try? Is there a documentation ? I tried unsuccessfully >>>>> http://trac.osgeo.org/mapserver/browser/trunk/mapserver/xmlmapfile >>>>> Thanks >>>>> >>>>> Ludovic > > > > _______________________________________________ > 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: mapfile-test_ludo_2.xml Type: text/xml Size: 1572 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ludovic_granjon.vcf Type: text/x-vcard Size: 149 bytes Desc: not available URL: From aboudreault at mapgears.com Fri Aug 19 07:06:35 2011 From: aboudreault at mapgears.com (Alan Boudreault) Date: Fri, 19 Aug 2011 10:06:35 -0400 Subject: [mapserver-users] XML mapfile In-Reply-To: <4E4E6D73.1000603@u-bourgogne.fr> References: <4E4E4C19.4030801@u-bourgogne.fr> <4E4E665A.1060000@u-bourgogne.fr> <4E4E6D73.1000603@u-bourgogne.fr> Message-ID: <201108191006.35881.aboudreault@mapgears.com> Good work Ludovic. That's what I thought. You initially tried to use LayerSet *inside* the Map tag, which is invalid. LayerSet is only used when we put the layers in another xml file. Alan On August 19, 2011 10:04:35 am Ludovic Granjon wrote: > Ok it seems to be ok, my mapfile xml is valid and I can generate a .map > who work fine. > I join my minimum mapfile. > Thanks Alan > > Le 19/08/2011 15:34, Ludovic Granjon a ?crit : > > Yes no problem > > http://pastebin.com/fPz6qgXx > > Thanks > > > > Le 19/08/2011 15:17, Alan Boudreault a ?crit : > >> Paste your mapfile on pastebin.com if you can. > >> > >> Alan > >> > >> On August 19, 2011 08:40:39 am Ludovic Granjon wrote: > >>> Thanks Alan > >>> > >>> Yes that's what I try to do but when I try to launch xmlstarlet I > >>> always > >>> have an invalid mapfile; > >>> for exemple I join my mapfile > >>> And the message of xmlstartlet is : > >>> > >>> "mapfile-test_ludo.xml:69: element LayerSet: Schemas validity error : > >>> Element '{http://www.mapserver.org/mapserver}LayerSet': This element is > >>> not expected. Expected is ( {http://www.mapserver.org/mapserver}Web )." > >>> > >>> If I delete the LayerSet bloc it's ok but it's annoying ... > >>> > >>> If I try with my very little mapfile.map, it seems that it always miss > >>> some bloc so I must insert legend, scalebar, etc > >>> > >>> Thanks for your help > >>> > >>> Ludovic > >>> > >>> Le 19/08/2011 14:20, Alan Boudreault a ?crit : > >>>> IIRC, the mapfiles in svn were only to test translation and > >>>> loading. You > >>>> can take a small standard mapfile you have and write it in xml. It > >>>> should be very straighforward and you can use the svn mapfiles as > >>>> example. > >>>> > >>>> Let me know if you need further help. > >>>> > >>>> Alan > >>>> > >>>> On August 19, 2011 07:42:17 am Ludovic Granjon wrote: > >>>>> Hello > >>>>> Someone is using mapfiles in xml? > >>>>> I tried but it does not work, is there such a minimal mapfile in > >>>>> xml to > >>>>> try? Is there a documentation ? I tried unsuccessfully > >>>>> http://trac.osgeo.org/mapserver/browser/trunk/mapserver/xmlmapfile > >>>>> Thanks > >>>>> > >>>>> Ludovic > > > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Alan Boudreault Mapgears http://www.mapgears.com From julho at kms.dk Fri Aug 19 07:25:22 2011 From: julho at kms.dk (Hollingbery, Julian) Date: Fri, 19 Aug 2011 16:25:22 +0200 Subject: [mapserver-users] Vectorizing/digitizing points that have In-Reply-To: <20110819141051.E005AE02491@lists.osgeo.org> References: <20110819141051.E005AE02491@lists.osgeo.org> Message-ID: <53D7A0A1A7E1B94689D14547F9262CF60CBC647B@resc-ex002.res.adroot.dk> Hi, You could also consider using &service=WMS&request=GetFeatureInfo, see http://mapserver.org/ogc/wms_server.html /julian -----Oprindelig meddelelse----- Message: 7 Date: Fri, 19 Aug 2011 13:55:00 +0000 From: Rahkonen Jukka Subject: Re: [mapserver-users] Vectorizing/digitizing points that have been rendered as raster To: 'Wim Vanbelle' , "'mapserver-users at lists.osgeo.org'" Message-ID: <84446DEF76453C439E9E97E438E13A6301D0AD at suutari.haapa.mmm.fi> Content-Type: text/plain; charset="us-ascii" Hi, Mapserver 6.0 is listing these filter capabilities I am not totally sure that all of them really works. Now it depends a bit about your need what filter to use. DWithin from the point should give exact results but probably you would need to adjust the distance according to the map scale. BBOX might be faster but then you must make a rectangle around the clicked point. About the same result can be obtained also with WMS GetFeatureInfo. Configure a suitable outputformat (text/plain, text/html or gml), use big enough feature_count and reasonable pixel based tolerance in the mapfile. -Jukka Rahkonen- Wim Vanbelle wrote Hi, Currently we have a lot of big datasets with points (think 50k points for instance) that we can now cluster service side with mapserver (cool). That works like a charm, but now we would like to fetch information if you click on them. (be it a clustered icon, or a non clustered). The client we are using is google maps with custom javascript code. As far as I'm aware, I need to perform a WFS request for this. I haven't got any problems setting that up, but what should be passed as a filter? Can we just pass a point as a filter in the request, or are we forced to supply a bounding box. I'm wondering if there are common solutions to tackle a similar problem. Thanks in advance. Best regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110819/9e 718318/attachment.html ------------------------------ _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users End of mapserver-users Digest, Vol 43, Issue 39 *********************************************** From gus.fava at gmail.com Fri Aug 19 09:28:51 2011 From: gus.fava at gmail.com (Gustavo1376) Date: Fri, 19 Aug 2011 09:28:51 -0700 (PDT) Subject: [mapserver-users] Re: Raster Data from PostGIS In-Reply-To: <1313730858654-6701922.post@n2.nabble.com> References: <1291038416747-5784362.post@n2.nabble.com> <281132.69958.qm@web38201.mail.mud.yahoo.com> <1291045835952-5784801.post@n2.nabble.com> <1291047127999-5784894.post@n2.nabble.com> <1291048753486-5785003.post@n2.nabble.com> <1291208184785-5791735.post@n2.nabble.com> <1313730858654-6701922.post@n2.nabble.com> Message-ID: <1313771331749-6703961.post@n2.nabble.com> Hi Florencia, i am Gustavo from Uruguay. Have you finally found the way to load a raster from a PostGis database? I'm trying to do that but no had no success yet. In my case the problem is that my application would generate a new raster everyday, so if i save them to disk it quickly will get out of space. So my option is to store the rasters in the database, with it's dedicated storage and (i hope) special methods for optimizing it's storage capacity. I mean, i think that a PostGis with 500GB storage capacity should be able to store much more images than a flat file system with same capacity. Well, i'll be pleased if you could share your solution (if finally found any). Regards, Gustavo. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Raster-Data-from-PostGIS-tp5784362p6703961.html Sent from the Mapserver - User mailing list archive at Nabble.com. From armaluvly_88 at yahoo.com Fri Aug 19 21:09:50 2011 From: armaluvly_88 at yahoo.com (lovelietha) Date: Fri, 19 Aug 2011 21:09:50 -0700 (PDT) Subject: [mapserver-users] Change Class EXPRESSION mapfile in chameleon framework Message-ID: <1313813390196-6705568.post@n2.nabble.com> Hi all,, I'm using a chameleon framework to make a webGIS..now i wonder how to change and modification CLASS EXPRESSION in mapfile based on what user selects from a form.And how to change that code if i have a new data insert in my database,how to change in order to connect -query- my database with my mapfile??how to change in order to be able update mapfile every database have new data inserted? Anyone can help me provide solutions and suggestions, or give me an example code?? Any suggestions would be helpful. Thanks. *Here is the Mapfile :* LAYER NAME Peta_Kota_region STATUS DEFAULT TYPE POLYGON TEMPLATE "../legend_template.html" CONNECTIONTYPE POSTGIS CONNECTION "user=postgres password=root dbname=DBD host=localhost port=5432" DATA "the_geom FROM tb_dbd USING UNIQUE gid" CLASS NAME "Low-Low" EXPRESSION ([Zi_epi05]&&[SumWijZj_epi05]<0) STYLE COLOR 0 0 255 OUTLINECOLOR 0 0 0 END # style END # class END # layer LAYER NAME LISAepi_05 STATUS DEFAULT TYPE POLYGON TEMPLATE "../legend_template.html" CONNECTIONTYPE POSTGIS CONNECTION "user=postgres password=root dbname=DBD host=localhost port=5432" DATA "the_geom FROM tb_dbd USING UNIQUE gid" CLASS NAME "Low-High" EXPRESSION ([Zi_epi05]<0&&[SumWijZj_epi05]>0) STYLE COLOR 170 170 255 OUTLINECOLOR 0 0 0 END # style END # class CLASS NAME "High-High" EXPRESSION ([Zi_epi05]&&[SumWijZj_epi05]>0) STYLE COLOR 238 0 0 OUTLINECOLOR 0 0 0 END # style END # class CLASS NAME "High-Low" EXPRESSION ([Zi_epi05]>0&&[SumWijZj_epi05]<0) STYLE COLOR 255 192 203 OUTLINECOLOR 0 0 0 END # style END # class END # layer -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Change-Class-EXPRESSION-mapfile-in-chameleon-framework-tp6705568p6705568.html Sent from the Mapserver - User mailing list archive at Nabble.com. From eresnick at tapestrysolutions.com Fri Aug 19 14:23:16 2011 From: eresnick at tapestrysolutions.com (Ed Resnick) Date: Fri, 19 Aug 2011 21:23:16 +0000 Subject: [mapserver-users] Problem displaying a NAD83 tile in WGS84 (or via WMS) Message-ID: <7BBCD831F60212448EB77D412A3D7544DB89@TAPCAS033.tapestry.local> Here's a WMS request, broken up for readability: ------------------------------------------------------- http://10.10.10.206/cgi-bin/mapserv.exe?map=E:/osm4326/mrsid.map &service=WMS &version=1.1.1 &request=GetMap &layers=default &format=image/png &width=256 &height=256 &srs=EPSG:4326 &bbox=-122.875,45.25,-122.75,45.375 &transparent=TRUE ------------------------------------------------------- Here's the gdalinfo dump: ------------------------------------------------------- Driver: MrSID/Multi-resolution Seamless Image Database (MrSID) Files: wa.sid.sid wa.sid.sdw wa.sid.sid.aux.xml Size is 1742, 1458 Coordinate System is: PROJCS["NAD_1983_UTM_Zone_10N", GEOGCS["GCS_North_American_1983", DATUM["North_American_Datum_1983", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["false_easting",500000.0], PARAMETER["false_northing",0.0], PARAMETER["central_meridian",-123.0], PARAMETER["scale_factor",0.9996], PARAMETER["latitude_of_origin",0.0], UNIT["Meter",1.0]] Origin = (555230.000000000000000,5048039.000000000000000) Pixel Size = (1.000009239300614,-1.000000000000000) Metadata: IMAGE__INPUT_NAME=C:\DOCUME~1\PAULW~2.ATT\LOCALS~1\Temp\img1AE.tmp IMAGE__INPUT_FILE_SIZE=7619508.000000 GEO__spref_horizsys_cordsysn_geogcsn=GCS_North_American_1983 GEO__spref_horizsys_cordsysn_projcsn=NAD_1983_UTM_Zone_10N GEO__spref_horizsys_planar_gridsys_gridsysn=Universal Transverse Mercator GEO__spref_horizsys_planar_gridsys_utm_utmzone=10 GEO__spref_horizsys_planar_gridsys_utm_transmer_sfctrmer=0.999600 GEO__spref_horizsys_planar_gridsys_utm_transmer_longcm=-123.000000 GEO__spref_horizsys_planar_gridsys_utm_transmer_latprjo=0.000000 GEO__spref_horizsys_planar_gridsys_utm_transmer_feast=500000.000000 GEO__spref_horizsys_planar_gridsys_utm_transmer_fnorth=0.000000 GEO__spref_horizsys_planar_planci_plance=row and column GEO__spref_horizsys_planar_planci_plandu=meters GEO__spref_horizsys_planar_planci_coordrep_absres=1.000009 GEO__spref_horizsys_planar_planci_coordrep_ordres=1.000000 GEO__spref_horizsys_geodetic_horizdn=North American Datum of 1983 GEO__spref_horizsys_geodetic_ellips=Geodetic Reference System 80 GEO__spref_horizsys_geodetic_semiaxis=6378137.000000 GEO__spref_horizsys_geodetic_denflat=298.257222 IMAGE__COMPRESSION_VERSION=1,6,3 IMAGE__TARGET_COMPRESSION_RATIO=20.000000 IMAGE__COMPRESSION_NLEV=6 IMAGE__COMPRESSION_WEIGHT=4.000000 IMAGE__COMPRESSION_GAMMA=2.000000 IMAGE__COMPRESSION_BLOCK_SIZE=512 IMAGE__CREATION_DATE=Wed Dec 02 14:18:16 2009 IMAGE__NO_DITHER=0 VERSION=MG2 IMAGE__WIDTH=1742 IMAGE__HEIGHT=1458 IMAGE__NO_DATA_VALUE=15,172,40 IMAGE__TRANSPARENT_DATA_VALUE=0,0,176 IMAGE__COLOR_SCHEME=0 IMAGE__DATA_TYPE=0 IMAGE__XY_ORIGIN=555230.500005,5048038.500000 IMAGE__X_RESOLUTION=1.000009 IMAGE__Y_RESOLUTION=1.000000 Image Structure Metadata: INTERLEAVE=PIXEL Corner Coordinates: Upper Left ( 555230.000, 5048039.000) (122d17'31.28"W, 45d35' 1.32"N) Lower Left ( 555230.000, 5046581.000) (122d17'31.87"W, 45d34'14.07"N) Upper Right ( 556972.016, 5048039.000) (122d16'10.90"W, 45d35' 0.81"N) Lower Right ( 556972.016, 5046581.000) (122d16'11.51"W, 45d34'13.57"N) Center ( 556101.008, 5047310.000) (122d16'51.39"W, 45d34'37.44"N) Band 1 Block=1742x128 Type=Byte, ColorInterp=Red Minimum=60.000, Maximum=222.000, Mean=119.606, StdDev=36.132 Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 Band 2 Block=1742x128 Type=Byte, ColorInterp=Green Minimum=84.000, Maximum=220.000, Mean=133.956, StdDev=21.319 Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 Band 3 Block=1742x128 Type=Byte, ColorInterp=Blue Minimum=95.000, Maximum=205.000, Mean=119.015, StdDev=12.620 Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 ------------------------------------------------------- And finally here is the map file: ------------------------------------------------------- MAP OUTPUTFORMAT NAME agg DRIVER AGG/PNG IMAGEMODE RGB FORMATOPTION "INTERLACE=false" MIMETYPE "image/png" END NAME "MrSID" IMAGETYPE agg MAXSIZE 4000 SIZE 800 800 IMAGECOLOR "#B3C6D4" WEB METADATA ows_enable_request "*" labelcache_map_edge_buffer "-10" wms_srs "EPSG:4326 EPSG:4269" wms_title "MrSID" wms_onlineresource "http://10.10.10.206/cgi-bin/mapserv.exe?map=E:/osm4326/mrsid.map" END END CONFIG "PROJ_LIB" "C:\ms4w\proj\nad" CONFIG "MS_ERRORFILE" "E:\errors.txt" DEBUG 5 SHAPEPATH "E:/osm4326/MrSID/" EXTENT -123.0 45.0 -122.0 46.0 UNITS dd PROJECTION "init=epsg:4326" END LAYER METADATA wms_title "A" wms_group_title "default" wms_srs "EPSG:4269" wms_extent "555230 5046581 556972 5048039" END TYPE RASTER STATUS ON GROUP "default" NAME "A" PROJECTION "init=epsg:4269" END EXTENT 555230 5046581 556972 5048039 DATA "wa.sid.sid" END END ------------------------------------------------------- ________________________________________ From: Rahkonen Jukka [Jukka.Rahkonen at mmmtike.fi] Sent: Thursday, August 18, 2011 9:51 PM To: Ed Resnick; 'mapserver-users at lists.osgeo.org' Subject: Re: [mapserver-users] Problem displaying a NAD83 tile in WGS84 (or via WMS) Hi, Could you give a bit more information? Your use case is the most common that exists and all instructions should be at http://mapserver.org/ogc/wms_server.html It would be good to see the gdalinfo report of your image and your mapfile and the exact WMS request you were using including the WMS version. At least these parts of mapfile are important MAP level: extent, projection and metadata (wms_srs and wms_inable_request at least) LAYER level projection. I can see some really odd LatLonBoundingBoxes in my own MS 6.0 WMS service too. I will investigate them a bit further. If it is just that the Mapserver is creating the GetCapabilities document wrong then the WMS service should still be usable. -Jukka Rahkonen- > -----Alkuper?inen viesti----- > L?hett?j?: mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Ed Resnick > L?hetetty: 19. elokuuta 2011 2:47 > Vastaanottaja: mapserver-users at lists.osgeo.org > Aihe: [mapserver-users] Problem displaying a NAD83 tile in > WGS84 (or via WMS) > > I have a MrSID file in NAD83 projection (EPGS 4269) which I > want to display via WMS in WGS84 projection (EPGS 4326). I > cannot get this to work. > > I have tried setting the entire map-file's projection to > 4269, with the extent specified in that projection (in > meters), and shp2img shows the image, but attempting to view > it via WMS (requesting the 4326 projection) does not work, > and the GetCapabilities response file is completely wrong - > the LatLonBoundingBox tags actually list the 4269 bounding > box in meters. Excerpt: > > maxx="556972" maxy="5.04804e+006" /> > minx="555230" miny="5.04658e+006" > maxx="556972" maxy="5.04804e+006" /> > > The BoundingBox is correct; the LatLonBoundingBox obviously is not. > > I have also tried specifying 4326 as the map projection and > 4269 as the layer projection, with the map's extent in > lat/lon and the layer's extent as the above value (meters). > Not only did this not work, but even shp2img just shows a > blank image. If I change the map's extent to the value in > meters (even though its projection is specified as 4326), > then shp2img works, but the WMS feed still does not; the > GetCapabilities still is wrong. > > Is MapServer simply buggy or is there a > solution?_______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From eresnick at tapestrysolutions.com Fri Aug 19 10:02:32 2011 From: eresnick at tapestrysolutions.com (Ed Resnick) Date: Fri, 19 Aug 2011 10:02:32 -0700 Subject: Re: [mapserver-users] Problem displaying a NAD83 tile in WGS84 (or via WMS) In-Reply-To: <84446DEF76453C439E9E97E438E13A6301B6D7@suutari.haapa.mmm.fi> References: <821DFFD0027A51448486B39C85CAB8B94E42345322@tapca032>, <84446DEF76453C439E9E97E438E13A6301B6D7@suutari.haapa.mmm.fi> Message-ID: <821DFFD0027A51448486B39C85CAB8B94E42345323@tapca032> Here's a WMS request, broken up for readability: ------------------------------------------------------- http://10.10.10.206/cgi-bin/mapserv.exe?map=E:/osm4326/mrsid.map &service=WMS &version=1.1.1 &request=GetMap &layers=default &format=image/png &width=256 &height=256 &srs=EPSG:4326 &bbox=-122.875,45.25,-122.75,45.375 &transparent=TRUE ------------------------------------------------------- Here's the gdalinfo dump: ------------------------------------------------------- Driver: MrSID/Multi-resolution Seamless Image Database (MrSID) Files: wa.sid.sid wa.sid.sdw wa.sid.sid.aux.xml Size is 1742, 1458 Coordinate System is: PROJCS["NAD_1983_UTM_Zone_10N", GEOGCS["GCS_North_American_1983", DATUM["North_American_Datum_1983", SPHEROID["GRS_1980",6378137.0,298.257222101]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["false_easting",500000.0], PARAMETER["false_northing",0.0], PARAMETER["central_meridian",-123.0], PARAMETER["scale_factor",0.9996], PARAMETER["latitude_of_origin",0.0], UNIT["Meter",1.0]] Origin = (555230.000000000000000,5048039.000000000000000) Pixel Size = (1.000009239300614,-1.000000000000000) Metadata: IMAGE__INPUT_NAME=C:\DOCUME~1\PAULW~2.ATT\LOCALS~1\Temp\img1AE.tmp IMAGE__INPUT_FILE_SIZE=7619508.000000 GEO__spref_horizsys_cordsysn_geogcsn=GCS_North_American_1983 GEO__spref_horizsys_cordsysn_projcsn=NAD_1983_UTM_Zone_10N GEO__spref_horizsys_planar_gridsys_gridsysn=Universal Transverse Mercator GEO__spref_horizsys_planar_gridsys_utm_utmzone=10 GEO__spref_horizsys_planar_gridsys_utm_transmer_sfctrmer=0.999600 GEO__spref_horizsys_planar_gridsys_utm_transmer_longcm=-123.000000 GEO__spref_horizsys_planar_gridsys_utm_transmer_latprjo=0.000000 GEO__spref_horizsys_planar_gridsys_utm_transmer_feast=500000.000000 GEO__spref_horizsys_planar_gridsys_utm_transmer_fnorth=0.000000 GEO__spref_horizsys_planar_planci_plance=row and column GEO__spref_horizsys_planar_planci_plandu=meters GEO__spref_horizsys_planar_planci_coordrep_absres=1.000009 GEO__spref_horizsys_planar_planci_coordrep_ordres=1.000000 GEO__spref_horizsys_geodetic_horizdn=North American Datum of 1983 GEO__spref_horizsys_geodetic_ellips=Geodetic Reference System 80 GEO__spref_horizsys_geodetic_semiaxis=6378137.000000 GEO__spref_horizsys_geodetic_denflat=298.257222 IMAGE__COMPRESSION_VERSION=1,6,3 IMAGE__TARGET_COMPRESSION_RATIO=20.000000 IMAGE__COMPRESSION_NLEV=6 IMAGE__COMPRESSION_WEIGHT=4.000000 IMAGE__COMPRESSION_GAMMA=2.000000 IMAGE__COMPRESSION_BLOCK_SIZE=512 IMAGE__CREATION_DATE=Wed Dec 02 14:18:16 2009 IMAGE__NO_DITHER=0 VERSION=MG2 IMAGE__WIDTH=1742 IMAGE__HEIGHT=1458 IMAGE__NO_DATA_VALUE=15,172,40 IMAGE__TRANSPARENT_DATA_VALUE=0,0,176 IMAGE__COLOR_SCHEME=0 IMAGE__DATA_TYPE=0 IMAGE__XY_ORIGIN=555230.500005,5048038.500000 IMAGE__X_RESOLUTION=1.000009 IMAGE__Y_RESOLUTION=1.000000 Image Structure Metadata: INTERLEAVE=PIXEL Corner Coordinates: Upper Left ( 555230.000, 5048039.000) (122d17'31.28"W, 45d35' 1.32"N) Lower Left ( 555230.000, 5046581.000) (122d17'31.87"W, 45d34'14.07"N) Upper Right ( 556972.016, 5048039.000) (122d16'10.90"W, 45d35' 0.81"N) Lower Right ( 556972.016, 5046581.000) (122d16'11.51"W, 45d34'13.57"N) Center ( 556101.008, 5047310.000) (122d16'51.39"W, 45d34'37.44"N) Band 1 Block=1742x128 Type=Byte, ColorInterp=Red Minimum=60.000, Maximum=222.000, Mean=119.606, StdDev=36.132 Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 Band 2 Block=1742x128 Type=Byte, ColorInterp=Green Minimum=84.000, Maximum=220.000, Mean=133.956, StdDev=21.319 Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 Band 3 Block=1742x128 Type=Byte, ColorInterp=Blue Minimum=95.000, Maximum=205.000, Mean=119.015, StdDev=12.620 Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 ------------------------------------------------------- And finally here is the map file: ------------------------------------------------------- MAP OUTPUTFORMAT NAME agg DRIVER AGG/PNG IMAGEMODE RGB FORMATOPTION "INTERLACE=false" MIMETYPE "image/png" END NAME "MrSID" IMAGETYPE agg MAXSIZE 4000 SIZE 800 800 IMAGECOLOR "#B3C6D4" WEB METADATA ows_enable_request "*" labelcache_map_edge_buffer "-10" wms_srs "EPSG:4326 EPSG:4269" wms_title "MrSID" wms_onlineresource "http://10.10.10.206/cgi-bin/mapserv.exe?map=E:/osm4326/mrsid.map" END END CONFIG "PROJ_LIB" "C:\ms4w\proj\nad" CONFIG "MS_ERRORFILE" "E:\errors.txt" DEBUG 5 SHAPEPATH "E:/osm4326/MrSID/" EXTENT -123.0 45.0 -122.0 46.0 UNITS dd PROJECTION "init=epsg:4326" END LAYER METADATA wms_title "A" wms_group_title "default" wms_srs "EPSG:4269" wms_extent "555230 5046581 556972 5048039" END TYPE RASTER STATUS ON GROUP "default" NAME "A" PROJECTION "init=epsg:4269" END EXTENT 555230 5046581 556972 5048039 DATA "wa.sid.sid" END END ------------------------------------------------------- ________________________________________ From: Rahkonen Jukka [Jukka.Rahkonen at mmmtike.fi] Sent: Thursday, August 18, 2011 9:51 PM To: Ed Resnick; 'mapserver-users at lists.osgeo.org' Subject: Re: [mapserver-users] Problem displaying a NAD83 tile in WGS84 (or via WMS) Hi, Could you give a bit more information? Your use case is the most common that exists and all instructions should be at http://mapserver.org/ogc/wms_server.html It would be good to see the gdalinfo report of your image and your mapfile and the exact WMS request you were using including the WMS version. At least these parts of mapfile are important MAP level: extent, projection and metadata (wms_srs and wms_inable_request at least) LAYER level projection. I can see some really odd LatLonBoundingBoxes in my own MS 6.0 WMS service too. I will investigate them a bit further. If it is just that the Mapserver is creating the GetCapabilities document wrong then the WMS service should still be usable. -Jukka Rahkonen- > -----Alkuper?inen viesti----- > L?hett?j?: mapserver-users-bounces at lists.osgeo.org > [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Ed Resnick > L?hetetty: 19. elokuuta 2011 2:47 > Vastaanottaja: mapserver-users at lists.osgeo.org > Aihe: [mapserver-users] Problem displaying a NAD83 tile in > WGS84 (or via WMS) > > I have a MrSID file in NAD83 projection (EPGS 4269) which I > want to display via WMS in WGS84 projection (EPGS 4326). I > cannot get this to work. > > I have tried setting the entire map-file's projection to > 4269, with the extent specified in that projection (in > meters), and shp2img shows the image, but attempting to view > it via WMS (requesting the 4326 projection) does not work, > and the GetCapabilities response file is completely wrong - > the LatLonBoundingBox tags actually list the 4269 bounding > box in meters. Excerpt: > > maxx="556972" maxy="5.04804e+006" /> > minx="555230" miny="5.04658e+006" > maxx="556972" maxy="5.04804e+006" /> > > The BoundingBox is correct; the LatLonBoundingBox obviously is not. > > I have also tried specifying 4326 as the map projection and > 4269 as the layer projection, with the map's extent in > lat/lon and the layer's extent as the above value (meters). > Not only did this not work, but even shp2img just shows a > blank image. If I change the map's extent to the value in > meters (even though its projection is specified as 4326), > then shp2img works, but the WMS feed still does not; the > GetCapabilities still is wrong. > > Is MapServer simply buggy or is there a > solution?_______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From Michael.Smith at usace.army.mil Sat Aug 20 02:25:37 2011 From: Michael.Smith at usace.army.mil (Smith, Michael ERDC-CRREL-NH) Date: Sat, 20 Aug 2011 09:25:37 +0000 Subject: [mapserver-users] Problem displaying a NAD83 tile in WGS84 (or via WMS) In-Reply-To: <7BBCD831F60212448EB77D412A3D7544DB89@TAPCAS033.tapestry.local> Message-ID: Ed, Your mrsid image is in UTM Zone 10, NAD 1983. You should set PROJECTION "init=epsg:26910" END For your layer (http://spatialreference.org/ref/epsg/26910/) -- Mike Michael Smith Remote Sensing/GIS Center US Army Corps of Engineers On 8/19/11 5:23 PM, "Ed Resnick" wrote: >Here's a WMS request, broken up for readability: > >------------------------------------------------------- >http://10.10.10.206/cgi-bin/mapserv.exe?map=E:/osm4326/mrsid.map > &service=WMS > &version=1.1.1 > &request=GetMap > &layers=default > &format=image/png > &width=256 > &height=256 > &srs=EPSG:4326 > &bbox=-122.875,45.25,-122.75,45.375 > &transparent=TRUE >------------------------------------------------------- > >Here's the gdalinfo dump: > >------------------------------------------------------- >Driver: MrSID/Multi-resolution Seamless Image Database (MrSID) >Files: wa.sid.sid > wa.sid.sdw > wa.sid.sid.aux.xml >Size is 1742, 1458 >Coordinate System is: >PROJCS["NAD_1983_UTM_Zone_10N", > GEOGCS["GCS_North_American_1983", > DATUM["North_American_Datum_1983", > SPHEROID["GRS_1980",6378137.0,298.257222101]], > PRIMEM["Greenwich",0.0], > UNIT["Degree",0.0174532925199433]], > PROJECTION["Transverse_Mercator"], > PARAMETER["false_easting",500000.0], > PARAMETER["false_northing",0.0], > PARAMETER["central_meridian",-123.0], > PARAMETER["scale_factor",0.9996], > PARAMETER["latitude_of_origin",0.0], > UNIT["Meter",1.0]] >Origin = (555230.000000000000000,5048039.000000000000000) >Pixel Size = (1.000009239300614,-1.000000000000000) >Metadata: > IMAGE__INPUT_NAME=C:\DOCUME~1\PAULW~2.ATT\LOCALS~1\Temp\img1AE.tmp > IMAGE__INPUT_FILE_SIZE=7619508.000000 > GEO__spref_horizsys_cordsysn_geogcsn=GCS_North_American_1983 > GEO__spref_horizsys_cordsysn_projcsn=NAD_1983_UTM_Zone_10N > GEO__spref_horizsys_planar_gridsys_gridsysn=Universal Transverse >Mercator > GEO__spref_horizsys_planar_gridsys_utm_utmzone=10 > GEO__spref_horizsys_planar_gridsys_utm_transmer_sfctrmer=0.999600 > GEO__spref_horizsys_planar_gridsys_utm_transmer_longcm=-123.000000 > GEO__spref_horizsys_planar_gridsys_utm_transmer_latprjo=0.000000 > GEO__spref_horizsys_planar_gridsys_utm_transmer_feast=500000.000000 > GEO__spref_horizsys_planar_gridsys_utm_transmer_fnorth=0.000000 > GEO__spref_horizsys_planar_planci_plance=row and column > GEO__spref_horizsys_planar_planci_plandu=meters > GEO__spref_horizsys_planar_planci_coordrep_absres=1.000009 > GEO__spref_horizsys_planar_planci_coordrep_ordres=1.000000 > GEO__spref_horizsys_geodetic_horizdn=North American Datum of 1983 > GEO__spref_horizsys_geodetic_ellips=Geodetic Reference System 80 > GEO__spref_horizsys_geodetic_semiaxis=6378137.000000 > GEO__spref_horizsys_geodetic_denflat=298.257222 > IMAGE__COMPRESSION_VERSION=1,6,3 > IMAGE__TARGET_COMPRESSION_RATIO=20.000000 > IMAGE__COMPRESSION_NLEV=6 > IMAGE__COMPRESSION_WEIGHT=4.000000 > IMAGE__COMPRESSION_GAMMA=2.000000 > IMAGE__COMPRESSION_BLOCK_SIZE=512 > IMAGE__CREATION_DATE=Wed Dec 02 14:18:16 2009 > > IMAGE__NO_DITHER=0 > VERSION=MG2 > IMAGE__WIDTH=1742 > IMAGE__HEIGHT=1458 > IMAGE__NO_DATA_VALUE=15,172,40 > IMAGE__TRANSPARENT_DATA_VALUE=0,0,176 > IMAGE__COLOR_SCHEME=0 > IMAGE__DATA_TYPE=0 > IMAGE__XY_ORIGIN=555230.500005,5048038.500000 > IMAGE__X_RESOLUTION=1.000009 > IMAGE__Y_RESOLUTION=1.000000 >Image Structure Metadata: > INTERLEAVE=PIXEL >Corner Coordinates: >Upper Left ( 555230.000, 5048039.000) (122d17'31.28"W, 45d35' 1.32"N) >Lower Left ( 555230.000, 5046581.000) (122d17'31.87"W, 45d34'14.07"N) >Upper Right ( 556972.016, 5048039.000) (122d16'10.90"W, 45d35' 0.81"N) >Lower Right ( 556972.016, 5046581.000) (122d16'11.51"W, 45d34'13.57"N) >Center ( 556101.008, 5047310.000) (122d16'51.39"W, 45d34'37.44"N) >Band 1 Block=1742x128 Type=Byte, ColorInterp=Red > Minimum=60.000, Maximum=222.000, Mean=119.606, StdDev=36.132 > Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 >Band 2 Block=1742x128 Type=Byte, ColorInterp=Green > Minimum=84.000, Maximum=220.000, Mean=133.956, StdDev=21.319 > Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 >Band 3 Block=1742x128 Type=Byte, ColorInterp=Blue > Minimum=95.000, Maximum=205.000, Mean=119.015, StdDev=12.620 > Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 >------------------------------------------------------- > >And finally here is the map file: > >------------------------------------------------------- >MAP >OUTPUTFORMAT > NAME agg > DRIVER AGG/PNG > IMAGEMODE RGB > FORMATOPTION "INTERLACE=false" > MIMETYPE "image/png" >END >NAME "MrSID" >IMAGETYPE agg >MAXSIZE 4000 >SIZE 800 800 >IMAGECOLOR "#B3C6D4" >WEB > METADATA > ows_enable_request "*" > labelcache_map_edge_buffer "-10" > wms_srs "EPSG:4326 EPSG:4269" > wms_title "MrSID" > wms_onlineresource >"http://10.10.10.206/cgi-bin/mapserv.exe?map=E:/osm4326/mrsid.map" > END >END >CONFIG "PROJ_LIB" "C:\ms4w\proj\nad" >CONFIG "MS_ERRORFILE" "E:\errors.txt" >DEBUG 5 >SHAPEPATH "E:/osm4326/MrSID/" >EXTENT -123.0 45.0 -122.0 46.0 >UNITS dd >PROJECTION >"init=epsg:4326" >END >LAYER > METADATA > wms_title "A" > wms_group_title "default" > wms_srs "EPSG:4269" > wms_extent "555230 5046581 556972 5048039" > END > TYPE RASTER > STATUS ON > GROUP "default" > NAME "A" > PROJECTION > "init=epsg:4269" > END > EXTENT 555230 5046581 556972 5048039 > DATA "wa.sid.sid" >END >END >------------------------------------------------------- > > >________________________________________ >From: Rahkonen Jukka [Jukka.Rahkonen at mmmtike.fi] >Sent: Thursday, August 18, 2011 9:51 PM >To: Ed Resnick; 'mapserver-users at lists.osgeo.org' >Subject: Re: [mapserver-users] Problem displaying a NAD83 tile in >WGS84 (or via WMS) > >Hi, > >Could you give a bit more information? Your use case is the most common >that exists and all instructions should be at >http://mapserver.org/ogc/wms_server.html >It would be good to see the gdalinfo report of your image and your >mapfile and the exact WMS request you were using including the WMS >version. At least these parts of mapfile are important > >MAP level: extent, projection and metadata (wms_srs and >wms_inable_request at least) >LAYER level projection. > >I can see some really odd LatLonBoundingBoxes in my own MS 6.0 WMS >service too. I will investigate them a bit further. If it is just that >the Mapserver is creating the GetCapabilities document wrong then the WMS >service should still be usable. > >-Jukka Rahkonen- > > > > >> -----Alkuper?inen viesti----- >> L?hett?j?: mapserver-users-bounces at lists.osgeo.org >> [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Ed Resnick >> L?hetetty: 19. elokuuta 2011 2:47 >> Vastaanottaja: mapserver-users at lists.osgeo.org >> Aihe: [mapserver-users] Problem displaying a NAD83 tile in >> WGS84 (or via WMS) >> >> I have a MrSID file in NAD83 projection (EPGS 4269) which I >> want to display via WMS in WGS84 projection (EPGS 4326). I >> cannot get this to work. >> >> I have tried setting the entire map-file's projection to >> 4269, with the extent specified in that projection (in >> meters), and shp2img shows the image, but attempting to view >> it via WMS (requesting the 4326 projection) does not work, >> and the GetCapabilities response file is completely wrong - >> the LatLonBoundingBox tags actually list the 4269 bounding >> box in meters. Excerpt: >> >> > maxx="556972" maxy="5.04804e+006" /> >> > minx="555230" miny="5.04658e+006" >> maxx="556972" maxy="5.04804e+006" /> >> >> The BoundingBox is correct; the LatLonBoundingBox obviously is not. >> >> I have also tried specifying 4326 as the map projection and >> 4269 as the layer projection, with the map's extent in >> lat/lon and the layer's extent as the above value (meters). >> Not only did this not work, but even shp2img just shows a >> blank image. If I change the map's extent to the value in >> meters (even though its projection is specified as 4326), >> then shp2img works, but the WMS feed still does not; the >> GetCapabilities still is wrong. >> >> Is MapServer simply buggy or is there a >> solution?_______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >_______________________________________________ >mapserver-users mailing list >mapserver-users at lists.osgeo.org >http://lists.osgeo.org/mailman/listinfo/mapserver-users From baas at speerit.nl Fri Aug 19 05:05:44 2011 From: baas at speerit.nl (Jelmer Baas) Date: Fri, 19 Aug 2011 12:05:44 +0000 Subject: [mapserver-users] RE: Error with WFS request from MapInfo In-Reply-To: <84446DEF76453C439E9E97E438E13A6301B788@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301B741@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301B788@suutari.haapa.mmm.fi> Message-ID: Oh, wow, thanks to adding the wfs_extent and fixing a few other mistakes I found, I actually got it to work! Thanks a lot for the quick answers! Regards, Jelmer Baas > -----Original Message----- > From: Rahkonen Jukka [mailto:Jukka.Rahkonen at mmmtike.fi] > Sent: vrijdag 19 augustus 2011 12:41 > To: Jelmer Baas; 'mapserver-users at lists.osgeo.org' > Subject: Re: Error with WFS request from MapInfo > > Hi, > > You can also try to add this to LAYER > wfs_extent > > Description: (Optional) Used for the layer's BoundingBox tag for cases > where it is impossible (or very inefficient) for MapServer to probe the data > source to figure its extents. The value for this metadata is "minx miny maxx > maxy" separated by spaces, with the values in the layer's projection units. If > wfs_extent is provided then it has priority and MapServer will NOT try to > read the source file's extents. > > And of course you should always be the boss and test with the basic hand > written requests first before letting the GIS client to add for the complexity. > Something like these: > > http://myserver.xx/cgi- > bin/mapserv.exe?service=wfs&version=1.0.0&request=getCapabilities&map > =path/to/the/wfs.map > http://myserver.xx/cgi- > bin/mapserv.exe?service=wfs&version=1.0.0&request=DescribeFeatureTyp > e&typeName=mytest&map=path/to/the/wfs.map > http://myserver.xx/cgi- > bin/mapserv.exe?service=wfs&version=1.0.0&request=GetFeature&typeNa > me=mytest&maxFeatures=10&map=path/to/the/wfs.map > > -Jukka Rahkonen- > > > -----Alkuper?inen viesti----- > > L?hett?j?: Jelmer Baas [mailto:baas at speerit.nl] > > L?hetetty: 19. elokuuta 2011 12:45 > > Vastaanottaja: Rahkonen Jukka; 'mapserver-users at lists.osgeo.org' > > Aihe: RE: Error with WFS request from MapInfo > > > > Jukka, > > > > Thanks for your pointers, I'll check out other WFS servers > > and see how far I get. I did add the extent as EXTENT -180 > > -90 180 90 in the map file but that doesn't seem to change anything. > > > > Regards > > Jelmer Baas > > > > > -----Original Message----- > > > From: Rahkonen Jukka [mailto:Jukka.Rahkonen at mmmtike.fi] > > > Sent: vrijdag 19 augustus 2011 11:05 > > > To: Jelmer Baas; 'mapserver-users at lists.osgeo.org' > > > Subject: Re: Error with WFS request from MapInfo > > > > > > Hi, > > > > > > I would start by addind EXTENT to MAP level. WFS 1.0.0 does > > not support > > > reprojection so select the desired output srsName and use > > that as map level > > > PROJECTION. Express extents to suit that projection. > > > > > > Mapserver has been pretty poor WFS server for real GIS > > clients but it is > > > getting better. However, I cannot promise you any amazing > > interoperability. > > > At least I would recommend you to update to 6.0. If you > > want to get some > > > good feelings about WFS consider having a try with TinyOWS > > first. It works > > > only with PostGIS (v. 1.5 or higher) but that looks to be > > OK for you. I have > > > managed to read features from TinyOWS with Kosmo GIS, > > gvSIG, QGis, uDig, > > > ArcGIS, MapInfo, Gaia, SIS Map Browser and iGeoDesktop. > > With some clients > > > even attribute and spatial filters work. Come back to > > Mapserver WFS later > > > and start making bug reports. Glad that you learned already > > to study the > > > POST traffic, it is really a must with WFS debugging. I am > > using Fiddler for that > > > purpose. > > > > > > MapInfo seems to send a most basic WFS call (or stupid, > > just orders the > > > whole layer from you) so that should not be a trouble in > > this case. Once you > > > get the extents corrected you can continue and wait excited > > if MapInfo will > > > have troubles with checking the schemas and parsing the GML > > that comes > > > from Mapserver. > > > > > > -Jukka Rahkonen- > > > > > > > > > > > > > > > > -----Alkuper?inen viesti----- > > > > L?hett?j?: mapserver-users-bounces at lists.osgeo.org > > > > [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta > > Jelmer Baas > > > > L?hetetty: 19. elokuuta 2011 11:26 > > > > Vastaanottaja: mapserver-users at lists.osgeo.org > > > > Aihe: [mapserver-users] Error with WFS request from MapInfo > > > > > > > > Hello list, > > > > > > > > I've been struggling with this issue for a while, now. When I > > > > try to add a WFS layer in MapInfo, I receive the following > > > > error (from the mapserver logfile): > > > > prepare_database(): Query error. Error declaring cursor: > > > > ERROR: BOX3D parser - couldnt parse. It should look like: > > > > BOX3D(xmin ymin zmin,xmax ymax zmax) or BOX3D(xmin ymin,xmax > > > ymax) > > > > LINE 1: ...:text from pandactueel WHERE geometrie && > > > > setSRID('BOX3D(-1.... > > > > ^ > > > > > > > > With query string: DECLARE mycursor BINARY CURSOR FOR SELECT > > > > asbinary(force_collection(force_2d(geo)),'NDR'),oid::text > > > > from mytable WHERE geo && setSRID('BOX3D(-1.#INF > > > > -1.#INF,1390604146415.56 -16080812.3872859)'::BOX3D, 28992 ) > > > > > > > > The layer itself works, via normal GetMap requests. > > > > > > > > This is my mapfile: > > > > > > > > MAP > > > > NAME TEST > > > > STATUS ON > > > > UNITS meters > > > > FONTSET "fontset.txt" > > > > DEBUG 5 > > > > CONFIG "MS_ERRORFILE" "c:\temp\mapserver.log" > > > > IMAGECOLOR 255 55 255 > > > > OUTPUTFORMAT > > > > NAME aggpng24 > > > > DRIVER AGG/PNG > > > > TRANSPARENT ON > > > > IMAGEMODE RGBA > > > > MIMETYPE "image/png" > > > > EXTENSION "png" > > > > END > > > > > > > > WEB > > > > METADATA > > > > "wms_title" "TEST" > > > > "wfs_title" "TEST" > > > > "wms_srs" "epsg:4326 epsg:900913" > > > > "wfs_srs" "epsg:4326 epsg:900913" > > > > "wms_onlineresource" "***" > > > > "wfs_onlineresource" "***" > > > > END # METADATA > > > > END #web > > > > > > > > > > > > SYMBOLSET "symbols_mapinfo2.sym" > > > > PROJECTION > > > > "init=epsg:4326" > > > > END > > > > LAYER > > > > TYPE POLYGON > > > > STATUS ON > > > > DUMP TRUE > > > > CONNECTIONTYPE POSTGIS > > > > CONNECTION "host=localhost dbname=TEST user=postgres > > > > password=*** port=5432" > > > > DATA "geo from mytable using unique oid using > > srid=28992" > > > > NAME mytest > > > > CLASS > > > > NAME " mytest " > > > > STYLE > > > > COLOR 0 0 250 > > > > OUTLINECOLOR 0 250 0 > > > > END > > > > END > > > > PROJECTION > > > > "init=epsg:28992" > > > > END > > > > MINSCALE 1 > > > > MAXSCALE 80000000 > > > > METADATA > > > > "wms_title" " mytest " > > > > "wms_srs" "epsg:4326 epsg:900913" > > > > "wfs_title" " mytest " > > > > "wfs_srs" "epsg:4326 epsg:900913" > > > > "gml_featureid" "oid" > > > > "gml_include_items" "all" > > > > END # METADATA > > > > END > > > > END # Map File > > > > > > > > > > > > MapInfo sends its requests as post (I'd prefer get...) and > > > > after using a packet sniffer I found out it sends this: > > > > > > > > > > > xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > > > > xmlns:gml="http://www.opengis.net/gml" > > > > xmlns:ogc="http://www.opengis.net/ogc" > > > > xmlns="http://www.opengis.net/wfs" > > > > xsi:schemaLocation="http://www.opengis.net/wfs > > > > ../wfs/1.0.0/WFS-basic.xsd" > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > typeName=" mytest"/> > > > > > > > > I use MapServer version 5.4.2, by the way. > > > > > > > > Can anyone tell me what I'm missing? Should I add extends in > > > > the MapFile or something? And where do those weird numbers come > > > from? > > > > > > > > Regards, > > > > Jelmer Baas > > > > Speer IT B.V. > > > > _______________________________________________ > > > > mapserver-users mailing list > > > > mapserver-users at lists.osgeo.org > > > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > > From baas at speerit.nl Fri Aug 19 02:44:46 2011 From: baas at speerit.nl (Jelmer Baas) Date: Fri, 19 Aug 2011 09:44:46 +0000 Subject: [mapserver-users] RE: Error with WFS request from MapInfo In-Reply-To: <84446DEF76453C439E9E97E438E13A6301B741@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301B741@suutari.haapa.mmm.fi> Message-ID: Jukka, Thanks for your pointers, I'll check out other WFS servers and see how far I get. I did add the extent as EXTENT -180 -90 180 90 in the map file but that doesn't seem to change anything. Regards Jelmer Baas > -----Original Message----- > From: Rahkonen Jukka [mailto:Jukka.Rahkonen at mmmtike.fi] > Sent: vrijdag 19 augustus 2011 11:05 > To: Jelmer Baas; 'mapserver-users at lists.osgeo.org' > Subject: Re: Error with WFS request from MapInfo > > Hi, > > I would start by addind EXTENT to MAP level. WFS 1.0.0 does not support > reprojection so select the desired output srsName and use that as map level > PROJECTION. Express extents to suit that projection. > > Mapserver has been pretty poor WFS server for real GIS clients but it is > getting better. However, I cannot promise you any amazing interoperability. > At least I would recommend you to update to 6.0. If you want to get some > good feelings about WFS consider having a try with TinyOWS first. It works > only with PostGIS (v. 1.5 or higher) but that looks to be OK for you. I have > managed to read features from TinyOWS with Kosmo GIS, gvSIG, QGis, uDig, > ArcGIS, MapInfo, Gaia, SIS Map Browser and iGeoDesktop. With some clients > even attribute and spatial filters work. Come back to Mapserver WFS later > and start making bug reports. Glad that you learned already to study the > POST traffic, it is really a must with WFS debugging. I am using Fiddler for that > purpose. > > MapInfo seems to send a most basic WFS call (or stupid, just orders the > whole layer from you) so that should not be a trouble in this case. Once you > get the extents corrected you can continue and wait excited if MapInfo will > have troubles with checking the schemas and parsing the GML that comes > from Mapserver. > > -Jukka Rahkonen- > > > > > > -----Alkuper?inen viesti----- > > L?hett?j?: mapserver-users-bounces at lists.osgeo.org > > [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Jelmer Baas > > L?hetetty: 19. elokuuta 2011 11:26 > > Vastaanottaja: mapserver-users at lists.osgeo.org > > Aihe: [mapserver-users] Error with WFS request from MapInfo > > > > Hello list, > > > > I've been struggling with this issue for a while, now. When I > > try to add a WFS layer in MapInfo, I receive the following > > error (from the mapserver logfile): > > prepare_database(): Query error. Error declaring cursor: > > ERROR: BOX3D parser - couldnt parse. It should look like: > > BOX3D(xmin ymin zmin,xmax ymax zmax) or BOX3D(xmin ymin,xmax > ymax) > > LINE 1: ...:text from pandactueel WHERE geometrie && > > setSRID('BOX3D(-1.... > > ^ > > > > With query string: DECLARE mycursor BINARY CURSOR FOR SELECT > > asbinary(force_collection(force_2d(geo)),'NDR'),oid::text > > from mytable WHERE geo && setSRID('BOX3D(-1.#INF > > -1.#INF,1390604146415.56 -16080812.3872859)'::BOX3D, 28992 ) > > > > The layer itself works, via normal GetMap requests. > > > > This is my mapfile: > > > > MAP > > NAME TEST > > STATUS ON > > UNITS meters > > FONTSET "fontset.txt" > > DEBUG 5 > > CONFIG "MS_ERRORFILE" "c:\temp\mapserver.log" > > IMAGECOLOR 255 55 255 > > OUTPUTFORMAT > > NAME aggpng24 > > DRIVER AGG/PNG > > TRANSPARENT ON > > IMAGEMODE RGBA > > MIMETYPE "image/png" > > EXTENSION "png" > > END > > > > WEB > > METADATA > > "wms_title" "TEST" > > "wfs_title" "TEST" > > "wms_srs" "epsg:4326 epsg:900913" > > "wfs_srs" "epsg:4326 epsg:900913" > > "wms_onlineresource" "***" > > "wfs_onlineresource" "***" > > END # METADATA > > END #web > > > > > > SYMBOLSET "symbols_mapinfo2.sym" > > PROJECTION > > "init=epsg:4326" > > END > > LAYER > > TYPE POLYGON > > STATUS ON > > DUMP TRUE > > CONNECTIONTYPE POSTGIS > > CONNECTION "host=localhost dbname=TEST user=postgres > > password=*** port=5432" > > DATA "geo from mytable using unique oid using srid=28992" > > NAME mytest > > CLASS > > NAME " mytest " > > STYLE > > COLOR 0 0 250 > > OUTLINECOLOR 0 250 0 > > END > > END > > PROJECTION > > "init=epsg:28992" > > END > > MINSCALE 1 > > MAXSCALE 80000000 > > METADATA > > "wms_title" " mytest " > > "wms_srs" "epsg:4326 epsg:900913" > > "wfs_title" " mytest " > > "wfs_srs" "epsg:4326 epsg:900913" > > "gml_featureid" "oid" > > "gml_include_items" "all" > > END # METADATA > > END > > END # Map File > > > > > > MapInfo sends its requests as post (I'd prefer get...) and > > after using a packet sniffer I found out it sends this: > > > > > xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > > xmlns:gml="http://www.opengis.net/gml" > > xmlns:ogc="http://www.opengis.net/ogc" > > xmlns="http://www.opengis.net/wfs" > > xsi:schemaLocation="http://www.opengis.net/wfs > > ../wfs/1.0.0/WFS-basic.xsd" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > typeName=" mytest"/> > > > > I use MapServer version 5.4.2, by the way. > > > > Can anyone tell me what I'm missing? Should I add extends in > > the MapFile or something? And where do those weird numbers come > from? > > > > Regards, > > Jelmer Baas > > Speer IT B.V. > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > From Jukka.Rahkonen at mmmtike.fi Sun Aug 21 21:59:55 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Mon, 22 Aug 2011 04:59:55 +0000 Subject: [mapserver-users] Re: Raster Data from PostGIS In-Reply-To: <1313771331749-6703961.post@n2.nabble.com> References: <1291038416747-5784362.post@n2.nabble.com> <281132.69958.qm@web38201.mail.mud.yahoo.com> <1291045835952-5784801.post@n2.nabble.com> <1291047127999-5784894.post@n2.nabble.com> <1291048753486-5785003.post@n2.nabble.com> <1291208184785-5791735.post@n2.nabble.com> <1313730858654-6701922.post@n2.nabble.com>, <1313771331749-6703961.post@n2.nabble.com> Message-ID: <84446DEF76453C439E9E97E438E13A6301D2C6@suutari.haapa.mmm.fi> Gustavo1376 wrote: > I mean, i > think that a PostGis with 500GB storage capacity should be able to store > much more images than a flat file system with same capacity. Unfortunate database can not do such a magic. Database tables are also stored into files, and I do not believe that they are especially well compressed. Probably your images would take more disk space in the database than as image files. -Jukka Rahkonen- From stephane.brunner at camptocamp.com Mon Aug 22 02:41:29 2011 From: stephane.brunner at camptocamp.com (=?ISO-8859-1?Q?St=E9phane_Brunner?=) Date: Mon, 22 Aug 2011 11:41:29 +0200 Subject: [mapserver-users] Problem GetFeature with geom filter on WFS In-Reply-To: <84446DEF76453C439E9E97E438E13A6301A120@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301A120@suutari.haapa.mmm.fi> Message-ID: Hello, Effectively without any limits it's working. Sincerely St?phane Brunner 2011/8/18 Rahkonen Jukka : > Hi, > > I agree that if Mapserver is doing the final filtering then passing maxFeatures="100" value for the query selecting the candidates is not right. ?But have you tested what happens if you run your WFS query without maxFeatures? It would be good to know if the result set is OK then. > > -Jukka Rahkonen- > > St?phane Brunner wrote: >> >> Hello Steve, >> >> Sorry for the delay. I as on holiday last couple of weeks but the >> issue is still a blocker for us. >> >> Your say ? PostGIS should be returning an appropriate set of candidate >> features ? but with our request PostGIS returns only the 100 first >> features (a subset of all features) without taking any geographical >> aspect into account. MapServer filters them correctly but as we get >> only the 100 first results from the DB, we miss many objects and/or >> they are not related to the area where we want to apply a geographical >> filter. We've done a test on how MapServer handles the 100 first >> results and it's working. >> >> We also tested the behavior with a SHP file and it works like a charm, >> there is no limitation. For our understanding, there is an issue in >> the way mapserver pass the query to PostGIS as there is an >> inappropriate LIMIT value in the SQL statement and mapserver doesn't >> seem to pass a BBOX in order to prefilter the set in the DB. >> >> Best regards >> St?phane Brunner >> >> >> 2011/7/30 Steve Lime : >> > The filter encoding code only translates certain things >> into native SQL, the rest is handled in a uniform way within >> MapServer. Hopefully this will change over time and more >> processing will be moved to the database but there hasn't >> been time to do that yet, maybe for 6.2. >> > >> > PostGIS should be returning an appropriate set of candidate >> features for MapServer to perform additional filtering. >> Shapefiles work the same way. If you look at the SQL executed >> by Postgres you should see all of the matching features plus >> a few more. >> > >> > Steve >> > >> > Sent from my iPad >> > >> > On Jul 28, 2011, at 9:18 AM, St?phane Brunner >> wrote: >> > >> >> Hello, >> >> >> >> I log the sql request on spatial filter and I have this: >> >> select >> "oid","nummer","gemeinde","gueltigkeit","flgrundb","quote","ei >> gentuemer","adresse_lang",encode(ST_AsBinary(ST_Force_2D("geom > "),'NDR'),'hex') >> >> as geom,"oid" from (SELECT oid, t1.geom, t1.nummer, t2.gemeinde, >> >> t1.gueltigkeit1_txt as gueltigkeit, t2.flgrundb, >> ((t2.zaehler::text || >> >> '/'::text) || t2.nenner::text) AS quote, t2.eigentuemer, >> >> (((t2.adresse::text || ', '::text) || t2.plz::text) || ' >> '::text) || >> >> t2.ort::text AS adresse_lang FROM >> av.liegenschaften_liegenschaft_area >> >> as t1, av.view_gemlis_geomaste_parzelle as t2 WHERE >> t1.gdid = t2.gdeid >> >> and t1.nummer = t2.parznr::text) AS foo where geom && >> >> GeomFromText('POLYGON((620000 218000,620000 278000,690000 >> >> 278000,690000 218000,620000 218000))',-1) limit 100 >> >> >> >> I didn't see any postggis filter than I try to do a >> spatial filter on >> >> one of the 100 first results >> >> Than I have a correct result ... >> >> >> >> Than why mapserver doesn't use postgis spatial filter ? >> Does I miss something ? >> >> >> >> Thank-you in advance >> >> St?phane Brunner >> >> >> >> >> >> >> >> 2011/7/26 St?phane Brunner : >> >>> Hello, >> >>> >> >>> I just test it with a shape file, and it's working... >> >>> I will investigate a little bit more to know why it's not >> working with postgres. >> >>> >> >>> Sincerely >> >>> St?phane Brunner >> >>> >> >>> >> >>> 2011/7/25 Steve Lime : >> >>>> Never mind on version, I saw 6.0.0 in the response... ;-) Steve >> >>>> >> >>>> On Mon, Jul 25, 2011 at 6:19 AM, St?phane Brunner >> >>>> wrote: >> >>>>> >> >>>>> Hello, >> >>>>> >> >>>>> I have the mapfile [0]. when I done a GetFeature on the >> nummer [1] I >> >>>>> have 4 results [2] (with duplicate but it's an other issue). >> >>>>> When I done a spatial filter [3] I have no results [4] >> but I should >> >>>>> have at least one result ... >> >>>>> >> >>>>> Thanks in advance for having a look on this issue. >> >>>>> >> >>>>> Sincerely yours >> >>>>> St?phane Brunner >> >>>>> >> >>>>> Following: specified, GetCapabilities [5], >> describefeaturetype [6]. >> >>>>> >> >>>>> mapfile [0]: >> >>>>> MAP >> >>>>> ? ?NAME "map" >> >>>>> >> >>>>> ? ?EXTENT 620000 218000 690000 278000 >> >>>>> >> >>>>> ? ?UNITS METERS >> >>>>> ? ?IMAGETYPE jpeg >> >>>>> ? ?RESOLUTION 72 >> >>>>> ? ?DEFRESOLUTION 72 >> >>>>> ? ?IMAGECOLOR 255 255 255 >> >>>>> ? ?STATUS ON >> >>>>> ? ?FONTSET "fonts.conf" >> >>>>> ? ?SYMBOLSET "symbole.sym" >> >>>>> ? ?MAXSIZE 5000 >> >>>>> >> >>>>> ? ?PROJECTION >> >>>>> ? ? ? ?"init=epsg:21781" >> >>>>> ? ?END >> >>>>> >> >>>>> ? ?#### >> >>>>> ? ?# Used by overlays >> >>>>> ? ?#### >> >>>>> ? ?OUTPUTFORMAT >> >>>>> ? ? ? ?NAME png256 >> >>>>> ? ? ? ?DRIVER AGG/PNG >> >>>>> ? ? ? ?MIMETYPE "image/png256" >> >>>>> ? ? ? ?IMAGEMODE RGBA >> >>>>> ? ? ? ?EXTENSION "png" >> >>>>> ? ? ? ?FORMATOPTION "INTERLACE=OFF" >> >>>>> ? ? ? ?FORMATOPTION "QUANTIZE_FORCE=ON" >> >>>>> ? ? ? ?FORMATOPTION "QUANTIZE_DITHER=OFF" >> >>>>> ? ? ? ?FORMATOPTION "QUANTIZE_COLORS=256" >> >>>>> ? ?END >> >>>>> ? ?OUTPUTFORMAT >> >>>>> ? ? ? ?NAME png >> >>>>> ? ? ? ?DRIVER AGG/PNG >> >>>>> ? ? ? ?MIMETYPE "image/png" >> >>>>> ? ? ? ?IMAGEMODE RGBA >> >>>>> ? ? ? ?EXTENSION "png" >> >>>>> ? ? ? ?FORMATOPTION "INTERLACE=OFF" >> >>>>> ? ? ? ?FORMATOPTION "QUANTIZE_DITHER=OFF" >> >>>>> ? ?END >> >>>>> >> >>>>> ? ?WEB >> >>>>> ? ? ? ?METADATA >> >>>>> ? ? ? ? ? ?"ows_title" "map" >> >>>>> ? ? ? ? ? ?"ows_srs" "epsg:21781" >> >>>>> ? ? ? ? ? ?"ows_encoding" "UTF-8" >> >>>>> ? ? ? ? ? ?"wms_feature_info_mime_type" >> "application/vnd.ogc.gml" >> >>>>> ? ? ? ? ? ?"wms_enable_request" "*" >> >>>>> ? ? ? ? ? ?"ows_enable_request" "*" >> >>>>> ? ? ? ? ? ?"gml_include_items" "all" >> >>>>> ? ? ? ? ? ?"gml_featureid" "id" >> >>>>> ? ? ? ? ? ?"wfs_title" "map" >> >>>>> ? ? ? ? ? ?"wfs_srs" "epsg:21781" >> >>>>> ? ? ? ?END >> >>>>> ? ? ? ?IMAGEPATH '/var/tmp/' >> >>>>> ? ?END >> >>>>> >> >>>>> ? ?LEGEND >> >>>>> ? ? ? ?IMAGECOLOR 240 240 240 >> >>>>> ? ? ? ?LABEL >> >>>>> ? ? ? ? ? ?FONT arial >> >>>>> ? ? ? ? ? ?ANTIALIAS true >> >>>>> ? ? ? ? ? ?TYPE truetype >> >>>>> ? ? ? ? ? ?SIZE 9 >> >>>>> ? ? ? ? ? ?COLOR 0 0 0 >> >>>>> ? ? ? ?END >> >>>>> ? ?END >> >>>>> >> >>>>> >> >>>>> LAYER >> >>>>> ?NAME "Liegenschaft_Query" >> >>>>> ?TYPE POLYGON >> >>>>> ?STATUS ON >> >>>>> ?TEMPLATE fooOnlyForWMSGetFeatureInfo >> >>>>> ?CONNECTIONTYPE postgis >> >>>>> ?PROCESSING "CLOSE_CONNECTION=DEFER" >> >>>>> ?CONNECTION "user=www-data password=www-data dbname=dev >> host=localhost" >> >>>>> ?DATA "geom from (SELECT oid, t1.geom, t1.nummer FROM >> >>>>> av.view_i_liegenschaft_all AS t1) AS foo using unique oid using >> >>>>> SRID=-1" >> >>>>> # ?GROUP "TOPIC_Liegenschaften_LN" >> >>>>> ?EXTENT 620000 218000 690000 278000 >> >>>>> ?METADATA >> >>>>> ? ?"ows_title" "Liegenschaft_Query" >> >>>>> ? ?"ows_srs" "epsg:21781" >> >>>>> ? ?"id_attribute_string" "oid" >> >>>>> ? ?"ows_featureid" "oid" >> >>>>> ? ?"ows_geometries" "geom" >> >>>>> ? ?"ows_geom_type" "polygon" >> >>>>> ? ?"query_returned_attributes" "nummer" >> >>>>> ? ?"gml_include_items" "oid,nummer,geom" >> >>>>> ? ?"gml_geometries" "geom" >> >>>>> ? ?"gml_geom_type" "polygon" >> >>>>> ? ?"gml_nummer_type" "Character" >> >>>>> ? ?#"gml_groups" "TOPIC_Liegenschaften_LN" >> >>>>> ? ?"gml_featureid" "oid" >> >>>>> ? ?"wfs_title" "Liegenschaft_Query" >> >>>>> ? ?"wfs_srs" "epsg:21781" >> >>>>> ?END >> >>>>> ?DUMP TRUE >> >>>>> ?PROJECTION >> >>>>> ? ? ?"init=epsg:21781" >> >>>>> ?END >> >>>>> >> >>>>> ?CLASS >> >>>>> ? ?NAME "Liegenschaft" >> >>>>> ? ?STYLE >> >>>>> ? ? ?SYMBOL "circle" >> >>>>> ? ? ?SIZE 3 >> >>>>> ? ? ?OUTLINECOLOR 0 0 0 >> >>>>> ? ?END >> >>>>> ?END >> >>>>> END >> >>>>> END >> >>>>> >> >>>>> query on the nummer [1]: >> >>>>> > service="WFS" >> >>>>> version="1.0.0" maxFeatures="100" >> >>>>> xsi:schemaLocation="http://www.opengis.net/wfs >> >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" >> >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >> >>>>> > >>>>> xmlns:feature="http://mapserver.gis.umn.edu/mapserver"> >> >>>>> >> >>>>> >> >>>>> nummer >> >>>>> 3634 >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> response on the nummer [2]: >> >>>>> >> >>>>> > >>>>> ? xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >> >>>>> ? xmlns:wfs="http://www.opengis.net/wfs" >> >>>>> ? xmlns:gml="http://www.opengis.net/gml" >> >>>>> ? xmlns:ogc="http://www.opengis.net/ogc" >> >>>>> ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> >>>>> ? xsi:schemaLocation="http://www.opengis.net/wfs >> >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd >> >>>>> ? ? ? ? ? ? ? ? ? ? ? http://mapserver.gis.umn.edu/mapserver >> >>>>> >> >>>>> >> http://c2cpc89.camptocamp.com/sbrunner/mapserv?SERVICE=WFS& > ;VERSION=1.0.0> &REQUEST=DescribeFeatureType&TYPENAME=feature:Liegensc >> haft_Query&OUTPUTFORMAT=XMLSCHEMA"> >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ? ? ? ?661054.808000,244611.321000 >> >>>>> 663053.704000,244888.622000 >> >>>>> ? ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ? ? ? ? >> >>>>> > 661054.808000,244854.251000 >> >>>>> 661088.687000,244888.622000 >> >>>>> ? ? ? ? ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ? >> >>>>> ? ? ? ? ? ? >> >>>>> ? ? ? ? ? ? ?661076.579000,244888.622000 >> >>>>> 661054.808000,244875.484000 661062.744000,244858.448000 >> >>>>> 661064.653000,244854.251000 661088.687000,244869.173000 >> >>>>> 661076.579000,244888.622000 >> >>>>> ? ? ? ? ? ? >> >>>>> ? ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ?2380997 >> >>>>> ? ? ? ?3634 >> >>>>> ? ? ? >> >>>>> ? ? >> >>>>> ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ? ? ? ? >> >>>>> > 661054.808000,244854.251000 >> >>>>> 661088.687000,244888.622000 >> >>>>> ? ? ? ? ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ? >> >>>>> ? ? ? ? ? ? >> >>>>> ? ? ? ? ? ? ?661076.579000,244888.622000 >> >>>>> 661054.808000,244875.484000 661062.744000,244858.448000 >> >>>>> 661064.653000,244854.251000 661088.687000,244869.173000 >> >>>>> 661076.579000,244888.622000 >> >>>>> ? ? ? ? ? ? >> >>>>> ? ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ?2380997 >> >>>>> ? ? ? ?3634 >> >>>>> ? ? ? >> >>>>> ? ? >> >>>>> ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ? ? ? ? >> >>>>> > 663017.565000,244611.321000 >> >>>>> 663053.704000,244650.084000 >> >>>>> ? ? ? ? ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ? >> >>>>> ? ? ? ? ? ? >> >>>>> ? ? ? ? ? ? ?663017.565000,244635.722000 >> >>>>> 663033.235000,244611.321000 663045.949000,244619.485000 >> >>>>> 663053.704000,244626.417000 663034.337000,244650.084000 >> >>>>> 663017.565000,244635.722000 >> >>>>> ? ? ? ? ? ? >> >>>>> ? ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ?2384539 >> >>>>> ? ? ? ?3634 >> >>>>> ? ? ? >> >>>>> ? ? >> >>>>> ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ? ? ? ? >> >>>>> > 663017.565000,244611.321000 >> >>>>> 663053.704000,244650.084000 >> >>>>> ? ? ? ? ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ? >> >>>>> ? ? ? ? ? ? >> >>>>> ? ? ? ? ? ? ?663017.565000,244635.722000 >> >>>>> 663033.235000,244611.321000 663045.949000,244619.485000 >> >>>>> 663053.704000,244626.417000 663034.337000,244650.084000 >> >>>>> 663017.565000,244635.722000 >> >>>>> ? ? ? ? ? ? >> >>>>> ? ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ?2384539 >> >>>>> ? ? ? ?3634 >> >>>>> ? ? ? >> >>>>> ? ? >> >>>>> >> >>>>> >> >>>>> >> >>>>> query with spatial filter [3]: >> >>>>> > service="WFS" >> >>>>> version="1.0.0" maxFeatures="100" >> >>>>> xsi:schemaLocation="http://www.opengis.net/wfs >> >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" >> >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >> >>>>> > >>>>> xmlns:feature="http://mapserver.gis.umn.edu/mapserver"> >> >>>>> >> >>>>> >> >>>>> geom >> >>>>> > srsName="EPSG:21781"> >> >>>>> 661070.024,244872.084 >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> response with spatial filter [4]: >> >>>>> >> >>>>> > >>>>> ? xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >> >>>>> ? xmlns:wfs="http://www.opengis.net/wfs" >> >>>>> ? xmlns:gml="http://www.opengis.net/gml" >> >>>>> ? xmlns:ogc="http://www.opengis.net/ogc" >> >>>>> ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> >>>>> ? xsi:schemaLocation="http://www.opengis.net/wfs >> >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd >> >>>>> ? ? ? ? ? ? ? ? ? ? ? http://mapserver.gis.umn.edu/mapserver >> >>>>> >> >>>>> >> http://c2cpc89.camptocamp.com/sbrunner/mapserv?SERVICE=WFS& > ;VERSION=1.0.0> &REQUEST=DescribeFeatureType&TYPENAME=feature:Liegensc >> haft_Query&OUTPUTFORMAT=XMLSCHEMA"> >> >>>>> ? >> >>>>> ? ? ?missing >> >>>>> ? >> >>>>> >> >>>>> >> >>>>> >> >>>>> GetCapabilities [5]: >> >>>>> >> >>>>> > >>>>> ? version="1.0.0" >> >>>>> ? updateSequence="0" >> >>>>> ? xmlns="http://www.opengis.net/wfs" >> >>>>> ? xmlns:ogc="http://www.opengis.net/ogc" >> >>>>> ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> >>>>> ? xsi:schemaLocation="http://www.opengis.net/wfs >> >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd"> >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> ?MapServer WFS >> >>>>> ?Amtliche Vermessung >> >>>>> ?Die amtliche Vermessung nach DM01 Darstellung als WMS >> >>>>> Dienst f?r MapFish Projekte >> >>>>> >> >>>>> >> http://c2cpc89.camptocamp.com/sbrunner/mapserv > ? >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> ? >> >>>>> ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ?> >>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" >> >>>>> /> >> >>>>> ? ? ? ? >> >>>>> ? ? ? >> >>>>> >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ?> >>>>> >> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" /> >> >>>>> ? ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? >> >>>>> ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ?> >>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" >> >>>>> /> >> >>>>> ? ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ?> >>>>> >> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" /> >> >>>>> >> >>>>> ? ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? >> >>>>> ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> >> >>>>> ? ? ? ? ?> >>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" >> >>>>> /> >> >>>>> ? ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? ? ?> >>>>> >> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" /> >> >>>>> ? ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? >> >>>>> >> >>>>> ? >> >>>>> >> >>>>> >> >>>>> >> >>>>> ? >> >>>>> ? ? >> >>>>> ? >> >>>>> ? ? >> >>>>> ? ? ? ?Liegenschaft_Query >> >>>>> ? ? ? ?Liegenschaft_Query >> >>>>> >> >>>>> ? ? ? ?epsg:21781 >> >>>>> ? ? ? ?> maxx="690000" >> >>>>> maxy="278000" /> >> >>>>> ? ? >> >>>>> ? ? >> >>>>> ? ? ? ?Liegenschaft_Query_ALL >> >>>>> ? ? ? ?Liegenschaft_Query_ALL >> >>>>> ? ? ? ?epsg:21781 >> >>>>> >> >>>>> ? ? ? ?> maxx="690000" >> >>>>> maxy="278000" /> >> >>>>> ? ? >> >>>>> >> >>>>> >> >>>>> >> >>>>> ? >> >>>>> ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? >> >>>>> ? >> >>>>> >> >>>>> ? >> >>>>> ? ? >> >>>>> ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? >> >>>>> ? >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> describefeaturetype [6]: >> >>>>> >> >>>>> > >>>>> ? targetNamespace="http://mapserver.gis.umn.edu/mapserver" >> >>>>> ? xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >> >>>>> ? xmlns:ogc="http://www.opengis.net/ogc" >> >>>>> ? xmlns:xsd="http://www.w3.org/2001/XMLSchema" >> >>>>> ? xmlns="http://www.w3.org/2001/XMLSchema" >> >>>>> ? xmlns:gml="http://www.opengis.net/gml" >> >>>>> ? elementFormDefault="qualified" version="0.1" > >> >>>>> >> >>>>> ?> >>>>> > schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd" >> >>>>> /> >> >>>>> >> >>>>> ?> >>>>> ? ? ? ? ? type="ms:Liegenschaft_QueryType" >> >>>>> ? ? ? ? ? substitutionGroup="gml:_Feature" /> >> >>>>> >> >>>>> ? >> >>>>> ? ? >> >>>>> ? ? ? >> >>>>> ? ? ? ? >> >>>>> >> >>>>> ? ? ? ? ?> >>>>> minOccurs="0" maxOccurs="1"/> >> >>>>> ? ? ? ? ? >> >>>>> ? ? ? ? ? >> >>>>> ? ? ? ? >> >>>>> ? ? ? >> >>>>> ? ? >> >>>>> ? >> >>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> -- >> >>>>> camptocamp.com >> >>>>> mapfish.org >> >>>>> _______________________________________________ >> >>>>> mapserver-users mailing list >> >>>>> mapserver-users at lists.osgeo.org >> >>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >>>> >> >>>> >> >>> >> >>> >> >>> >> >>> -- >> >>> camptocamp.com >> >>> mapfish.org >> >>> >> >> >> >> >> >> >> >> -- >> >> camptocamp.com >> >> mapfish.org >> > >> >> >> >> -- >> camptocamp.com >> mapfish.org >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> -- camptocamp.com mapfish.org From chris.green at ibstv.co.uk Mon Aug 22 06:15:32 2011 From: chris.green at ibstv.co.uk (Chris Green) Date: Mon, 22 Aug 2011 14:15:32 +0100 Subject: [mapserver-users] Map size question? In-Reply-To: References: <042901cc5d74$c545b090$4fd111b0$@green@ibstv.co.uk> <053501cc5dc8$de60f400$9b22dc00$@green@ibstv.co.uk> Message-ID: <025901cc60cd$92d61e90$b8825bb0$@green@ibstv.co.uk> Hi David That was very good advice. Thanks! Regards, Chris From: Fawcett, David (MPCA) [mailto:david.fawcett at state.mn.us] Sent: 18 August 2011 18:38 To: Chris Green; mapserver-users at lists.osgeo.org Subject: RE: [mapserver-users] Map size question? Chris, If you are in tile mode, I assume that you probably don't want an embedded legend on each tile. Have you thought about doing a separate call/request/object for the legend? If you were doing this via CGI, I would recommend doing a separate mode=legend request. David. From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Chris Green Sent: Thursday, August 18, 2011 12:04 PM To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] Map size question? After quite a while thinking I could not produce a legend I have realised that the legend is actually there, just off the edge of my map. Now I see that although my map file specifies a map size of 640 x 480 pixels, if in single tile mode the map image being produced is actually 1110 x 660 pixels. Alternatively with multiple tiles I get 12 tiles of 250 x 250 pixels which is 1024 x 768 pixels. It seems that the size parameter in the map file is being ignored (even setting the values to 0 0 or omitting the SIZE parameter altogether makes no difference). MAXSIZE doesn't seem to help either. I can't find a way to get the image size that I want, can anyone help? Chris From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Chris Green Sent: 18 August 2011 08:02 To: mapserver-users at lists.osgeo.org Subject: [mapserver-users] mapsript legend Hi all I have a map created via Mapscript under Mapserver 6.0 but I can't find a way to add a legend. Recent examples are hard to find but I found the following dating from 2002 which seemed simple enough: $legend = $map->legend; $legend->set(width,40); $legend->set(height,100); $legend->imagecolor->setRGB(240,220,200); # tan $legend->outlinecolor->setRGB(1,1,1); # black $legend->set(status, MS_EMBED); $legend->set(position, MS_UL); // SET LEGEND LABEL PROPERTIES $lg_label = $legend->label; $lg_label->set(font, "arial"); $lg_label->set(type, MS_TRUETYPE); $lg_label->set(size, 10); $lg_label->set(minsize, 6); $lg_label->set(maxsize, 12); $lg_label->color->setRGB(100,100,100); $legend->set(postlabelcache, MS_TRUE); // DRAW LEGEND $legendImage=$map->drawLegend(); Unfortunately this produces no output. Can anyone give me any clues why? Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From florita026 at gmail.com Mon Aug 22 06:23:06 2011 From: florita026 at gmail.com (florencia.bujan) Date: Mon, 22 Aug 2011 06:23:06 -0700 (PDT) Subject: [mapserver-users] Re: Raster Data from PostGIS In-Reply-To: <1313730858654-6701922.post@n2.nabble.com> References: <1291038416747-5784362.post@n2.nabble.com> <281132.69958.qm@web38201.mail.mud.yahoo.com> <1291045835952-5784801.post@n2.nabble.com> <1291047127999-5784894.post@n2.nabble.com> <1291048753486-5785003.post@n2.nabble.com> <1291208184785-5791735.post@n2.nabble.com> <1313730858654-6701922.post@n2.nabble.com> Message-ID: Buenos d?as Gustavo, Al final no pude encontrar como hacer esto, la ?nica herramienta que estuve probando fue el GDAL (te genera una capa de rasters variables). Termin? almacenando los rasters en un directorio (en lugar de la Geodatabase) y levantandolos desde ah?. Disculpame que no te pude contestar antes. Saludos y a las ?rdenes por cualquier otra consulta, Florencia de Uruguay. 2011/8/19 Gustavo1376 [via OSGeo.org] < ml-node+6701922-1641837362-295788 at n2.nabble.com> > Hi Florencia, i am Gustavo from Uruguay. > > Have you finally found the way to load a raster from a PostGis database? > > I'm trying to do that but no had no success yet. > > In my case the problem is that my application would generate a new raster > everyday, so if i save them to disk it quickly will get out of space. So my > option is to store the rasters in the database, with it's dedicated storage > and (i hope) special methods for optimizing it's storage capacity. I mean, i > think that a PostGis with 500GB storage capacity should be able to store > much more images than a flat file system with same capacity. > > Well, i'll be pleased if you could share your solution (if finally found > any). > > Regards, > Gustavo. > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://osgeo-org.1803224.n2.nabble.com/Raster-Data-from-PostGIS-tp5784362p6701922.html > To unsubscribe from Raster Data from PostGIS, click here. > > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Raster-Data-from-PostGIS-tp5784362p6711536.html Sent from the Mapserver - User mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gus.fava at gmail.com Mon Aug 22 09:11:04 2011 From: gus.fava at gmail.com (Gustavo1376) Date: Mon, 22 Aug 2011 09:11:04 -0700 (PDT) Subject: [mapserver-users] Re: Raster Data from PostGIS In-Reply-To: <84446DEF76453C439E9E97E438E13A6301D2C6@suutari.haapa.mmm.fi> References: <281132.69958.qm@web38201.mail.mud.yahoo.com> <1291045835952-5784801.post@n2.nabble.com> <1291047127999-5784894.post@n2.nabble.com> <1291048753486-5785003.post@n2.nabble.com> <1291208184785-5791735.post@n2.nabble.com> <1313730858654-6701922.post@n2.nabble.com> <1313771331749-6703961.post@n2.nabble.com> <84446DEF76453C439E9E97E438E13A6301D2C6@suutari.haapa.mmm.fi> Message-ID: <1314029464598-6712161.post@n2.nabble.com> Thanks Jukka, i'll consider this. In fact, it is issier for me to store the images in a directory. Is only that i thought that a kind of specialized engine such as a DataBase would be smarter in the way it stores things such as images. But that was only a hypothesis. Anyway, i'll investigate a bit more. If a found something interesting about this issue i'll post it. Regards, Gustavo. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Raster-Data-from-PostGIS-tp5784362p6712161.html Sent from the Mapserver - User mailing list archive at Nabble.com. From Steve.Toutant at inspq.qc.ca Mon Aug 22 10:47:20 2011 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Mon, 22 Aug 2011 13:47:20 -0400 Subject: [mapserver-users] Problem using FILTER when the value begins with i Message-ID: I have a strange behavior when using a FILTER where the values begin with 'i, I have to double my "i" to make it work! Example: This doesn't work FILTER "code= 'Inactive'" In the mapserver.log I can see that "i" disappear, I get in the query ... (code = 'nactive'), so no data are returns Using double "I" it works FILTER "code= 'IInactive'" It seems that using 'I' or "i" mean something...and that changes the encoding of the string or something. I'm using mapserver 6.0.1 on a windows 2008 64bits server. The data are in a postgis table. This mapfile was working well with mapserver 5.6 on windows 2003 32bits server. Anyone have seen this before? thanks for your help, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From Steve.Toutant at inspq.qc.ca Mon Aug 22 10:58:01 2011 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Mon, 22 Aug 2011 13:58:01 -0400 Subject: RE [mapserver-users] Problem using FILTER when the value begins with i In-Reply-To: Message-ID: UPDATE... escaping "i works FILTER "code= '\Inactive'" If someone can explain I would appreciate. thanks Steve Steve.Toutant at inspq.qc.ca@lists.osgeo.org Envoy? par : mapserver-users-bounces at lists.osgeo.org 2011-08-22 13:47 A mapserver-users at lists.osgeo.org cc Objet [mapserver-users] Problem using FILTER when the value begins with i I have a strange behavior when using a FILTER where the values begin with 'i, I have to double my "i" to make it work! Example: This doesn't work FILTER "code= 'Inactive'" In the mapserver.log I can see that "i" disappear, I get in the query ... (code = 'nactive'), so no data are returns Using double "I" it works FILTER "code= 'IInactive'" It seems that using 'I' or "i" mean something...and that changes the encoding of the string or something. I'm using mapserver 6.0.1 on a windows 2008 64bits server. The data are in a postgis table. This mapfile was working well with mapserver 5.6 on windows 2003 32bits server. Anyone have seen this before? thanks for your help, Steve _______________________________________________ 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 Mon Aug 22 11:11:33 2011 From: aboudreault at mapgears.com (Alan Boudreault) Date: Mon, 22 Aug 2011 14:11:33 -0400 Subject: RE [mapserver-users] Problem using FILTER when the value begins with i In-Reply-To: References: Message-ID: <201108221411.34044.aboudreault@mapgears.com> Steve, a " or ' followed by a i means a string insensitive. Howerver... it should only match the last '. Please, fill a bug and assign it to "aboudreault". Thanks, Alan On August 22, 2011 01:58:01 pm Steve.Toutant at inspq.qc.ca wrote: > UPDATE... > escaping "i works > FILTER "code= '\Inactive'" > > If someone can explain I would appreciate. > thanks > Steve > > > > > Steve.Toutant at inspq.qc.ca@lists.osgeo.org > Envoy? par : mapserver-users-bounces at lists.osgeo.org > 2011-08-22 13:47 > > A > mapserver-users at lists.osgeo.org > cc > > Objet > [mapserver-users] Problem using FILTER when the value begins with i > > > > > > > > > > I have a strange behavior when using a FILTER where the values begin with > 'i, I have to double my "i" to make it work! > Example: > This doesn't work > FILTER "code= 'Inactive'" > In the mapserver.log I can see that "i" disappear, I get in the query ... > (code = 'nactive'), so no data are returns > > Using double "I" it works > FILTER "code= 'IInactive'" > > It seems that using 'I' or "i" mean something...and that changes the > encoding of the string or something. > I'm using mapserver 6.0.1 on a windows 2008 64bits server. The data are in > a postgis table. > > This mapfile was working well with mapserver 5.6 on windows 2003 32bits > server. > > Anyone have seen this before? > thanks for your help, > Steve > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Alan Boudreault Mapgears http://www.mapgears.com From eresnick at tapestrysolutions.com Mon Aug 22 14:53:28 2011 From: eresnick at tapestrysolutions.com (Ed Resnick) Date: Mon, 22 Aug 2011 21:53:28 +0000 Subject: [mapserver-users] Problem displaying a NAD83 tile in WGS84 (or via WMS) Message-ID: <7BBCD831F60212448EB77D412A3D7544E255@TAPCAS033.tapestry.local> Thanks, that solved my problem - the map projects perfectly now. I feel foolish. ________________________________________ From: Smith, Michael ERDC-CRREL-NH [Michael.Smith at usace.army.mil] Sent: Saturday, August 20, 2011 2:25 AM To: Ed Resnick; mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Problem displaying a NAD83 tile in WGS84 (or via WMS) Ed, Your mrsid image is in UTM Zone 10, NAD 1983. You should set PROJECTION "init=epsg:26910" END For your layer (http://spatialreference.org/ref/epsg/26910/) -- Mike Michael Smith Remote Sensing/GIS Center US Army Corps of Engineers On 8/19/11 5:23 PM, "Ed Resnick" wrote: >Here's a WMS request, broken up for readability: > >------------------------------------------------------- >http://10.10.10.206/cgi-bin/mapserv.exe?map=E:/osm4326/mrsid.map > &service=WMS > &version=1.1.1 > &request=GetMap > &layers=default > &format=image/png > &width=256 > &height=256 > &srs=EPSG:4326 > &bbox=-122.875,45.25,-122.75,45.375 > &transparent=TRUE >------------------------------------------------------- > >Here's the gdalinfo dump: > >------------------------------------------------------- >Driver: MrSID/Multi-resolution Seamless Image Database (MrSID) >Files: wa.sid.sid > wa.sid.sdw > wa.sid.sid.aux.xml >Size is 1742, 1458 >Coordinate System is: >PROJCS["NAD_1983_UTM_Zone_10N", > GEOGCS["GCS_North_American_1983", > DATUM["North_American_Datum_1983", > SPHEROID["GRS_1980",6378137.0,298.257222101]], > PRIMEM["Greenwich",0.0], > UNIT["Degree",0.0174532925199433]], > PROJECTION["Transverse_Mercator"], > PARAMETER["false_easting",500000.0], > PARAMETER["false_northing",0.0], > PARAMETER["central_meridian",-123.0], > PARAMETER["scale_factor",0.9996], > PARAMETER["latitude_of_origin",0.0], > UNIT["Meter",1.0]] >Origin = (555230.000000000000000,5048039.000000000000000) >Pixel Size = (1.000009239300614,-1.000000000000000) >Metadata: > IMAGE__INPUT_NAME=C:\DOCUME~1\PAULW~2.ATT\LOCALS~1\Temp\img1AE.tmp > IMAGE__INPUT_FILE_SIZE=7619508.000000 > GEO__spref_horizsys_cordsysn_geogcsn=GCS_North_American_1983 > GEO__spref_horizsys_cordsysn_projcsn=NAD_1983_UTM_Zone_10N > GEO__spref_horizsys_planar_gridsys_gridsysn=Universal Transverse >Mercator > GEO__spref_horizsys_planar_gridsys_utm_utmzone=10 > GEO__spref_horizsys_planar_gridsys_utm_transmer_sfctrmer=0.999600 > GEO__spref_horizsys_planar_gridsys_utm_transmer_longcm=-123.000000 > GEO__spref_horizsys_planar_gridsys_utm_transmer_latprjo=0.000000 > GEO__spref_horizsys_planar_gridsys_utm_transmer_feast=500000.000000 > GEO__spref_horizsys_planar_gridsys_utm_transmer_fnorth=0.000000 > GEO__spref_horizsys_planar_planci_plance=row and column > GEO__spref_horizsys_planar_planci_plandu=meters > GEO__spref_horizsys_planar_planci_coordrep_absres=1.000009 > GEO__spref_horizsys_planar_planci_coordrep_ordres=1.000000 > GEO__spref_horizsys_geodetic_horizdn=North American Datum of 1983 > GEO__spref_horizsys_geodetic_ellips=Geodetic Reference System 80 > GEO__spref_horizsys_geodetic_semiaxis=6378137.000000 > GEO__spref_horizsys_geodetic_denflat=298.257222 > IMAGE__COMPRESSION_VERSION=1,6,3 > IMAGE__TARGET_COMPRESSION_RATIO=20.000000 > IMAGE__COMPRESSION_NLEV=6 > IMAGE__COMPRESSION_WEIGHT=4.000000 > IMAGE__COMPRESSION_GAMMA=2.000000 > IMAGE__COMPRESSION_BLOCK_SIZE=512 > IMAGE__CREATION_DATE=Wed Dec 02 14:18:16 2009 > > IMAGE__NO_DITHER=0 > VERSION=MG2 > IMAGE__WIDTH=1742 > IMAGE__HEIGHT=1458 > IMAGE__NO_DATA_VALUE=15,172,40 > IMAGE__TRANSPARENT_DATA_VALUE=0,0,176 > IMAGE__COLOR_SCHEME=0 > IMAGE__DATA_TYPE=0 > IMAGE__XY_ORIGIN=555230.500005,5048038.500000 > IMAGE__X_RESOLUTION=1.000009 > IMAGE__Y_RESOLUTION=1.000000 >Image Structure Metadata: > INTERLEAVE=PIXEL >Corner Coordinates: >Upper Left ( 555230.000, 5048039.000) (122d17'31.28"W, 45d35' 1.32"N) >Lower Left ( 555230.000, 5046581.000) (122d17'31.87"W, 45d34'14.07"N) >Upper Right ( 556972.016, 5048039.000) (122d16'10.90"W, 45d35' 0.81"N) >Lower Right ( 556972.016, 5046581.000) (122d16'11.51"W, 45d34'13.57"N) >Center ( 556101.008, 5047310.000) (122d16'51.39"W, 45d34'37.44"N) >Band 1 Block=1742x128 Type=Byte, ColorInterp=Red > Minimum=60.000, Maximum=222.000, Mean=119.606, StdDev=36.132 > Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 >Band 2 Block=1742x128 Type=Byte, ColorInterp=Green > Minimum=84.000, Maximum=220.000, Mean=133.956, StdDev=21.319 > Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 >Band 3 Block=1742x128 Type=Byte, ColorInterp=Blue > Minimum=95.000, Maximum=205.000, Mean=119.015, StdDev=12.620 > Overviews: 871x729, 436x365, 218x183, 109x92, 55x46, 28x23 >------------------------------------------------------- > >And finally here is the map file: > >------------------------------------------------------- >MAP >OUTPUTFORMAT > NAME agg > DRIVER AGG/PNG > IMAGEMODE RGB > FORMATOPTION "INTERLACE=false" > MIMETYPE "image/png" >END >NAME "MrSID" >IMAGETYPE agg >MAXSIZE 4000 >SIZE 800 800 >IMAGECOLOR "#B3C6D4" >WEB > METADATA > ows_enable_request "*" > labelcache_map_edge_buffer "-10" > wms_srs "EPSG:4326 EPSG:4269" > wms_title "MrSID" > wms_onlineresource >"http://10.10.10.206/cgi-bin/mapserv.exe?map=E:/osm4326/mrsid.map" > END >END >CONFIG "PROJ_LIB" "C:\ms4w\proj\nad" >CONFIG "MS_ERRORFILE" "E:\errors.txt" >DEBUG 5 >SHAPEPATH "E:/osm4326/MrSID/" >EXTENT -123.0 45.0 -122.0 46.0 >UNITS dd >PROJECTION >"init=epsg:4326" >END >LAYER > METADATA > wms_title "A" > wms_group_title "default" > wms_srs "EPSG:4269" > wms_extent "555230 5046581 556972 5048039" > END > TYPE RASTER > STATUS ON > GROUP "default" > NAME "A" > PROJECTION > "init=epsg:4269" > END > EXTENT 555230 5046581 556972 5048039 > DATA "wa.sid.sid" >END >END >------------------------------------------------------- > > >________________________________________ >From: Rahkonen Jukka [Jukka.Rahkonen at mmmtike.fi] >Sent: Thursday, August 18, 2011 9:51 PM >To: Ed Resnick; 'mapserver-users at lists.osgeo.org' >Subject: Re: [mapserver-users] Problem displaying a NAD83 tile in >WGS84 (or via WMS) > >Hi, > >Could you give a bit more information? Your use case is the most common >that exists and all instructions should be at >http://mapserver.org/ogc/wms_server.html >It would be good to see the gdalinfo report of your image and your >mapfile and the exact WMS request you were using including the WMS >version. At least these parts of mapfile are important > >MAP level: extent, projection and metadata (wms_srs and >wms_inable_request at least) >LAYER level projection. > >I can see some really odd LatLonBoundingBoxes in my own MS 6.0 WMS >service too. I will investigate them a bit further. If it is just that >the Mapserver is creating the GetCapabilities document wrong then the WMS >service should still be usable. > >-Jukka Rahkonen- > > > > >> -----Alkuper?inen viesti----- >> L?hett?j?: mapserver-users-bounces at lists.osgeo.org >> [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Ed Resnick >> L?hetetty: 19. elokuuta 2011 2:47 >> Vastaanottaja: mapserver-users at lists.osgeo.org >> Aihe: [mapserver-users] Problem displaying a NAD83 tile in >> WGS84 (or via WMS) >> >> I have a MrSID file in NAD83 projection (EPGS 4269) which I >> want to display via WMS in WGS84 projection (EPGS 4326). I >> cannot get this to work. >> >> I have tried setting the entire map-file's projection to >> 4269, with the extent specified in that projection (in >> meters), and shp2img shows the image, but attempting to view >> it via WMS (requesting the 4326 projection) does not work, >> and the GetCapabilities response file is completely wrong - >> the LatLonBoundingBox tags actually list the 4269 bounding >> box in meters. Excerpt: >> >> > maxx="556972" maxy="5.04804e+006" /> >> > minx="555230" miny="5.04658e+006" >> maxx="556972" maxy="5.04804e+006" /> >> >> The BoundingBox is correct; the LatLonBoundingBox obviously is not. >> >> I have also tried specifying 4326 as the map projection and >> 4269 as the layer projection, with the map's extent in >> lat/lon and the layer's extent as the above value (meters). >> Not only did this not work, but even shp2img just shows a >> blank image. If I change the map's extent to the value in >> meters (even though its projection is specified as 4326), >> then shp2img works, but the WMS feed still does not; the >> GetCapabilities still is wrong. >> >> Is MapServer simply buggy or is there a >> solution?_______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >_______________________________________________ >mapserver-users mailing list >mapserver-users at lists.osgeo.org >http://lists.osgeo.org/mailman/listinfo/mapserver-users From tapio.ristimaki at mil.fi Mon Aug 22 22:17:34 2011 From: tapio.ristimaki at mil.fi (teri) Date: Mon, 22 Aug 2011 22:17:34 -0700 (PDT) Subject: [mapserver-users] Extra "?" in WCS query Message-ID: <1314076654246-6714823.post@n2.nabble.com> Hi, I try to get data from mapserv WCS to Esri Arcmap. Esri only gives error message. I opened apache log and Esri makes query : /cgi-bin/mapserv.exe?map=c:\blaah\testi.map&?SERVICE=WCS .... In browser Esri query above gives error as well "Service parameter missing". By removing "?" from above "... testi.map&?SERVICE ..." query seems to work in browser. Question. Is this "?" problem of mapserv or Esri? Thanks! Tapio -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Extra-in-WCS-query-tp6714823p6714823.html Sent from the Mapserver - User mailing list archive at Nabble.com. From warmerdam at pobox.com Mon Aug 22 22:29:10 2011 From: warmerdam at pobox.com (Frank Warmerdam) Date: Mon, 22 Aug 2011 22:29:10 -0700 Subject: [mapserver-users] Extra "?" in WCS query In-Reply-To: <1314076654246-6714823.post@n2.nabble.com> References: <1314076654246-6714823.post@n2.nabble.com> Message-ID: <4E533AA6.40205@pobox.com> On 11-08-22 10:17 PM, teri wrote: > Hi, > > I try to get data from mapserv WCS to Esri Arcmap. Esri only gives error > message. > > I opened apache log and Esri makes query : > /cgi-bin/mapserv.exe?map=c:\blaah\testi.map&?SERVICE=WCS .... > > In browser Esri query above gives error as well "Service parameter missing". > By removing "?" from above "... testi.map&?SERVICE ..." query seems to work > in browser. > > Question. Is this "?" problem of mapserv or Esri? Tapio, I presume you are specifying ".../cgi-bin/mapserv.exe?map=c:\blaah\testi.map&" as the service URL when setting things up with ArcMap? I believe ArcMap uses GDAL's WCS driver underneath for WCS server access and the GDAL WCS driver service definition file should include the "?" in the service url. However, it is possible that ArcMap is adding an extra question mark to whatever you specify when it is defining the GDAL WCS ServiceURL. If so, the problem is with ArcMap, and you should file a ticket with them. In the meantime, you can wrap the WCS service so that the map does not need to be defined in the URL. On Linux I would normally accomplish this by putting a shell script in the cgi-bin directory that defines the MS_MAPFILE environment variable. I'm not so sure how to accomplish this on Windows, though you could likely add MS_MAPFILE's definition in your Apache configuration if it is unlikely to cause conflicts on any other service run from the same apache. 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 Jukka.Rahkonen at mmmtike.fi Tue Aug 23 02:55:56 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Tue, 23 Aug 2011 09:55:56 +0000 Subject: [mapserver-users] Extra "?" in WCS query In-Reply-To: <4E533AA6.40205@pobox.com> References: <1314076654246-6714823.post@n2.nabble.com> <4E533AA6.40205@pobox.com> Message-ID: <84446DEF76453C439E9E97E438E13A6301D627@suutari.haapa.mmm.fi> Frank Warmerdam wrote: > If so, the problem is with ArcMap, and you should file a > ticket with them. > > In the meantime, you can wrap the WCS service so that the map does not > need to be defined in the URL. On Linux I would normally accomplish > this by putting a shell script in the cgi-bin directory that > defines the > MS_MAPFILE environment variable. I'm not so sure how to > accomplish this > on Windows, though you could likely add MS_MAPFILE's > definition in your > Apache configuration if it is unlikely to cause conflicts on any other > service run from the same apache. Hi I do not know if this is elegant but it works on Windows 1. Copy the mapserv.exe file in the cgi-bin directory and name a copy to whatever you want to use in the ServiceURL, for example testi_wcs1 2. Edit Apache httpd.conf file and add a new line SetEnvIf Request_URI "/cgi-bin/testi_wcs1" MS_MAPFILE=d:/ms4w/maps/testi_wcs1.map 3. Restart Apache Now if the service url is pointing to /cgi-bin/testi_wcs1? MS_MAPFILE is set to d:/ms4w/maps/testi_wcs1.map automatically. Make more copies of mapserv.exe and add new lines into httpd.conf when you will have a need short urls for testi_wcs2 and others. -Jukka Rahkonen- From jmckenna at gatewaygeomatics.com Tue Aug 23 04:36:58 2011 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 23 Aug 2011 08:36:58 -0300 Subject: [mapserver-users] Extra "?" in WCS query In-Reply-To: <84446DEF76453C439E9E97E438E13A6301D627@suutari.haapa.mmm.fi> References: <1314076654246-6714823.post@n2.nabble.com> <4E533AA6.40205@pobox.com> <84446DEF76453C439E9E97E438E13A6301D627@suutari.haapa.mmm.fi> Message-ID: <4E5390DA.8000008@gatewaygeomatics.com> The wrappers that Frank and Jukka refer to are documented for unix and windows/apache and windows/iis at: http://www.mapserver.org/ogc/wms_server.html#more-about-the-online-resource-url I use that section myself to remove the map parameter all the time :) -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 11-08-23 6:55 AM, Rahkonen Jukka wrote: > > Frank Warmerdam wrote: > >> If so, the problem is with ArcMap, and you should file a >> ticket with them. >> >> In the meantime, you can wrap the WCS service so that the map does not >> need to be defined in the URL. On Linux I would normally accomplish >> this by putting a shell script in the cgi-bin directory that >> defines the >> MS_MAPFILE environment variable. I'm not so sure how to >> accomplish this >> on Windows, though you could likely add MS_MAPFILE's >> definition in your >> Apache configuration if it is unlikely to cause conflicts on any other >> service run from the same apache. > > Hi > > I do not know if this is elegant but it works on Windows > > 1. Copy the mapserv.exe file in the cgi-bin directory and name a copy to whatever you want to use in the ServiceURL, for example testi_wcs1 > 2. Edit Apache httpd.conf file and add a new line > SetEnvIf Request_URI "/cgi-bin/testi_wcs1" MS_MAPFILE=d:/ms4w/maps/testi_wcs1.map > 3. Restart Apache > > Now if the service url is pointing to /cgi-bin/testi_wcs1? MS_MAPFILE is set to d:/ms4w/maps/testi_wcs1.map automatically. Make more copies of mapserv.exe and add new lines into httpd.conf when you will have a need short urls for testi_wcs2 and others. From jmckenna at gatewaygeomatics.com Tue Aug 23 04:41:48 2011 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 23 Aug 2011 08:41:48 -0300 Subject: [mapserver-users] Re: MapServer assistance - help documents In-Reply-To: References: Message-ID: <4E5391FC.1060401@gatewaygeomatics.com> Hello Lawrie, You can find the latest version of all of the MapServer documents on its official website: the Vector Data Access Guide lives at http://www.mapserver.org/input/vector/index.html for example. Hope that helps. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 11-08-23 1:40 AM, Lawrie.Hill at smrep.com.au wrote: > > Hi Jeff > > I am using MapServer v4.10 and would like to get my hands on the > referenced document "Vector Data Access Guide". I have been looking > everywhere I can on the www and it seems it is not available. > > Do you have a source for this document. > > thanks again From josego at simgia.com Tue Aug 23 13:34:23 2011 From: josego at simgia.com (josego) Date: Tue, 23 Aug 2011 16:34:23 -0400 Subject: [mapserver-users] consulta sobre wfs openlayer y mapserver Message-ID: <4E540ECF.6010805@simgia.com> Hola a todos. Estoy usando el mapserver donde se conecta con mi base de datos postgres usando postgis. Eso funciona bien. Uso openlayer con una capa WFS y luego coloco es capa al mapa. Me genera correctamente el archivo gml que probe guardando ese documento y usando una capa gml (OpenLayers.Layer.GML) para verificar su hizo correctamente. Ahi me di cuenta que hace bien . El inconveninete que tengo es que al usar el layer WFS no me despliega los datos, pero me genero bien el gml. Que puede estar pasando?. que me faltar?a realizar?? Les dejo el layer WFS que utilizo, su estilo marcarCalleUnica = new OpenLayers.Layer.WFS("Calles", "http://192.168.1.114/cgi-bin/mapserv?map=/var/www/MapServer/fuentes/mapaAsuncion2_1.map", { typename: 'calle_unica', //isBaseLayer: 'true', isBaseLayer: 'false', extractAttributes: 'true', //maxfeatures: 200, filter: "calleSICILIA", version: "1.0.0" }); marcarCalleUnica.style = OpenLayers.Util.applyDefaults({ strokeColor: "#ff0000"}, OpenLayers.Feature.Vector.style["default"] ); mapa.addLayers([layer_calles_asuncion,marcarCalleUnica,marcarCalleUnicaGML]); Busco mucho por todos lados y no consigo encontrar el problema. No se si existe otra manera de realizar esto. muchas gracias por todo saludos, jose -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaja0506 at gmail.com Tue Aug 23 16:41:17 2011 From: jaja0506 at gmail.com (jjwang) Date: Tue, 23 Aug 2011 16:41:17 -0700 (PDT) Subject: [mapserver-users] Re: Question about projection In-Reply-To: <1314080964312-6714933.post@n2.nabble.com> References: <1314080964312-6714933.post@n2.nabble.com> Message-ID: <1314142877286-6718306.post@n2.nabble.com> Now, I know that the map is in a MERCATOR ELLIPSOIDAL projection. But I still don't know how to define the projection. Please help me. Thanks. JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Question-about-projection-tp6714933p6718306.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jaja0506 at gmail.com Tue Aug 23 17:56:55 2011 From: jaja0506 at gmail.com (jjwang) Date: Tue, 23 Aug 2011 17:56:55 -0700 (PDT) Subject: [mapserver-users] Re: Question about projection In-Reply-To: <1314142877286-6718306.post@n2.nabble.com> References: <1314080964312-6714933.post@n2.nabble.com> <1314142877286-6718306.post@n2.nabble.com> Message-ID: <1314147415099-6718456.post@n2.nabble.com> OK, a simple question. The data I have is in WGS84. What I need is a map in Mercator projeciton. So what should I do? Define the projection under the 'MAP' or under the 'Layer'? Someone answer me please. JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Question-about-projection-tp6714933p6718456.html Sent from the Mapserver - User mailing list archive at Nabble.com. From jaja0506 at gmail.com Tue Aug 23 19:33:29 2011 From: jaja0506 at gmail.com (jjwang) Date: Tue, 23 Aug 2011 19:33:29 -0700 (PDT) Subject: [mapserver-users] Re: Question about projection In-Reply-To: <1314080964312-6714933.post@n2.nabble.com> References: <1314080964312-6714933.post@n2.nabble.com> Message-ID: <1314153209759-6718657.post@n2.nabble.com> I found out the key here might be the value E. I think it's Eccentricity of the ellipsoid (+e in proj4). So I want to know what's the default value of E. Is it 0? (as a circle) Any ideas on this? Thanks. JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Question-about-projection-tp6714933p6718657.html Sent from the Mapserver - User mailing list archive at Nabble.com. From woodbri at swoodbridge.com Tue Aug 23 21:04:49 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 24 Aug 2011 00:04:49 -0400 Subject: [mapserver-users] Re: Question about projection In-Reply-To: <1314147415099-6718456.post@n2.nabble.com> References: <1314080964312-6714933.post@n2.nabble.com> <1314142877286-6718306.post@n2.nabble.com> <1314147415099-6718456.post@n2.nabble.com> Message-ID: <4E547861.4080004@swoodbridge.com> On 8/23/2011 8:56 PM, jjwang wrote: > OK, a simple question. > The data I have is in WGS84. What I need is a map in Mercator projeciton. > So what should I do? > Define the projection under the 'MAP' or under the 'Layer'? > Someone answer me please. JJ, You need both. the projection block under the MAP is what you want the output projection to be, like: PROJECTION "init=epsg:900913" END UNITS meters EXTENTS -20037508.3427892480 -20037508.3427892480 20037508.3427892480 20037508.3427892480 And then in your LAYER block you need to define the projection of the data that is in the source for that layer. In your case WGS84, so: LAYER ... PROJECTION "init=epsg:4326" END ... END And if your do not already have 900913 added to your proj4 epsg file then you need to add the following to that file with a command like: echo "<900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +over +nadgrids=@null +no_defs <>" >> /usr/share/proj/epsg This would set you up for the Google Spherical Mercator project. If you want another projection the look through the epsg file and you might find it already defined there. -Steve W From jaja0506 at gmail.com Tue Aug 23 21:54:14 2011 From: jaja0506 at gmail.com (jjwang) Date: Tue, 23 Aug 2011 21:54:14 -0700 (PDT) Subject: [mapserver-users] Re: Question about projection In-Reply-To: <4E547861.4080004@swoodbridge.com> References: <1314080964312-6714933.post@n2.nabble.com> <1314142877286-6718306.post@n2.nabble.com> <1314147415099-6718456.post@n2.nabble.com> <4E547861.4080004@swoodbridge.com> Message-ID: <1314161654558-6718867.post@n2.nabble.com> Thank you Steve, But it seems no difference with the map in other projections. It still cannot match the base layer map (see my first posted question). Actually I need to get this map through WMS server (Openlayer) I found something I'm not sure. WEB TEMPLATE global.html IMAGEPATH "/ms4w/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" METADATA "wms_title" "My Global Map WMS Server" *"wms_srs" "EPSG:4326"* "ows_enable_request" "*" END END "wms_srs" "EPSG:4326" - about this statement: What's this used for? Does this define the projection of the map I will get through WMS? JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Question-about-projection-tp6714933p6718867.html Sent from the Mapserver - User mailing list archive at Nabble.com. From tapio.ristimaki at mil.fi Tue Aug 23 22:51:51 2011 From: tapio.ristimaki at mil.fi (teri) Date: Tue, 23 Aug 2011 22:51:51 -0700 (PDT) Subject: [mapserver-users] Re: Extra "?" in WCS query In-Reply-To: <4E5390DA.8000008@gatewaygeomatics.com> References: <1314076654246-6714823.post@n2.nabble.com> <4E533AA6.40205@pobox.com> <84446DEF76453C439E9E97E438E13A6301D627@suutari.haapa.mmm.fi> <4E5390DA.8000008@gatewaygeomatics.com> Message-ID: <1314165111846-6718959.post@n2.nabble.com> Thanks guys! Your answers resolved the problem! Tapio -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Extra-in-WCS-query-tp6714823p6718959.html Sent from the Mapserver - User mailing list archive at Nabble.com. From Jukka.Rahkonen at mmmtike.fi Tue Aug 23 23:00:46 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Wed, 24 Aug 2011 06:00:46 +0000 Subject: [mapserver-users] Re: Question about projection In-Reply-To: <1314161654558-6718867.post@n2.nabble.com> References: <1314080964312-6714933.post@n2.nabble.com> <1314142877286-6718306.post@n2.nabble.com> <1314147415099-6718456.post@n2.nabble.com> <4E547861.4080004@swoodbridge.com> <1314161654558-6718867.post@n2.nabble.com> Message-ID: <84446DEF76453C439E9E97E438E13A6301D8D2@suutari.haapa.mmm.fi> Hi, wms_srs is a list (white space separated) about the projections which will be supported as WMS output. You will need to add the web Mercator on your list if it is what you want to read with Openlayers. This parameter is well documented in http://mapserver.org/ogc/wms_server.html#setting-up-a-wms-server-using-mapserver I would recommend to test WMS services first with anything else than Openlayers. First with shp2img or with a web browser with hand written WMS requests, next perhaps with a GIS WMS client (QGis, OpenJUMP etc) for avoiding problems arising from the Openlayers code and not having anything to do with WMS server. -Jukka Rahkonen- jjwang wrote: > > Thank you Steve, > But it seems no difference with the map in other projections. > It still cannot match the base layer map (see my first posted > question). > Actually I need to get this map through WMS server (Openlayer) > I found something I'm not sure. > WEB > TEMPLATE global.html > IMAGEPATH "/ms4w/tmp/ms_tmp/" > IMAGEURL "/ms_tmp/" > > METADATA > "wms_title" "My Global Map WMS Server" > *"wms_srs" "EPSG:4326"* > "ows_enable_request" "*" > END > END > > "wms_srs" "EPSG:4326" - about this statement: > What's this used for? > Does this define the projection of the map I will get through WMS? > > JJ > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Question-about-projecti > on-tp6714933p6718867.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 jaja0506 at gmail.com Tue Aug 23 23:17:40 2011 From: jaja0506 at gmail.com (jjwang) Date: Tue, 23 Aug 2011 23:17:40 -0700 (PDT) Subject: [mapserver-users] Re: Question about projection In-Reply-To: <84446DEF76453C439E9E97E438E13A6301D8D2@suutari.haapa.mmm.fi> References: <1314080964312-6714933.post@n2.nabble.com> <1314142877286-6718306.post@n2.nabble.com> <1314147415099-6718456.post@n2.nabble.com> <4E547861.4080004@swoodbridge.com> <1314161654558-6718867.post@n2.nabble.com> <84446DEF76453C439E9E97E438E13A6301D8D2@suutari.haapa.mmm.fi> Message-ID: <1314166660707-6719004.post@n2.nabble.com> Thanks for your reply, Jukka. The WMS works fine. I can get the map through WMS. The problem is I need to project the map so that it can match an existing map which I don't know what exactly the projection systems it's using. I tries many projection systems. The result seems are all the same. My map is a little bit higher than the base layer one. So I'm assuming that the projection doesn't work at all. JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Question-about-projection-tp6714933p6719004.html Sent from the Mapserver - User mailing list archive at Nabble.com. From bteluk at gmail.com Tue Aug 23 23:53:33 2011 From: bteluk at gmail.com (bteluk at gmail.com) Date: Tue, 23 Aug 2011 23:53:33 -0700 (PDT) Subject: [mapserver-users] WFS restricting returned attributes Message-ID: <1314168813643-6719063.post@n2.nabble.com> Hi, I'm a user of a service provider that uses MapServer V5.4.2. I'm using their WFS Service. I'm trying to restrict the set of attributes that are returned by using a POST'ed Query in my request. But it doesn't seem to work. The service provider is using V5.4.2. I've tried equivalent queries on my own server (a V5.6.0) which works fine. Would this a problem/limitation of the service providers server?(eg. version problem or config setting) Or am I missing stuff in the namespaces/schema declarations? Or is it perhaps the query I'm using? My POST query looks like this: NB. am setting the content type to "text/xml", Also tried a GET request with the filter: Response extract: Thanks in advance! Regards, Bill Teluk ----- Regards, Bill Teluk -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-restricting-returned-attributes-tp6719063p6719063.html Sent from the Mapserver - User mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Wed Aug 24 00:38:53 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Wed, 24 Aug 2011 07:38:53 +0000 Subject: [mapserver-users] WFS restricting returned attributes In-Reply-To: <1314168813643-6719063.post@n2.nabble.com> References: <1314168813643-6719063.post@n2.nabble.com> Message-ID: <84446DEF76453C439E9E97E438E13A6301D9F5@suutari.haapa.mmm.fi> Hi, You can try if service takes list of propertynames with GET like http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.0.0&request=GetFeature&typename=lv:mml_railway&BBOX=246700,6780800,436400,6924000&propertyname=sahko,the_geom&maxfeatures=1 When it comes to filters, I am not sure how strict Mapserver is but I would first have a try by correcting the errors (Filter instead of filter, Within and not within) and using it as URL-encoded in the URL. TinyOWS accepts GET filters when used like this. http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.1.0&request=getfeature&typename=tows:osm_point&maxfeatures=10&filter=%3CFilter%20%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Etows:amenity%3C/PropertyName%3E%3CLiteral%3Ewaste_basket%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E -Jukka Rahkonen- bteluk wrote: Hi, I'm a user of a service provider that uses MapServer V5.4.2. I'm using their WFS Service. I'm trying to restrict the set of attributes that are returned by using a POST'ed Query in my request. But it doesn't seem to work. The service provider is using V5.4.2. I've tried equivalent queries on my own server (a V5.6.0) which works fine. Would this a problem/limitation of the service providers server?(eg. version problem or config setting) Or am I missing stuff in the namespaces/schema declarations? Or is it perhaps the query I'm using? My POST query looks like this: msGeometry datetime id_num id_name NB. am setting the content type to "text/xml", Also tried a GET request with the filter: wget -O dbtemp.gml "http://someserviceprovider.com/cgi-bin/mapserv?SERVICE=WFS& VERSION=1.1.0&REQUEST=GetFeature&TypeName=IDY03103_dryblb&FILTER=( msGeometry 138 -29155 -43 )" Response extract: msWFSGetFeature(): WFS server error. Invalid or Unsupported FILTER in GetFeature : (<filter><within><PropertyName.............to the end of the filter string! Thanks in advance! Regards, Bill Teluk Regards, Bill Teluk ________________________________ View this message in context: WFS restricting returned attributes Sent from the Mapserver - User mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Wed Aug 24 01:31:44 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Wed, 24 Aug 2011 08:31:44 +0000 Subject: [mapserver-users] Problem GetFeature with geom filter on WFS In-Reply-To: <84446DEF76453C439E9E97E438E13A6301DA42@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301A120@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301DA42@suutari.haapa.mmm.fi> Message-ID: <84446DEF76453C439E9E97E438E13A6301DA62@suutari.haapa.mmm.fi> Hi, I am not too familiar with PostGIS, but isn't this && exactly an index based BBOX query which is checking if the BBOX of the feature is intersecting with the BBOX of the reference geometry? where geom && > >> GeomFromText('POLYGON((620000 218000,620000 278000,690000 > >> 278000,690000 218000,620000 218000))',-1) Then perhaps what you wrote "MapServer filters them correctly but as we get > only the 100 first results from the DB, we miss many objects and/or > they are not related to the area where we want to apply a geographical > filter. " could better be written "as we get only the 100 first results within the BBOX filtered with fast but inaccurate index search, the result set after Mapserver applying a geographical filter may have less that 100 features". -Jukka Rahkonen- -------------- next part -------------- An HTML attachment was scrubbed... URL: From michal.sredl at gmail.com Wed Aug 24 05:58:22 2011 From: michal.sredl at gmail.com (=?ISO-8859-2?B?TWljaGFsIKly6WRs?=) Date: Wed, 24 Aug 2011 14:58:22 +0200 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. Message-ID: Hi all, I am trying to use FES filter for WFS layer and get no result, even thought I should get one. In my browser, I request http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=ZVER2 and get missing even though I do know, that features with ZVER=2 do exist. In the mapserver log file, I get [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned no results. No matching record(s) found. [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time (msLoadMap not incl.): 0.002s [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. I have checked http://mapserver.org/errors.html#id2 with similar error "msQueryByPoint: search returned no results" and tried to create a simple template: [lrn] [ZVER] but with no effect. In the mapfile, there is LAYER NAME "typ" METADATA "wfs_title" "Typologie" ## REQUIRED "gml_featureid" "CISLO" ## REQUIRED "gml_include_items" "all" ## Optional (serves all attributes for layer) "gml_types" "auto" "gml_geometries" "msGeometry" "gml_msGeometry_type" "polygon" END DATA typ.shp TYPE POLYGON STATUS ON PROJECTION "init=epsg:102067" END DUMP TRUE ## REQUIRED CLASS NAME "Typ" STYLE COLOR 0 0 155 OUTLINECOLOR 120 120 120 END TEMPLATE "templates/typ_zver.html" END DEBUG 5 END # Layer What is wrong with my FES filter? How can I make it to run? Thanks a lot, Michal From mail at marco-scheuble.de Wed Aug 24 06:28:29 2011 From: mail at marco-scheuble.de (Marco Scheuble) Date: Wed, 24 Aug 2011 06:28:29 -0700 (PDT) Subject: [mapserver-users] wms time from nonreferenced pngs Message-ID: <1314192509923-6720156.post@n2.nabble.com> Hi all, I've got some PNG's (radar data), that I want to share over a WMS. The Problem is, that the images aren't georeferenced. The only thing I know is the boundingbox and the srs: 4326. My Goal is to display the Data over WMS Time in Openlayers, in EPSG:900913 (spherical mercator). Is there a way to do this with UMN Mapserver? Or do I first have to use gdalwarp/gdaltranslate to resample the images, before I can use Mapserver. Thanks in advance, Marco -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/wms-time-from-nonreferenced-pngs-tp6720156p6720156.html Sent from the Mapserver - User mailing list archive at Nabble.com. From punk.kish at gmail.com Wed Aug 24 09:14:25 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Wed, 24 Aug 2011 11:14:25 -0500 Subject: [mapserver-users] creating a dynamic thematic map based on attribs in a Pg table Message-ID: <7C33CCB3-F536-4636-9946-B09F0B3E129D@gmail.com> I need a tute (or a pointer to one online) on how to color polys in a thematic map based on values retrieved from a separate table. I have table a ------- gid attrib_id the_geom table b ------- attrib_id attrib_name color_rgb (values such as "242 242 33" and "255 255 0") I would like to have MS color the polys and name the layers, ideally without having to create the CLASS definitions for each of the 80+ attribs, something akin to LAYER NAME "my layer" STATUS ON TYPE POLYGON CONNECTIONTYPE POSTGIS .. DATA "the_geom FROM (SELECT gid, the_geom, attrib_name, color_rgb FROM a JOIN b ON a.attrib_id = b.attrib_id) view USING UNIQUE gid" CLASS NAME [attrib_name] STYLE COLOR [color_rgb] OUTLINECOLOR 0 0 0 END END END How do I accomplish something like above? From punk.kish at gmail.com Wed Aug 24 11:42:24 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Wed, 24 Aug 2011 13:42:24 -0500 Subject: [mapserver-users] Re: creating a dynamic thematic map based on attribs in a Pg table In-Reply-To: <7C33CCB3-F536-4636-9946-B09F0B3E129D@gmail.com> References: <7C33CCB3-F536-4636-9946-B09F0B3E129D@gmail.com> Message-ID: <4704467D-18E6-4C70-A566-3551897B062F@gmail.com> Please see the end of the email for a variation on this problem -- On Aug 24, 2011, at 11:14 AM, Mr. Puneet Kishor wrote: > I need a tute (or a pointer to one online) on how to color polys in a thematic map based on values retrieved from a separate table. I have > > table a > ------- > gid > attrib_id > the_geom > > table b > ------- > attrib_id > attrib_name > color_rgb (values such as "242 242 33" and "255 255 0") > > I would like to have MS color the polys and name the layers, ideally without having to create the CLASS definitions for each of the 80+ attribs, something akin to > > LAYER > NAME "my layer" > STATUS ON > TYPE POLYGON > CONNECTIONTYPE POSTGIS > .. > DATA "the_geom FROM (SELECT gid, the_geom, attrib_name, color_rgb FROM a JOIN b ON a.attrib_id = b.attrib_id) view USING UNIQUE gid" > > CLASS > NAME [attrib_name] > STYLE > COLOR [color_rgb] > OUTLINECOLOR 0 0 0 > END > END > END > > How do I accomplish something like above? Instead of getting the attrib name and color from the database, I want to get them from a remote web service. Could something like this be accomplished via SLDs? That is, MapServer requests an SLD from a remote server that tells it how to color each of the classes in the layer. Many tia. -- Puneet Kishor From Jukka.Rahkonen at mmmtike.fi Wed Aug 24 12:48:47 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Wed, 24 Aug 2011 19:48:47 +0000 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A6301DC14@suutari.haapa.mmm.fi> Hi, Just in case, try to add wfs_include_items "all" into layer metadata. I am remembering that ows_include_items perhaps did not work for me some time ago. I verified that your request works against my Mapserver 6.0. Don't look too closely the "amenity"=>"toilets" part, the data in the database is really literally "amenity"=>"toilets". Unfortunately my layer comes from PostGIS and not from shapefile as in your case. http://188.64.1.61/cgi-bin/ms_ows?REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=osm_pisteet&FILTER=tags"amenity"=>"toilets" -Jukka Rahkonen- Michal ?r?dl wrote: > Hi all, > I am trying to use FES filter for WFS layer and get no result, even thought I should get one. > In my browser, I request > http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=ZVER2 > and get > missing even though I do know, that features with ZVER=2 do exist. In the mapserver log file, I get [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned no results. No matching record(s) found. [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time (msLoadMap not incl.): 0.002s [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. I have checked http://mapserver.org/errors.html#id2 with similar error "msQueryByPoint: search returned no results" and tried to create a simple template: [lrn] [ZVER] but with no effect. In the mapfile, there is LAYER NAME "typ" METADATA "wfs_title" "Typologie" ## REQUIRED "gml_featureid" "CISLO" ## REQUIRED "gml_include_items" "all" ## Optional (serves all attributes for layer) "gml_types" "auto" "gml_geometries" "msGeometry" "gml_msGeometry_type" "polygon" END DATA typ.shp TYPE POLYGON STATUS ON PROJECTION "init=epsg:102067" END DUMP TRUE ## REQUIRED CLASS NAME "Typ" STYLE COLOR 0 0 155 OUTLINECOLOR 120 120 120 END TEMPLATE "templates/typ_zver.html" END DEBUG 5 END # Layer What is wrong with my FES filter? How can I make it to run? Thanks a lot, Michal _______________________________________________ mapserver-users mailing list mapserver-users at lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users From jaja0506 at gmail.com Wed Aug 24 16:23:54 2011 From: jaja0506 at gmail.com (jjwang) Date: Wed, 24 Aug 2011 16:23:54 -0700 (PDT) Subject: [mapserver-users] Map projection not right in Openlayers Message-ID: <1314228234142-6722667.post@n2.nabble.com> After I set the projection of the map as epsg:900913, on client-side, Openlayers still tells me that the projection of this layer is "EPSG:4326". map file: MAP PROJECTION "init=epsg:900913" END ........ ........ WEB TEMPLATE global.html IMAGEPATH "/ms4w/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" METADATA "wms_title" "My Global Map WMS Server" "wms_srs" "EPSG:900913" "ows_enable_request" "*" END END LAYER PROJECTION "init=epsg:4326" END ...... ...... END ...... ...... END Js code: var propertydata_layer = new OpenLayers.Layer.WMS( 'Property Data', 'http://localhost:9999/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/global.map&', {layers: 'nsw', transparent:true}, {opacity: .5} ); this.map.addLayers([propertydata_layer]); Result: map.layers[5] div: HTMLDivElement events: Class grid: Array[3] id: "OpenLayers.Layer.WMS_77" inRange: true isBaseLayer: false map: Class maxExtent: Class maxResolution: 0.1 maxScale: 480.6248291015625 minResolution: 0.00000152587890625 minScale: 31498228.8 name: "Property Data" numLoadingTiles: 0 numZoomLevels: 17 opacity: 0.5 options: Object origin: Class params: Object projection: "EPSG:4326" resolutions: Array[17] scales: Array[17] tileSize: Class units: "degrees" url: "http://localhost:9999/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/global.map&" __proto__: Object Is this a Mapserver issue or Openlayers? JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Map-projection-not-right-in-Openlayers-tp6722667p6722667.html Sent from the Mapserver - User mailing list archive at Nabble.com. From sdlime at gmail.com Wed Aug 24 17:02:43 2011 From: sdlime at gmail.com (Steve Lime) Date: Wed, 24 Aug 2011 19:02:43 -0500 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: References: Message-ID: What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve Sent from my iPad On Aug 24, 2011, at 7:58 AM, Michal ?r?dl wrote: > Hi all, > > I am trying to use FES filter for WFS layer and get no result, even > thought I should get one. > > In my browser, I request > > http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER= xmlns:ogc="http://www.opengis.net/ogc">ZVER2 > > and get > > xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > xmlns:gml="http://www.opengis.net/gml" > xmlns:wfs="http://www.opengis.net/wfs" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver > http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 > http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> > > missing > > > > even though I do know, that features with ZVER=2 do exist. > > In the mapserver log file, I get > > [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned > no results. No matching record(s) found. > [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time > (msLoadMap not incl.): 0.002s > [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. > [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. > > I have checked http://mapserver.org/errors.html#id2 with similar error > "msQueryByPoint: search returned no results" and tried to create a > simple template: > > > > [lrn] > [ZVER] > > > but with no effect. > > In the mapfile, there is > > LAYER > NAME "typ" > METADATA > "wfs_title" "Typologie" ## REQUIRED > "gml_featureid" "CISLO" ## REQUIRED > "gml_include_items" "all" ## Optional (serves all attributes for layer) > "gml_types" "auto" > "gml_geometries" "msGeometry" > "gml_msGeometry_type" "polygon" > END > DATA typ.shp > TYPE POLYGON > STATUS ON > PROJECTION > "init=epsg:102067" > END > DUMP TRUE ## REQUIRED > CLASS > NAME "Typ" > STYLE > COLOR 0 0 155 > OUTLINECOLOR 120 120 120 > END > TEMPLATE "templates/typ_zver.html" > END > DEBUG 5 > END # Layer > > What is wrong with my FES filter? How can I make it to run? > > Thanks a lot, > > Michal > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From woodbri at swoodbridge.com Wed Aug 24 17:26:52 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 24 Aug 2011 20:26:52 -0400 Subject: [mapserver-users] Map projection not right in Openlayers In-Reply-To: <1314228234142-6722667.post@n2.nabble.com> References: <1314228234142-6722667.post@n2.nabble.com> Message-ID: <4E5596CC.6010402@swoodbridge.com> This now sounds more like a OpenLayers question and you should be asking in that list. My OL file look like this and they work: var map; var epsg4326 = new OpenLayers.Projection("EPSG:4326"); var epsg900913 = new OpenLayers.Projection("EPSG:900913"); function init(){ map = new OpenLayers.Map('map', { maxResolution: 156543.0339/2, numZoomLevels: 18, units: 'm', maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34), sphericalMercator: true, projection: epsg900913, displayProjection: epsg4326, controls:[ new OpenLayers.Control.LayerSwitcher(), // new OpenLayers.Control.OverviewMap(), new OpenLayers.Control.Permalink('permalink'), new OpenLayers.Control.MouseToolbar(), new OpenLayers.Control.MousePosition(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.Scale(), new OpenLayers.Control.ScaleLine() ] }); var wms = new OpenLayers.Layer.WMS( "Guatemala WMS", "http://imaptools.com:8080/cgi-bin/mapserv?", { map: "/u/data/maps/somemapfile.map", format: "image/png", layers: "MapFileName" }, { sphericalMercator: true, transitionEffect: 'resize', singleTile: true, ratio: 1.0 }); wms.addOptions({isBaseLayer: true}); wms.setVisibility(false); ... On 8/24/2011 7:23 PM, jjwang wrote: > After I set the projection of the map as epsg:900913, on client-side, > Openlayers still tells me that the projection of this layer is "EPSG:4326". > map file: > MAP > PROJECTION > "init=epsg:900913" > END > ........ > ........ > > WEB > TEMPLATE global.html > IMAGEPATH "/ms4w/tmp/ms_tmp/" > IMAGEURL "/ms_tmp/" > > METADATA > "wms_title" "My Global Map WMS Server" > "wms_srs" "EPSG:900913" > "ows_enable_request" "*" > END > END > > LAYER > PROJECTION > "init=epsg:4326" > END > ...... > ...... > END > > ...... > ...... > END > > Js code: > var propertydata_layer = new OpenLayers.Layer.WMS( > 'Property Data', > > 'http://localhost:9999/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/global.map&', > {layers: 'nsw', transparent:true}, > {opacity: .5} > ); > this.map.addLayers([propertydata_layer]); > > Result: map.layers[5] > div: HTMLDivElement > events: Class > grid: Array[3] > id: "OpenLayers.Layer.WMS_77" > inRange: true > isBaseLayer: false > map: Class > maxExtent: Class > maxResolution: 0.1 > maxScale: 480.6248291015625 > minResolution: 0.00000152587890625 > minScale: 31498228.8 > name: "Property Data" > numLoadingTiles: 0 > numZoomLevels: 17 > opacity: 0.5 > options: Object > origin: Class > params: Object > projection: "EPSG:4326" > resolutions: Array[17] > scales: Array[17] > tileSize: Class > units: "degrees" > url: > "http://localhost:9999/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/global.map&" > __proto__: Object > > Is this a Mapserver issue or Openlayers? > > JJ > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/Map-projection-not-right-in-Openlayers-tp6722667p6722667.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 jaja0506 at gmail.com Wed Aug 24 18:48:21 2011 From: jaja0506 at gmail.com (jjwang) Date: Wed, 24 Aug 2011 18:48:21 -0700 (PDT) Subject: [mapserver-users] How to define this projection? Message-ID: <1314236901959-6722964.post@n2.nabble.com> This the summary of my shapefile. Layer name: tas101sb Geometry: Polygon Feature Count: 971 Extent: (143.833316, -43.742980) - (148.498760, -39.437430) Layer SRS WKT: GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563]], PRIMEM["Greenwich",0.0], *UNIT["Degree",0.0174532925199433]]* AREA: Real (20.5) PERIMETER: Real (20.5) TAS101SB_: Real (11.0) TAS101SB_I: Real (11.0) SUBURB: String (46.0) SOURCE: String (16.0) UFI: Integer (10.0) I'm assuming that 'Layers SRS WKT' defines the projection of the layer. Is this projection same as EPSG:4326? If not, can some one give me the Proj4 statement that defines this projection. JJ -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-define-this-projection-tp6722964p6722964.html Sent from the Mapserver - User mailing list archive at Nabble.com. From bteluk at gmail.com Wed Aug 24 19:18:29 2011 From: bteluk at gmail.com (bteluk at gmail.com) Date: Wed, 24 Aug 2011 19:18:29 -0700 (PDT) Subject: [mapserver-users] Re: WFS restricting returned attributes In-Reply-To: <84446DEF76453C439E9E97E438E13A6301D9F5@suutari.haapa.mmm.fi> References: <1314168813643-6719063.post@n2.nabble.com> <84446DEF76453C439E9E97E438E13A6301D9F5@suutari.haapa.mmm.fi> Message-ID: <1314238709217-6723028.post@n2.nabble.com> Hi Jukka, Thanks for your response. Made some progress, but still got some problems. I tried using the the two following GET requests to restrict the property/attribute lists, using the syntax/capitalisation as read from the OGC WFS 1.1.0 recommendation: This example follows: This one follows the documentation for the PROPERTYNAME query parameter from Sect 14.7.3.1 of the recommendation: This one derives from the example from Sect 9.5, Ex 2 of the recommendation: I get a response back, but it includes all the attributes irrespective of my request. So still have the attribute restricting problem unsolved. I tried with POST requests - and with a few more variations of the XML, but without luck. It seems as if the server at the other end just ignores the request to restrict the attributes. I checked with the filter updated as per your suggestion and added a BBOX element enclosing - this fixed the filter bit and got a correctly filtered response. I did find some unusal things about the server - it doesn't like a "User-Agent" header in the HTTP request - this was causing my testing some problems. I don't know if that's something to do with MS 5.4.2, or it maybe because they have some sort of front end to the server perhaps. Thanks for your help! Regards, Bill. Rahkonen Jukka wrote: > > Hi, > > You can try if service takes list of propertynames with GET like > > http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.0.0&request=GetFeature&typename=lv:mml_railway&BBOX=246700,6780800,436400,6924000&propertyname=sahko,the_geom&maxfeatures=1 > > When it comes to filters, I am not sure how strict Mapserver is but I > would first have a try by correcting the errors (Filter instead of filter, > Within and not within) and using it as URL-encoded in the URL. TinyOWS > accepts GET filters when used like this. > > http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.1.0&request=getfeature&typename=tows:osm_point&maxfeatures=10&filter=%3CFilter%20%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Etows:amenity%3C/PropertyName%3E%3CLiteral%3Ewaste_basket%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E > > -Jukka Rahkonen- > bteluk wrote: > Hi, I'm a user of a service provider that uses MapServer V5.4.2. I'm using > their WFS Service. I'm trying to restrict the set of attributes that are > returned by using a POST'ed Query in my request. But it doesn't seem to > work. The service provider is using V5.4.2. I've tried equivalent queries > on my own server (a V5.6.0) which works fine. Would this a > problem/limitation of the service providers server?(eg. version problem or > config setting) Or am I missing stuff in the namespaces/schema > declarations? Or is it perhaps the query I'm using? My POST query looks > like this: > > xmlns:wfs="http://www.opengis.net/wfs" > service="WFS" > version="1.0.0" > xsi:schemaLocation="http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > xmlns:ms="http://mapserver.gis.umn.edu/mapserver"> > xmlns:ogc="http://www.opengis.net/ogc">msGeometry > xmlns:ogc="http://www.opengis.net/ogc">datetime > xmlns:ogc="http://www.opengis.net/ogc">id_num > xmlns:ogc="http://www.opengis.net/ogc">id_name > > > > > NB. am setting the content type to "text/xml", Also tried a GET request > with the filter: > > wget -O dbtemp.gml > "http://someserviceprovider.com/cgi-bin/mapserv?SERVICE=WFS& > VERSION=1.1.0&REQUEST=GetFeature&TypeName=IDY03103_dryblb&FILTER=( > msGeometry > 138 -29155 > -43 > )" > > > Response extract: > > > msWFSGetFeature(): WFS server error. Invalid or > Unsupported FILTER in > GetFeature : (<filter><within><PropertyName.............to > the end of the filter string! > > > Thanks in advance! Regards, Bill Teluk > Regards, Bill Teluk > > ________________________________ > View this message in context: WFS restricting returned > attributes<http://osgeo-org.1803224.n2.nabble.com/WFS-restricting-returned-attributes-tp6719063p6719063.html> > Sent from the Mapserver - User mailing list > archive<http://osgeo-org.1803224.n2.nabble.com/Mapserver-User-f1969211.html> > at Nabble.com. > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > ----- Regards, Bill Teluk -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-restricting-returned-attributes-tp6719063p6723028.html Sent from the Mapserver - User mailing list archive at Nabble.com. From woodbri at swoodbridge.com Wed Aug 24 19:20:33 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Wed, 24 Aug 2011 22:20:33 -0400 Subject: [mapserver-users] How to define this projection? In-Reply-To: <1314236901959-6722964.post@n2.nabble.com> References: <1314236901959-6722964.post@n2.nabble.com> Message-ID: <4E55B171.4050500@swoodbridge.com> On 8/24/2011 9:48 PM, jjwang wrote: > This the summary of my shapefile. > Layer name: tas101sb > Geometry: Polygon > Feature Count: 971 > Extent: (143.833316, -43.742980) - (148.498760, -39.437430) > Layer SRS WKT: > GEOGCS["GCS_WGS_1984", > DATUM["WGS_1984", > SPHEROID["WGS_1984",6378137.0,298.257223563]], > PRIMEM["Greenwich",0.0], > *UNIT["Degree",0.0174532925199433]]* > AREA: Real (20.5) > PERIMETER: Real (20.5) > TAS101SB_: Real (11.0) > TAS101SB_I: Real (11.0) > SUBURB: String (46.0) > SOURCE: String (16.0) > UFI: Integer (10.0) > > I'm assuming that 'Layers SRS WKT' defines the projection of the layer. > Is this projection same as EPSG:4326? Yes that is correct. epsg:4326 > If not, can some one give me the Proj4 statement that defines this > projection. > > JJ > > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-define-this-projection-tp6722964p6722964.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 Jukka.Rahkonen at mmmtike.fi Wed Aug 24 23:11:46 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Thu, 25 Aug 2011 06:11:46 +0000 Subject: [mapserver-users] Re: WFS restricting returned attributes In-Reply-To: <1314238709217-6723028.post@n2.nabble.com> References: <1314168813643-6719063.post@n2.nabble.com> <84446DEF76453C439E9E97E438E13A6301D9F5@suutari.haapa.mmm.fi>, <1314238709217-6723028.post@n2.nabble.com> Message-ID: <84446DEF76453C439E9E97E438E13A6301DCF7@suutari.haapa.mmm.fi> Hi, The examples were missing upgrade to Mapserver 6.0 if it is possible for you. I wouldn't trust that any WFS bugs in 5.4 will be corrected. For a standard compliant WFS TinyOWS would be a nice alternative and it works together with Mapserver. They can both use the same mapfiles. But TinyOWS can only use data from PostGIS. I just read that if BBOX is missing then the EXTENT from the mapfile is used and that can lead to some odd results if extent is not correct. The propertyname filter should really work with WFS and if you want to see it in action compare these http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.1.0&request=GetFeature&typename=lv:mml_railway&maxfeatures=1 http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.1.0&request=GetFeature&typename=lv:mml_railway&propertyname=sahko,the_geom&maxfeatures=1 I would also say that if you do not have some special reason for using WFS 1.1.0 then use WFS 1.0.0. instead. For my mind WFS 1.1.0 does not give any real advantage for the user despite the resultType=hits. However, it is introducing the coordinate axis order thing that has effects in all places. -Jukka Rahkonen- bteluk wrote: > Hi Jukka, > Thanks for your response. Made some progress, but still got some problems. > I tried using the the two following GET requests to restrict the property/attribute lists, using the syntax/capitalisation as read from the OGC WFS 1.1.0 recommendation: > This example follows: > This one follows the documentation for the PROPERTYNAME query parameter from Sect 14.7.3.1 of the recommendation: > This one derives from the example from Sect 9.5, Ex 2 of the recommendation: > I get a response back, but it includes all the attributes irrespective of my request. So still have the attribute restricting problem unsolved. >I tried with POST requests - and with a few more variations of the XML, but without luck. It seems as if the server at the other end just ignores the request to restrict the attributes. > I checked with the filter updated as per your suggestion and added a BBOX element enclosing - this fixed the filter bit and got a correctly filtered response. > I did find some unusal things about the server - it doesn't like a "User-Agent" header in the HTTP request - this was causing my testing some problems. I don't know if that's something to do with MS 5.4.2, or it maybe because they have some sort of front end to the server perhaps. > Thanks for your help! Regards, Bill. Rahkonen Jukka wrote: > > Hi, > > You can try if service takes list of propertynames with GET like > > http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.0.0&request=GetFeature&typename=lv:mml_railway&BBOX=246700,6780800,436400,6924000&propertyname=sahko,the_geom&maxfeatures=1 > > When it comes to filters, I am not sure how strict Mapserver is but I > would first have a try by correcting the errors (Filter instead of filter, > Within and not within) and using it as URL-encoded in the URL. TinyOWS > accepts GET filters when used like this. > > http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.1.0&request=getfeature&typename=tows:osm_point&maxfeatures=10&filter=%3CFilter%20%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Etows:amenity%3C/PropertyName%3E%3CLiteral%3Ewaste_basket%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E > > -Jukka Rahkonen- > bteluk wrote: > Hi, I'm a user of a service provider that uses MapServer V5.4.2. I'm using > their WFS Service. I'm trying to restrict the set of attributes that are > returned by using a POST'ed Query in my request. But it doesn't seem to > work. The service provider is using V5.4.2. I've tried equivalent queries > on my own server (a V5.6.0) which works fine. Would this a > problem/limitation of the service providers server?(eg. version problem or > config setting) Or am I missing stuff in the namespaces/schema > declarations? Or is it perhaps the query I'm using? My POST query looks > like this: > > xmlns:wfs="http://www.opengis.net/wfs" > service="WFS" > version="1.0.0" > xsi:schemaLocation="http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > xmlns:ms="http://mapserver.gis.umn.edu/mapserver"> > xmlns:ogc="http://www.opengis.net/ogc">msGeometry > xmlns:ogc="http://www.opengis.net/ogc">datetime > xmlns:ogc="http://www.opengis.net/ogc">id_num > xmlns:ogc="http://www.opengis.net/ogc">id_name > > > > > NB. am setting the content type to "text/xml", Also tried a GET request > with the filter: > > wget -O dbtemp.gml > "http://someserviceprovider.com/cgi-bin/mapserv?SERVICE=WFS& > VERSION=1.1.0&REQUEST=GetFeature&TypeName=IDY03103_dryblb&FILTER=( > msGeometry > 138 -29155 > -43 > )" > > > Response extract: > > > msWFSGetFeature(): WFS server error. Invalid or > Unsupported FILTER in > GetFeature : (<filter><within><PropertyName.............to > the end of the filter string! > > > Thanks in advance! Regards, Bill Teluk > Regards, Bill Teluk > > ________________________________ > View this message in context: WFS restricting returned > attributes<http://osgeo-org.1803224.n2.nabble.com/WFS-restricting-returned-attributes-tp6719063p6719063.html> > Sent from the Mapserver - User mailing list > archive<http://osgeo-org.1803224.n2.nabble.com/Mapserver-User-f1969211.html> > at Nabble.com. > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > ----- Regards, Bill Teluk -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-restricting-returned-attributes-tp6719063p6723028.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 silasharmeen at gmail.com Wed Aug 24 23:41:23 2011 From: silasharmeen at gmail.com (Sila Khan) Date: Thu, 25 Aug 2011 11:41:23 +0500 Subject: [mapserver-users] Re: mapserver-users Digest, Vol 43, Issue 50 In-Reply-To: <20110825034326.297B312B8858@lists.osgeo.org> References: <20110825034326.297B312B8858@lists.osgeo.org> Message-ID: i want to load grib file in in browser and openlayers through mapfile . this is my mapfile MAP NAME "MAP" # Map image size SIZE 300 200 UNITS meters CONFIG "MS_ERRORFILE" "/ms4w/Apache/logs.log" DEBUG 5 EXTENT -9.000000 -110.772277 369.000000 109.772277 #FONTSET '../etc/fonts.txt' #SYMBOLSET '../etc/symbols.sym' PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' END # Background color for the map canvas -- change as desired IMAGECOLOR 255 255 255 IMAGEQUALITY 95 IMAGETYPE png OUTPUTFORMAT NAME png DRIVER 'GD/PNG' MIMETYPE 'image/png' IMAGEMODE RGBA EXTENSION 'png' END # Legend LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END # Web interface definition. Only the template parameter # is required to display a map. See MapServer documentation WEB # Set IMAGEPATH to the path where MapServer should # write its output. #IMAGEPATH '/tmp/ms_tmp/' # Set IMAGEURL to the url that points to IMAGEPATH # as defined in your web server configuration #IMAGEURL '/ms_tmp/' IMAGEPATH 'output/' IMAGEURL 'output/' LOG "/tmp/gmap.log" # WMS server settings METADATA 'ows_title' 'MAP' 'ows_onlineresource' ' http://localhost/cgi-bin/mapserv?map=C:/ms4w/Apache/htdocs/shapefiles/GRIB_DATA/grib.map ' 'ows_srs' 'EPSG:4326' END #Scale range at which web interface will operate # Template and header/footer settings # Only the template parameter is required to display a map. See MapServer documentation TEMPLATE 'templates/grib.html' END LAYER NAME 'gfs.t00z.pgrbf03' TYPE RASTER DUMP true TEMPLATE fooOnlyForWMSGetFeatureInfo EXTENT -9.000000 -110.772277 369.000000 109.772277 #DATA 'C:/ms4w/Apache/htdocs/shapefiles/GRIB_DATA/gfs.t00z.pgrbf03' DATA 'C:/ms4w/Apache/htdocs/shapefiles/GRIB_DATA/55' METADATA 'ows_title' 'gfs.t00z.pgrbf03' 'ows_title' '55' END STATUS OFF TRANSPARENCY 10 PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' END PROCESSING 'BANDS=1' CLASS NAME 'red' EXPRESSION ([pixel] < -3) STYLE COLOR 255 0 0 END END CLASS NAME 'green' EXPRESSION ([pixel] >= -3 and [pixel] < 3) STYLE COLOR 0 255 0 END END CLASS NAME 'blue' EXPRESSION ([pixel] >= 3) STYLE COLOR 0 0 255 END END END and i put the url in browser as http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/shapefiles/GRIB_DATA/grib.map&LAYERS=gfs.t00z.pgrbf03&FORMAT=png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG:4326&BBOX=-9.000000%20-110.772277%20369.000000%20109.772277&WIDTH=500&HEIGHT=500 it throws the ERROR msWMSLoadGetMapParms():WMS server error.wrong number of arguments for BBOX plz help me to find where i m doing wrong in mapfile or in url Thanks Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From silasharmeen at gmail.com Wed Aug 24 23:43:54 2011 From: silasharmeen at gmail.com (Sila Khan) Date: Thu, 25 Aug 2011 11:43:54 +0500 Subject: [mapserver-users] Grib file Message-ID: i want to load grib file in in browser and openlayers through mapfile . this is my mapfile MAP NAME "MAP" # Map image size SIZE 300 200 UNITS meters CONFIG "MS_ERRORFILE" "/ms4w/Apache/logs.log" DEBUG 5 EXTENT -9.000000 -110.772277 369.000000 109.772277 #FONTSET '../etc/fonts.txt' #SYMBOLSET '../etc/symbols.sym' PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' END # Background color for the map canvas -- change as desired IMAGECOLOR 255 255 255 IMAGEQUALITY 95 IMAGETYPE png OUTPUTFORMAT NAME png DRIVER 'GD/PNG' MIMETYPE 'image/png' IMAGEMODE RGBA EXTENSION 'png' END # Legend LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END # Web interface definition. Only the template parameter # is required to display a map. See MapServer documentation WEB # Set IMAGEPATH to the path where MapServer should # write its output. #IMAGEPATH '/tmp/ms_tmp/' # Set IMAGEURL to the url that points to IMAGEPATH # as defined in your web server configuration #IMAGEURL '/ms_tmp/' IMAGEPATH 'output/' IMAGEURL 'output/' LOG "/tmp/gmap.log" # WMS server settings METADATA 'ows_title' 'MAP' 'ows_onlineresource' ' http://localhost/cgi-bin/mapserv?map=C:/ms4w/Apache/htdocs/shapefiles/GRIB_DATA/grib.map ' 'ows_srs' 'EPSG:4326' END #Scale range at which web interface will operate # Template and header/footer settings # Only the template parameter is required to display a map. See MapServer documentation TEMPLATE 'templates/grib.html' END LAYER NAME 'gfs.t00z.pgrbf03' TYPE RASTER DUMP true TEMPLATE fooOnlyForWMSGetFeatureInfo EXTENT -9.000000 -110.772277 369.000000 109.772277 #DATA 'C:/ms4w/Apache/htdocs/ shapefiles/GRIB_DATA/gfs.t00z.pgrbf03' DATA 'C:/ms4w/Apache/htdocs/shapefiles/GRIB_DATA/55' METADATA 'ows_title' 'gfs.t00z.pgrbf03' 'ows_title' '55' END STATUS OFF TRANSPARENCY 10 PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' END PROCESSING 'BANDS=1' CLASS NAME 'red' EXPRESSION ([pixel] < -3) STYLE COLOR 255 0 0 END END CLASS NAME 'green' EXPRESSION ([pixel] >= -3 and [pixel] < 3) STYLE COLOR 0 255 0 END END CLASS NAME 'blue' EXPRESSION ([pixel] >= 3) STYLE COLOR 0 0 255 END END END and i put the url in browser as http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/shapefiles/GRIB_DATA/grib.map&LAYERS=gfs.t00z.pgrbf03&FORMAT=png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG:4326&BBOX=-9.000000%20-110.772277%20369.000000%20109.772277&WIDTH=500&HEIGHT=500 it throws the ERROR msWMSLoadGetMapParms():WMS server error.wrong number of arguments for BBOX plz help me to find where i m doing wrong in mapfile or in url Thanks Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Wed Aug 24 23:56:31 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Thu, 25 Aug 2011 06:56:31 +0000 Subject: [mapserver-users] Grib file In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A6301DD27@suutari.haapa.mmm.fi> Hi, At least this degree based extent is a bit odd to me EXTENT -9.000000 -110.772277 369.000000 109.772277 -Jukka Rahkonen- Sila Khan wrote: > i want to load grib file in in browser and openlayers through mapfile . this is my mapfile MAP NAME "MAP" # Map image size SIZE 300 200 UNITS meters CONFIG "MS_ERRORFILE" "/ms4w/Apache/logs.log" DEBUG 5 EXTENT -9.000000 -110.772277 369.000000 109.772277 #FONTSET '../etc/fonts.txt' #SYMBOLSET '../etc/symbols.sym' PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' END # Background color for the map canvas -- change as desired IMAGECOLOR 255 255 255 IMAGEQUALITY 95 IMAGETYPE png OUTPUTFORMAT NAME png DRIVER 'GD/PNG' MIMETYPE 'image/png' IMAGEMODE RGBA EXTENSION 'png' END # Legend LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END # Web interface definition. Only the template parameter # is required to display a map. See MapServer documentation WEB # Set IMAGEPATH to the path where MapServer should # write its output. #IMAGEPATH '/tmp/ms_tmp/' # Set IMAGEURL to the url that points to IMAGEPATH # as defined in your web server configuration #IMAGEURL '/ms_tmp/' IMAGEPATH 'output/' IMAGEURL 'output/' LOG "/tmp/gmap.log" # WMS server settings METADATA 'ows_title' 'MAP' 'ows_onlineresource' ' http://localhost/cgi-bin/mapserv?map=C:/ms4w/Apache/htdocs/shapefiles/GRIB_DATA/grib.map ' 'ows_srs' 'EPSG:4326' END #Scale range at which web interface will operate # Template and header/footer settings # Only the template parameter is required to display a map. See MapServer documentation TEMPLATE 'templates/grib.html' END LAYER NAME 'gfs.t00z.pgrbf03' TYPE RASTER DUMP true TEMPLATE fooOnlyForWMSGetFeatureInfo EXTENT -9.000000 -110.772277 369.000000 109.772277 #DATA 'C:/ms4w/Apache/htdocs/ shapefiles/GRIB_DATA/gfs.t00z.pgrbf03' DATA 'C:/ms4w/Apache/htdocs/shapefiles/GRIB_DATA/55' METADATA 'ows_title' 'gfs.t00z.pgrbf03' 'ows_title' '55' END STATUS OFF TRANSPARENCY 10 PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' END PROCESSING 'BANDS=1' CLASS NAME 'red' EXPRESSION ([pixel] < -3) STYLE COLOR 255 0 0 END END CLASS NAME 'green' EXPRESSION ([pixel] >= -3 and [pixel] < 3) STYLE COLOR 0 255 0 END END CLASS NAME 'blue' EXPRESSION ([pixel] >= 3) STYLE COLOR 0 0 255 END END END and i put the url in browser as http://localhost/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/shapefiles/GRIB_DATA/grib.map&LAYERS=gfs.t00z.pgrbf03&FORMAT=png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG:4326&BBOX=-9.000000%20-110.772277%20369.000000%20109.772277&WIDTH=500&HEIGHT=500 it throws the ERROR msWMSLoadGetMapParms():WMS server error.wrong number of arguments for BBOX plz help me to find where i m doing wrong in mapfile or in url Thanks Regards From bteluk at gmail.com Thu Aug 25 00:20:27 2011 From: bteluk at gmail.com (bteluk at gmail.com) Date: Thu, 25 Aug 2011 00:20:27 -0700 (PDT) Subject: [mapserver-users] Re: WFS restricting returned attributes In-Reply-To: <84446DEF76453C439E9E97E438E13A6301DCF7@suutari.haapa.mmm.fi> References: <1314168813643-6719063.post@n2.nabble.com> <84446DEF76453C439E9E97E438E13A6301D9F5@suutari.haapa.mmm.fi> <1314238709217-6723028.post@n2.nabble.com> <84446DEF76453C439E9E97E438E13A6301DCF7@suutari.haapa.mmm.fi> Message-ID: <1314256827258-6723501.post@n2.nabble.com> Hi Jukka, Yes - your example works on my own MapServer (v5.6.0) although I had to put the propertynames in parentheses eg. (of course my test had a different URL!) I'm actually using the commercial services of another company - and it's their MapServer that is v5.4.2 (not mine, otherwise I could update it.) I checked the equivalent samples of the GET & POST requests against my 5.6.0 server and I could get them to work - so I appear to have the correct syntax now. The problem appears to be with the service provider's server - but whether it's a fault with MapServer v5.4.2 or something to do with their configuration or perhaps a frontend, I don't know. I've asked them if they can take a look at it for me and I've sent them my sample requests so I guess I'll find out when they get back to me. Thanks for your help. Regards, Bill. Rahkonen Jukka wrote: > > Hi, > > The examples were missing upgrade to Mapserver 6.0 if it is possible for > you. I wouldn't trust that any WFS bugs in 5.4 will be corrected. > For a standard compliant WFS TinyOWS would be a nice alternative and it > works together with Mapserver. They can both use the same mapfiles. But > TinyOWS can only use data from PostGIS. > > I just read that if BBOX is missing then the EXTENT from the mapfile is > used and that can lead to some odd results if extent is not correct. > > The propertyname filter should really work with WFS and if you want to see > it in action compare these > http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.1.0&request=GetFeature&typename=lv:mml_railway&maxfeatures=1 > http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.1.0&request=GetFeature&typename=lv:mml_railway&propertyname=sahko,the_geom&maxfeatures=1 > > I would also say that if you do not have some special reason for using WFS > 1.1.0 then use WFS 1.0.0. instead. For my mind WFS 1.1.0 does not give any > real advantage for the user despite the resultType=hits. However, it is > introducing the coordinate axis order thing that has effects in all > places. > > -Jukka Rahkonen- > > ----- Regards, Bill Teluk -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-restricting-returned-attributes-tp6719063p6723501.html Sent from the Mapserver - User mailing list archive at Nabble.com. From paulcarlisle at comcast.net Thu Aug 25 03:58:10 2011 From: paulcarlisle at comcast.net (SixDegrees) Date: Thu, 25 Aug 2011 03:58:10 -0700 (PDT) Subject: [mapserver-users] Specify WMS BBOX in Pixels? Message-ID: <1314269890427-6724013.post@n2.nabble.com> What SRS can I use that will allow me to make GetMap requests using image pixel space? We have a database with a number of row/col references to image locations that we want to "chip" for display purposes, preferably without any warping or rotations applied. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Specify-WMS-BBOX-in-Pixels-tp6724013p6724013.html Sent from the Mapserver - User mailing list archive at Nabble.com. From michal.sredl at gmail.com Thu Aug 25 06:45:19 2011 From: michal.sredl at gmail.com (=?ISO-8859-2?B?TWljaGFsIKly6WRs?=) Date: Thu, 25 Aug 2011 15:45:19 +0200 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: <84446DEF76453C439E9E97E438E13A6301DC14@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301DC14@suutari.haapa.mmm.fi> Message-ID: Hi Jukka, Thanks a lot. I have tried to add "wfs_include_items" "all" into layer metadata, unfortunately it didn't help. Your request looks much like the mine one. Cheers, Michal 2011/8/24 Rahkonen Jukka : > > Just in case, try to add wfs_include_items "all" into layer metadata. ?I am remembering that ows_include_items perhaps did not work for me some time ago. ?I verified that your request works against my Mapserver 6.0. Don't look too closely the "amenity"=>"toilets" part, the data in the database is really literally "amenity"=>"toilets". Unfortunately my layer comes from PostGIS and not from shapefile as in your case. > > http://188.64.1.61/cgi-bin/ms_ows?REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=osm_pisteet&FILTER=tags"amenity"=>"toilets" > > -Jukka Rahkonen- > > Michal ?r?dl wrote: > >> Hi all, > >> I am trying to use FES filter for WFS layer and get no result, even > thought I should get one. > >> In my browser, I request > >> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER= xmlns:ogc="http://www.opengis.net/ogc">ZVER2 > >> and get > >> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > xmlns:gml="http://www.opengis.net/gml" > xmlns:wfs="http://www.opengis.net/wfs" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver > http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 > http://www.opengis.net/wfs > http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> > > missing > > > > even though I do know, that features with ZVER=2 do exist. > > In the mapserver log file, I get > > [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned > no results. No matching record(s) found. > [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time > (msLoadMap not incl.): 0.002s > [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. > [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. > > I have checked http://mapserver.org/errors.html#id2 with similar error > "msQueryByPoint: search returned no results" and tried to create a > simple template: > > > > ?[lrn] > ?[ZVER] > > > but with no effect. > > In the mapfile, there is > > LAYER > ?NAME "typ" > ?METADATA > ? ?"wfs_title" ? ?"Typologie" ## REQUIRED > ? ?"gml_featureid" "CISLO" ## REQUIRED > ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) > ? ?"gml_types" "auto" > ? ?"gml_geometries" "msGeometry" > ? ?"gml_msGeometry_type" "polygon" > ?END > ?DATA typ.shp > ?TYPE POLYGON > ?STATUS ON > ?PROJECTION > ? ?"init=epsg:102067" > ?END > ?DUMP TRUE ? ? ? ? ? ## REQUIRED > ?CLASS > ? ?NAME "Typ" > ? ?STYLE > ? ? ?COLOR 0 0 155 > ? ? ?OUTLINECOLOR 120 120 120 > ? ?END > ? ?TEMPLATE "templates/typ_zver.html" > ?END > ?DEBUG 5 > END # Layer > > What is wrong with my FES filter? How can I make it to run? > > Thanks a lot, > > Michal > _______________________________________________ > 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 michal.sredl at gmail.com Thu Aug 25 06:48:38 2011 From: michal.sredl at gmail.com (=?ISO-8859-2?B?TWljaGFsIKly6WRs?=) Date: Thu, 25 Aug 2011 15:48:38 +0200 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: References: Message-ID: Hi Steve, Thanks a lot. The extent should be large enough to encompass all the features. Here comes the whole mapfile: MAP NAME "MIS WFS Server" STATUS ON SIZE 500 500 EXTENT -180 -90 180 90 SHAPEPATH "data/" IMAGECOLOR 255 255 255 CONFIG MS_ERRORFILE "log/mapserv.log" DEBUG 5 WEB IMAGEPATH "/var/www/tmp/" IMAGEURL "/tmp/" METADATA "wfs_title" "MIS WFS Server" ## REQUIRED "wfs_onlineresource" "http://127.0.0.1/cgi-bin/ows?" "wfs_srs" "EPSG:4326 EPSG:102067" "wms_srs" "EPSG:4326 EPSG:102067" ## Recommended "wcs_srs" "EPSG:4326 EPSG:102067" ## Recommended "ows_enable_request" "*" "ows_updatesequence" "2011-29-05T00:24:00" END END PROJECTION "init=epsg:4326" END LAYER NAME "typ" METADATA "wfs_title" "Typologie" ## REQUIRED "wfs_include_items" "all" "gml_featureid" "CISLO" ## REQUIRED "gml_include_items" "all" ## Optional (serves all attributes for layer) "gml_types" "auto" "gml_geometries" "msGeometry" "gml_msGeometry_type" "polygon" END DATA typ.shp TYPE POLYGON STATUS ON PROJECTION "init=epsg:102067" END DUMP TRUE ## REQUIRED CLASS NAME "Typ" STYLE COLOR 0 0 155 OUTLINECOLOR 120 120 120 END TEMPLATE "templates/typ_zver.html" END DEBUG 5 END # Layer LAYER NAME "hsrs" TYPE RASTER STATUS ON CONNECTION "http://www.bnhelp.cz/cgi-bin/crtopo?" DEBUG ON CONNECTIONTYPE WMS METADATA "wms_srs" "EPSG:4326" "wms_name" "obce,kraje,hr_cr,sidla,doprava" "wms_title" "CR Topo" "wms_server_version" "1.1.1" "wms_format" "image/png" "wms_latlonboundingbox" "11.9384 48.2337 18.957 51.3549" END END END # Map File Cheers, Michal 2011/8/25 Steve Lime : > What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve > > Sent from my iPad > > On Aug 24, 2011, at 7:58 AM, Michal ?r?dl wrote: > >> Hi all, >> >> I am trying to use FES filter for WFS layer and get no result, even >> thought I should get one. >> >> In my browser, I request >> >> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=> xmlns:ogc="http://www.opengis.net/ogc">ZVER2 >> >> and get >> >> > xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >> xmlns:gml="http://www.opengis.net/gml" >> xmlns:wfs="http://www.opengis.net/wfs" >> xmlns:ogc="http://www.opengis.net/ogc" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >> http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 >> http://www.opengis.net/wfs >> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >> >> missing >> >> >> >> even though I do know, that features with ZVER=2 do exist. >> >> In the mapserver log file, I get >> >> [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned >> no results. No matching record(s) found. >> [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time >> (msLoadMap not incl.): 0.002s >> [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. >> [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. >> >> I have checked http://mapserver.org/errors.html#id2 with similar error >> "msQueryByPoint: search returned no results" and tried to create a >> simple template: >> >> >> >> ?[lrn] >> ?[ZVER] >> >> >> but with no effect. >> >> In the mapfile, there is >> >> LAYER >> ?NAME "typ" >> ?METADATA >> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >> ? ?"gml_featureid" "CISLO" ## REQUIRED >> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >> ? ?"gml_types" "auto" >> ? ?"gml_geometries" "msGeometry" >> ? ?"gml_msGeometry_type" "polygon" >> ?END >> ?DATA typ.shp >> ?TYPE POLYGON >> ?STATUS ON >> ?PROJECTION >> ? ?"init=epsg:102067" >> ?END >> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >> ?CLASS >> ? ?NAME "Typ" >> ? ?STYLE >> ? ? ?COLOR 0 0 155 >> ? ? ?OUTLINECOLOR 120 120 120 >> ? ?END >> ? ?TEMPLATE "templates/typ_zver.html" >> ?END >> ?DEBUG 5 >> END # Layer >> >> What is wrong with my FES filter? How can I make it to run? >> >> Thanks a lot, >> >> Michal >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > From michal.sredl at gmail.com Thu Aug 25 08:24:27 2011 From: michal.sredl at gmail.com (=?ISO-8859-2?B?TWljaGFsIKly6WRs?=) Date: Thu, 25 Aug 2011 17:24:27 +0200 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: References: Message-ID: Hi all, problem solved. I needed to set: EXTENT -905000 -1230000 -400000 -900000 and PROJECTION ## "init=epsg:4326" "init=epsg:102067" END (Epsg 102067 is the projection of the layer being filtered.) Thank you very much again, Michal 2011/8/25 Michal ?r?dl : > Hi Steve, > > Thanks a lot. The extent should be large enough to encompass all the > features. Here comes the whole mapfile: > > MAP > NAME "MIS WFS Server" > STATUS ON > SIZE 500 500 > EXTENT -180 -90 180 90 > SHAPEPATH "data/" > IMAGECOLOR 255 255 255 > CONFIG MS_ERRORFILE "log/mapserv.log" > DEBUG 5 > > WEB > ?IMAGEPATH "/var/www/tmp/" > ?IMAGEURL "/tmp/" > ?METADATA > ? ?"wfs_title" ? ? ? ? ? ?"MIS WFS Server" ?## REQUIRED > ? ?"wfs_onlineresource" ? "http://127.0.0.1/cgi-bin/ows?" > ? ?"wfs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" > ? ?"wms_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended > ? ?"wcs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended > ? ?"ows_enable_request" "*" > ? ?"ows_updatesequence" "2011-29-05T00:24:00" > ?END > END > > PROJECTION > ?"init=epsg:4326" > END > > LAYER > ?NAME "typ" > ?METADATA > ? ?"wfs_title" ? ?"Typologie" ## REQUIRED > ? ?"wfs_include_items" "all" > ? ?"gml_featureid" "CISLO" ## REQUIRED > ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) > ? ?"gml_types" "auto" > ? ?"gml_geometries" "msGeometry" > ? ?"gml_msGeometry_type" "polygon" > ?END > ?DATA typ.shp > ?TYPE POLYGON > ?STATUS ON > ?PROJECTION > ? ?"init=epsg:102067" > ?END > ?DUMP TRUE ? ? ? ? ? ## REQUIRED > ?CLASS > ? ?NAME "Typ" > ? ?STYLE > ? ? ?COLOR 0 0 155 > ? ? ?OUTLINECOLOR 120 120 120 > ? ?END > ? ?TEMPLATE "templates/typ_zver.html" > ?END > ?DEBUG 5 > END # Layer > > LAYER > ? ?NAME "hsrs" > ? ?TYPE RASTER > ? ?STATUS ON > ? ?CONNECTION "http://www.bnhelp.cz/cgi-bin/crtopo?" > ? ?DEBUG ON > ? ?CONNECTIONTYPE WMS > ? ?METADATA > ? ? ? ?"wms_srs" ? ? ? ? ? ? "EPSG:4326" > ? ? ? ?"wms_name" ? ? ? ? ? ?"obce,kraje,hr_cr,sidla,doprava" > ? ? ? ?"wms_title" ? ? ? ? ? ?"CR Topo" > ? ? ? ?"wms_server_version" ?"1.1.1" > ? ? ? ?"wms_format" ? ? ? ? ?"image/png" > ? ? ? ?"wms_latlonboundingbox" "11.9384 48.2337 18.957 51.3549" > ? ?END > END > > END # Map File > > Cheers, > > Michal > > 2011/8/25 Steve Lime : >> What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve >> >> Sent from my iPad >> >> On Aug 24, 2011, at 7:58 AM, Michal ?r?dl wrote: >> >>> Hi all, >>> >>> I am trying to use FES filter for WFS layer and get no result, even >>> thought I should get one. >>> >>> In my browser, I request >>> >>> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=>> xmlns:ogc="http://www.opengis.net/ogc">ZVER2 >>> >>> and get >>> >>> >> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>> xmlns:gml="http://www.opengis.net/gml" >>> xmlns:wfs="http://www.opengis.net/wfs" >>> xmlns:ogc="http://www.opengis.net/ogc" >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >>> http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 >>> http://www.opengis.net/wfs >>> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >>> >>> missing >>> >>> >>> >>> even though I do know, that features with ZVER=2 do exist. >>> >>> In the mapserver log file, I get >>> >>> [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned >>> no results. No matching record(s) found. >>> [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time >>> (msLoadMap not incl.): 0.002s >>> [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. >>> [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. >>> >>> I have checked http://mapserver.org/errors.html#id2 with similar error >>> "msQueryByPoint: search returned no results" and tried to create a >>> simple template: >>> >>> >>> >>> ?[lrn] >>> ?[ZVER] >>> >>> >>> but with no effect. >>> >>> In the mapfile, there is >>> >>> LAYER >>> ?NAME "typ" >>> ?METADATA >>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>> ? ?"gml_types" "auto" >>> ? ?"gml_geometries" "msGeometry" >>> ? ?"gml_msGeometry_type" "polygon" >>> ?END >>> ?DATA typ.shp >>> ?TYPE POLYGON >>> ?STATUS ON >>> ?PROJECTION >>> ? ?"init=epsg:102067" >>> ?END >>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>> ?CLASS >>> ? ?NAME "Typ" >>> ? ?STYLE >>> ? ? ?COLOR 0 0 155 >>> ? ? ?OUTLINECOLOR 120 120 120 >>> ? ?END >>> ? ?TEMPLATE "templates/typ_zver.html" >>> ?END >>> ?DEBUG 5 >>> END # Layer >>> >>> What is wrong with my FES filter? How can I make it to run? >>> >>> Thanks a lot, >>> >>> Michal >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > From no-reply at neogeo-online.net Thu Aug 25 14:41:15 2011 From: no-reply at neogeo-online.net (Guillaume Sueur) Date: Thu, 25 Aug 2011 23:41:15 +0200 Subject: [mapserver-users] MacOS X Lion Ports Message-ID: <4E56C17B.1020306@neogeo-online.net> Hi list, I don't know if William Kyngesburye reads this list, but someone certainly knows him. There is a little issue in the mapserver package when used on Lion. Python mapscript is sent to python2.6 site-packages directory instead of 2.7, which causes the system to be unable to load it. Simply moving the files fixes it, so I guess it will be easy to fix in the package installation too. Cairo and GDAL packages are fine. Best regards Guillaume From woklist at kyngchaos.com Thu Aug 25 16:00:17 2011 From: woklist at kyngchaos.com (William Kyngesburye) Date: Thu, 25 Aug 2011 18:00:17 -0500 Subject: [mapserver-users] MacOS X Lion Ports In-Reply-To: <4E56C17B.1020306@neogeo-online.net> References: <4E56C17B.1020306@neogeo-online.net> Message-ID: <2AE66FB7-BC65-4C3A-A3F0-7D20029886B5@kyngchaos.com> That is correct behavior. The current package is made for Python 2.6, and I haven't rebuilt it for 2.7 Lion yet. It may seem to work, but binary python extensions are best left to the version they were built for. It's been a while since I played with python mapscript, but if you force your scripts to use "python2.6" instead of just "python", mapscript should load. That could get messy for a large project. I should be able to get to a MapServer/Lion update very soon. On Aug 25, 2011, at 4:41 PM, Guillaume Sueur wrote: > Hi list, > > I don't know if William Kyngesburye reads this list, but someone certainly knows him. > There is a little issue in the mapserver package when used on Lion. Python mapscript is sent to python2.6 site-packages directory instead of 2.7, which causes the system to be unable to load it. Simply moving the files fixes it, so I guess it will be easy to fix in the package installation too. > Cairo and GDAL packages are fine. > > Best regards > > Guillaume > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users ----- William Kyngesburye http://www.kyngchaos.com/ "Oh, look, I seem to have fallen down a deep, dark hole. Now what does that remind me of? Ah, yes - life." - Marvin From Jukka.Rahkonen at mmmtike.fi Thu Aug 25 21:30:38 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Fri, 26 Aug 2011 04:30:38 +0000 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: References: , Message-ID: <84446DEF76453C439E9E97E438E13A6301DE93@suutari.haapa.mmm.fi> Hi, Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. Could you have one more trial with the original settings and see if adding &srsName=EPSG:4326 or &srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with &srsName=EPSG:4326. -Jukka Rahkonen. Michal ?r?dl wrote: > Hi all, > problem solved. I needed to set: > EXTENT -905000 -1230000 -400000 -900000 and PROJECTION ## "init=epsg:4326" "init=epsg:102067" END (Epsg 102067 is the projection of the layer being filtered.) Thank you very much again, Michal 2011/8/25 Michal ?r?dl : > Hi Steve, > > Thanks a lot. The extent should be large enough to encompass all the > features. Here comes the whole mapfile: > > MAP > NAME "MIS WFS Server" > STATUS ON > SIZE 500 500 > EXTENT -180 -90 180 90 > SHAPEPATH "data/" > IMAGECOLOR 255 255 255 > CONFIG MS_ERRORFILE "log/mapserv.log" > DEBUG 5 > > WEB > IMAGEPATH "/var/www/tmp/" > IMAGEURL "/tmp/" > METADATA > "wfs_title" "MIS WFS Server" ## REQUIRED > "wfs_onlineresource" "http://127.0.0.1/cgi-bin/ows?" > "wfs_srs" "EPSG:4326 EPSG:102067" > "wms_srs" "EPSG:4326 EPSG:102067" ## Recommended > "wcs_srs" "EPSG:4326 EPSG:102067" ## Recommended > "ows_enable_request" "*" > "ows_updatesequence" "2011-29-05T00:24:00" > END > END > > PROJECTION > "init=epsg:4326" > END > > LAYER > NAME "typ" > METADATA > "wfs_title" "Typologie" ## REQUIRED > "wfs_include_items" "all" > "gml_featureid" "CISLO" ## REQUIRED > "gml_include_items" "all" ## Optional (serves all attributes for layer) > "gml_types" "auto" > "gml_geometries" "msGeometry" > "gml_msGeometry_type" "polygon" > END > DATA typ.shp > TYPE POLYGON > STATUS ON > PROJECTION > "init=epsg:102067" > END > DUMP TRUE ## REQUIRED > CLASS > NAME "Typ" > STYLE > COLOR 0 0 155 > OUTLINECOLOR 120 120 120 > END > TEMPLATE "templates/typ_zver.html" > END > DEBUG 5 > END # Layer > > LAYER > NAME "hsrs" > TYPE RASTER > STATUS ON > CONNECTION "http://www.bnhelp.cz/cgi-bin/crtopo?" > DEBUG ON > CONNECTIONTYPE WMS > METADATA > "wms_srs" "EPSG:4326" > "wms_name" "obce,kraje,hr_cr,sidla,doprava" > "wms_title" "CR Topo" > "wms_server_version" "1.1.1" > "wms_format" "image/png" > "wms_latlonboundingbox" "11.9384 48.2337 18.957 51.3549" > END > END > > END # Map File > > Cheers, > > Michal > > 2011/8/25 Steve Lime : >> What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve >> >> Sent from my iPad >> >> On Aug 24, 2011, at 7:58 AM, Michal ?r?dl wrote: >> >>> Hi all, >>> >>> I am trying to use FES filter for WFS layer and get no result, even >>> thought I should get one. >>> >>> In my browser, I request >>> >>> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=>> xmlns:ogc="http://www.opengis.net/ogc">ZVER2 >>> >>> and get >>> >>> >> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>> xmlns:gml="http://www.opengis.net/gml" >>> xmlns:wfs="http://www.opengis.net/wfs" >>> xmlns:ogc="http://www.opengis.net/ogc" >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >>> http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 >>> http://www.opengis.net/wfs >>> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >>> >>> missing >>> >>> >>> >>> even though I do know, that features with ZVER=2 do exist. >>> >>> In the mapserver log file, I get >>> >>> [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned >>> no results. No matching record(s) found. >>> [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time >>> (msLoadMap not incl.): 0.002s >>> [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. >>> [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. >>> >>> I have checked http://mapserver.org/errors.html#id2 with similar error >>> "msQueryByPoint: search returned no results" and tried to create a >>> simple template: >>> >>> >>> >>> [lrn] >>> [ZVER] >>> >>> >>> but with no effect. >>> >>> In the mapfile, there is >>> >>> LAYER >>> NAME "typ" >>> METADATA >>> "wfs_title" "Typologie" ## REQUIRED >>> "gml_featureid" "CISLO" ## REQUIRED >>> "gml_include_items" "all" ## Optional (serves all attributes for layer) >>> "gml_types" "auto" >>> "gml_geometries" "msGeometry" >>> "gml_msGeometry_type" "polygon" >>> END >>> DATA typ.shp >>> TYPE POLYGON >>> STATUS ON >>> PROJECTION >>> "init=epsg:102067" >>> END >>> DUMP TRUE ## REQUIRED >>> CLASS >>> NAME "Typ" >>> STYLE >>> COLOR 0 0 155 >>> OUTLINECOLOR 120 120 120 >>> END >>> TEMPLATE "templates/typ_zver.html" >>> END >>> DEBUG 5 >>> END # Layer >>> >>> What is wrong with my FES filter? How can I make it to run? >>> >>> Thanks a lot, >>> >>> Michal >>> _______________________________________________ >>> 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 michal.sredl at gmail.com Fri Aug 26 03:57:36 2011 From: michal.sredl at gmail.com (=?ISO-8859-2?B?TWljaGFsIKly6WRs?=) Date: Fri, 26 Aug 2011 12:57:36 +0200 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: <84446DEF76453C439E9E97E438E13A6301DE93@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301DE93@suutari.haapa.mmm.fi> Message-ID: Hi Jukka, the current settings returns expected result with &srsName=EPSG:4326 as well. The original settings doesn't work neither with &srsName=EPSG:4326 nor &srsName=EPSG::102067. Yes, it looks like there would be a problem in case of several WFS layers with different projections of the source data. Cheers, Mike 2011/8/26 Rahkonen Jukka : > Hi, > > Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. > > Could you have one more trial with the original settings and see if adding &srsName=EPSG:4326 or &srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with &srsName=EPSG:4326. > > -Jukka Rahkonen. > > Michal ?r?dl wrote: > > >> Hi all, > >> problem solved. I needed to set: > >> EXTENT -905000 -1230000 -400000 -900000 > > and > > PROJECTION > ## ?"init=epsg:4326" > ?"init=epsg:102067" > END > > (Epsg 102067 is the projection of the layer being filtered.) > > Thank you very much again, > > Michal > > > 2011/8/25 Michal ?r?dl : >> Hi Steve, >> >> Thanks a lot. The extent should be large enough to encompass all the >> features. Here comes the whole mapfile: >> >> MAP >> NAME "MIS WFS Server" >> STATUS ON >> SIZE 500 500 >> EXTENT -180 -90 180 90 >> SHAPEPATH "data/" >> IMAGECOLOR 255 255 255 >> CONFIG MS_ERRORFILE "log/mapserv.log" >> DEBUG 5 >> >> WEB >> ?IMAGEPATH "/var/www/tmp/" >> ?IMAGEURL "/tmp/" >> ?METADATA >> ? ?"wfs_title" ? ? ? ? ? ?"MIS WFS Server" ?## REQUIRED >> ? ?"wfs_onlineresource" ? "http://127.0.0.1/cgi-bin/ows?" >> ? ?"wfs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" >> ? ?"wms_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >> ? ?"wcs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >> ? ?"ows_enable_request" "*" >> ? ?"ows_updatesequence" "2011-29-05T00:24:00" >> ?END >> END >> >> PROJECTION >> ?"init=epsg:4326" >> END >> >> LAYER >> ?NAME "typ" >> ?METADATA >> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >> ? ?"wfs_include_items" "all" >> ? ?"gml_featureid" "CISLO" ## REQUIRED >> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >> ? ?"gml_types" "auto" >> ? ?"gml_geometries" "msGeometry" >> ? ?"gml_msGeometry_type" "polygon" >> ?END >> ?DATA typ.shp >> ?TYPE POLYGON >> ?STATUS ON >> ?PROJECTION >> ? ?"init=epsg:102067" >> ?END >> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >> ?CLASS >> ? ?NAME "Typ" >> ? ?STYLE >> ? ? ?COLOR 0 0 155 >> ? ? ?OUTLINECOLOR 120 120 120 >> ? ?END >> ? ?TEMPLATE "templates/typ_zver.html" >> ?END >> ?DEBUG 5 >> END # Layer >> >> LAYER >> ? ?NAME "hsrs" >> ? ?TYPE RASTER >> ? ?STATUS ON >> ? ?CONNECTION "http://www.bnhelp.cz/cgi-bin/crtopo?" >> ? ?DEBUG ON >> ? ?CONNECTIONTYPE WMS >> ? ?METADATA >> ? ? ? ?"wms_srs" ? ? ? ? ? ? "EPSG:4326" >> ? ? ? ?"wms_name" ? ? ? ? ? ?"obce,kraje,hr_cr,sidla,doprava" >> ? ? ? ?"wms_title" ? ? ? ? ? ?"CR Topo" >> ? ? ? ?"wms_server_version" ?"1.1.1" >> ? ? ? ?"wms_format" ? ? ? ? ?"image/png" >> ? ? ? ?"wms_latlonboundingbox" "11.9384 48.2337 18.957 51.3549" >> ? ?END >> END >> >> END # Map File >> >> Cheers, >> >> Michal >> >> 2011/8/25 Steve Lime : >>> What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve >>> >>> Sent from my iPad >>> >>> On Aug 24, 2011, at 7:58 AM, Michal ?r?dl wrote: >>> >>>> Hi all, >>>> >>>> I am trying to use FES filter for WFS layer and get no result, even >>>> thought I should get one. >>>> >>>> In my browser, I request >>>> >>>> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=>>> xmlns:ogc="http://www.opengis.net/ogc">ZVER2 >>>> >>>> and get >>>> >>>> >>> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>>> xmlns:gml="http://www.opengis.net/gml" >>>> xmlns:wfs="http://www.opengis.net/wfs" >>>> xmlns:ogc="http://www.opengis.net/ogc" >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >>>> http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 >>>> http://www.opengis.net/wfs >>>> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >>>> >>>> missing >>>> >>>> >>>> >>>> even though I do know, that features with ZVER=2 do exist. >>>> >>>> In the mapserver log file, I get >>>> >>>> [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned >>>> no results. No matching record(s) found. >>>> [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time >>>> (msLoadMap not incl.): 0.002s >>>> [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. >>>> [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. >>>> >>>> I have checked http://mapserver.org/errors.html#id2 with similar error >>>> "msQueryByPoint: search returned no results" and tried to create a >>>> simple template: >>>> >>>> >>>> >>>> ?[lrn] >>>> ?[ZVER] >>>> >>>> >>>> but with no effect. >>>> >>>> In the mapfile, there is >>>> >>>> LAYER >>>> ?NAME "typ" >>>> ?METADATA >>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>> ? ?"gml_types" "auto" >>>> ? ?"gml_geometries" "msGeometry" >>>> ? ?"gml_msGeometry_type" "polygon" >>>> ?END >>>> ?DATA typ.shp >>>> ?TYPE POLYGON >>>> ?STATUS ON >>>> ?PROJECTION >>>> ? ?"init=epsg:102067" >>>> ?END >>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>> ?CLASS >>>> ? ?NAME "Typ" >>>> ? ?STYLE >>>> ? ? ?COLOR 0 0 155 >>>> ? ? ?OUTLINECOLOR 120 120 120 >>>> ? ?END >>>> ? ?TEMPLATE "templates/typ_zver.html" >>>> ?END >>>> ?DEBUG 5 >>>> END # Layer >>>> >>>> What is wrong with my FES filter? How can I make it to run? >>>> >>>> Thanks a lot, >>>> >>>> Michal >>>> _______________________________________________ >>>> 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 petra.pietrasova at sitewell.cz Fri Aug 26 06:00:17 2011 From: petra.pietrasova at sitewell.cz (=?UTF-8?Q?Petra_Pietrasov=C3=A1?=) Date: Fri, 26 Aug 2011 06:00:17 -0700 (PDT) Subject: [mapserver-users] Dashed outline for polygon (migration to 6.0) Message-ID: <1314363617016-6728657.post@n2.nabble.com> Hi all, our mapserver is beeing migrated from version 5.6 (5.6.6) to version 6.0 (6.0.1). We have used "Migration Guide" for it. We have a problem with a polygon layer specifically with outline. We use dashed outline for this layer in the version 5.6. But in the version 6.0, we are not doing well with dashed symbol. We have tried everything but the outline is still simple not dashed. Can you help us? We don't know if this is a problem of new version or we are doing something in the wrong way. Thanks for your answer. Petra P. version 5.6 ############# SYMBOL ################# SYMBOL NAME "LINE12" TYPE ELLIPSE POINTS 1 1 END STYLE 10 10 10 10 END END ############## SYMBOL ################ ################################ ODTOKLINIE_NEJ ############################### LAYER . . . . CLASS NAME "odtokov? linie nejdel?? (?erven?)" STYLE SYMBOL "LINE12" COLOR 255 255 0 WIDTH 2 END END END ############################## END ODTOKLINIE_NEJ ############################### version 6.0 ############# SYMBOL ################# SYMBOL NAME "LINE12" TYPE ELLIPSE POINTS 1 1 END END ############## SYMBOL ################ ################################ ODTOKLINIE_NEJ ############################### LAYER . . . . CLASS NAME "odtokov? linie nejdel?? (?erven?)" STYLE SYMBOL "LINE12" COLOR 255 255 0 WIDTH 2 PATTERN 10 10 10 10 END END END END ############################## END ODTOKLINIE_NEJ ############################### -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Dashed-outline-for-polygon-migration-to-6-0-tp6728657p6728657.html Sent from the Mapserver - User mailing list archive at Nabble.com. From punk.kish at gmail.com Fri Aug 26 07:35:59 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Fri, 26 Aug 2011 09:35:59 -0500 Subject: [mapserver-users] dynamic layer classification Message-ID: hola, I need some guidance on this (and my MapServer foo is severely rusted). My immediate need is to color a polygon layer (held in PostGIS) based on an attribute in a separate table. The number of CLASSes is considerable, more than 80 or so. This leads to a longer term need -- The coloring of these polys is a crucial and universal need in my field of work, and it horrendously complicated determining the correct color, and the calculations for the appropriate color keep on changing from time to time. In other words, many different applications need this ability to classify polys based on certain attributes. So, I am creating a web app that does nothing but tell what color to use -- you give it a set of attributes, and the web app replies with the color. It would be a RESTful app, sending the color information back as JSON. How could I use this information with MapServer? In an ideal scenario, MapServer would query the data source, then, for each class in the layer, it would send a query to this color app, and the color app would tell MapServer what color to use to render the poly. The same app would be used by other apps, be they MapServer, OL, Polymaps, or even non-mapping apps such as R, etc. Suggestions on how to proceed? -- Puneet Kishor From sdlime at gmail.com Fri Aug 26 08:34:07 2011 From: sdlime at gmail.com (Steve Lime) Date: Fri, 26 Aug 2011 10:34:07 -0500 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: References: <84446DEF76453C439E9E97E438E13A6301DE93@suutari.haapa.mmm.fi> Message-ID: I would agree this sounds like a bug. The map extent *should* be projected to the layer extent and that's what's used to identify candidate features. Can you check what happens with a native mapserver attribute query in this case? If possible try this: 1) set your MAP projection back to geographic, and restore your geographic map extent. 2) add this line to the layer metadata 'qstring_validation' '^[0-9]$' 3) go to the following URL: http://localhost//cgi-bin/ows?map=[yourmapfile]&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 and see what happens. This will run a different query function msQueryByAttributes() that's not new to 6.0.x. Steve 2011/8/26 Michal ?r?dl : > Hi Jukka, > > the current settings returns expected result with &srsName=EPSG:4326 > as well. The original settings doesn't work neither with > &srsName=EPSG:4326 nor &srsName=EPSG::102067. > > Yes, it looks like there would be a problem in case of several WFS > layers with different projections of the source data. > > Cheers, > > Mike > > 2011/8/26 Rahkonen Jukka : >> Hi, >> >> Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. >> >> Could you have one more trial with the original settings and see if adding &srsName=EPSG:4326 or &srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with &srsName=EPSG:4326. >> >> -Jukka Rahkonen. >> >> Michal ?r?dl wrote: >> >> >>> Hi all, >> >>> problem solved. I needed to set: >> >>> EXTENT -905000 -1230000 -400000 -900000 >> >> and >> >> PROJECTION >> ## ?"init=epsg:4326" >> ?"init=epsg:102067" >> END >> >> (Epsg 102067 is the projection of the layer being filtered.) >> >> Thank you very much again, >> >> Michal >> >> >> 2011/8/25 Michal ?r?dl : >>> Hi Steve, >>> >>> Thanks a lot. The extent should be large enough to encompass all the >>> features. Here comes the whole mapfile: >>> >>> MAP >>> NAME "MIS WFS Server" >>> STATUS ON >>> SIZE 500 500 >>> EXTENT -180 -90 180 90 >>> SHAPEPATH "data/" >>> IMAGECOLOR 255 255 255 >>> CONFIG MS_ERRORFILE "log/mapserv.log" >>> DEBUG 5 >>> >>> WEB >>> ?IMAGEPATH "/var/www/tmp/" >>> ?IMAGEURL "/tmp/" >>> ?METADATA >>> ? ?"wfs_title" ? ? ? ? ? ?"MIS WFS Server" ?## REQUIRED >>> ? ?"wfs_onlineresource" ? "http://127.0.0.1/cgi-bin/ows?" >>> ? ?"wfs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" >>> ? ?"wms_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>> ? ?"wcs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>> ? ?"ows_enable_request" "*" >>> ? ?"ows_updatesequence" "2011-29-05T00:24:00" >>> ?END >>> END >>> >>> PROJECTION >>> ?"init=epsg:4326" >>> END >>> >>> LAYER >>> ?NAME "typ" >>> ?METADATA >>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>> ? ?"wfs_include_items" "all" >>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>> ? ?"gml_types" "auto" >>> ? ?"gml_geometries" "msGeometry" >>> ? ?"gml_msGeometry_type" "polygon" >>> ?END >>> ?DATA typ.shp >>> ?TYPE POLYGON >>> ?STATUS ON >>> ?PROJECTION >>> ? ?"init=epsg:102067" >>> ?END >>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>> ?CLASS >>> ? ?NAME "Typ" >>> ? ?STYLE >>> ? ? ?COLOR 0 0 155 >>> ? ? ?OUTLINECOLOR 120 120 120 >>> ? ?END >>> ? ?TEMPLATE "templates/typ_zver.html" >>> ?END >>> ?DEBUG 5 >>> END # Layer >>> >>> LAYER >>> ? ?NAME "hsrs" >>> ? ?TYPE RASTER >>> ? ?STATUS ON >>> ? ?CONNECTION "http://www.bnhelp.cz/cgi-bin/crtopo?" >>> ? ?DEBUG ON >>> ? ?CONNECTIONTYPE WMS >>> ? ?METADATA >>> ? ? ? ?"wms_srs" ? ? ? ? ? ? "EPSG:4326" >>> ? ? ? ?"wms_name" ? ? ? ? ? ?"obce,kraje,hr_cr,sidla,doprava" >>> ? ? ? ?"wms_title" ? ? ? ? ? ?"CR Topo" >>> ? ? ? ?"wms_server_version" ?"1.1.1" >>> ? ? ? ?"wms_format" ? ? ? ? ?"image/png" >>> ? ? ? ?"wms_latlonboundingbox" "11.9384 48.2337 18.957 51.3549" >>> ? ?END >>> END >>> >>> END # Map File >>> >>> Cheers, >>> >>> Michal >>> >>> 2011/8/25 Steve Lime : >>>> What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve >>>> >>>> Sent from my iPad >>>> >>>> On Aug 24, 2011, at 7:58 AM, Michal ?r?dl wrote: >>>> >>>>> Hi all, >>>>> >>>>> I am trying to use FES filter for WFS layer and get no result, even >>>>> thought I should get one. >>>>> >>>>> In my browser, I request >>>>> >>>>> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=>>>> xmlns:ogc="http://www.opengis.net/ogc">ZVER2 >>>>> >>>>> and get >>>>> >>>>> >>>> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>>>> xmlns:gml="http://www.opengis.net/gml" >>>>> xmlns:wfs="http://www.opengis.net/wfs" >>>>> xmlns:ogc="http://www.opengis.net/ogc" >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >>>>> http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 >>>>> http://www.opengis.net/wfs >>>>> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >>>>> >>>>> missing >>>>> >>>>> >>>>> >>>>> even though I do know, that features with ZVER=2 do exist. >>>>> >>>>> In the mapserver log file, I get >>>>> >>>>> [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned >>>>> no results. No matching record(s) found. >>>>> [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time >>>>> (msLoadMap not incl.): 0.002s >>>>> [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. >>>>> [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. >>>>> >>>>> I have checked http://mapserver.org/errors.html#id2 with similar error >>>>> "msQueryByPoint: search returned no results" and tried to create a >>>>> simple template: >>>>> >>>>> >>>>> >>>>> ?[lrn] >>>>> ?[ZVER] >>>>> >>>>> >>>>> but with no effect. >>>>> >>>>> In the mapfile, there is >>>>> >>>>> LAYER >>>>> ?NAME "typ" >>>>> ?METADATA >>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>> ? ?"gml_types" "auto" >>>>> ? ?"gml_geometries" "msGeometry" >>>>> ? ?"gml_msGeometry_type" "polygon" >>>>> ?END >>>>> ?DATA typ.shp >>>>> ?TYPE POLYGON >>>>> ?STATUS ON >>>>> ?PROJECTION >>>>> ? ?"init=epsg:102067" >>>>> ?END >>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>> ?CLASS >>>>> ? ?NAME "Typ" >>>>> ? ?STYLE >>>>> ? ? ?COLOR 0 0 155 >>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>> ? ?END >>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>> ?END >>>>> ?DEBUG 5 >>>>> END # Layer >>>>> >>>>> What is wrong with my FES filter? How can I make it to run? >>>>> >>>>> Thanks a lot, >>>>> >>>>> Michal >>>>> _______________________________________________ >>>>> 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 acarolinagc at gmail.com Fri Aug 26 08:40:14 2011 From: acarolinagc at gmail.com (Amalia Carolina Canavire) Date: Fri, 26 Aug 2011 12:40:14 -0300 Subject: [mapserver-users] Error in WMS server mswmsloadgetmapparams wms server error. invalid layer s given in the layers parameter Message-ID: Hi,i dont good speak english. i have a map file with one layer default, i have added dynamically, one layer , that i get of consult a data base, into this map file, but i have got one error "wms mswmsloadgetmapparams wms server invalid layer s given in the layers parameter" en php $nombreMapa ="dmWmsDB2"; $jMap = ms_newMapObj("/var/www/gisPrueba1/".$nombreMapa.".map"); //$wms_title=$jMap->web->metadata->get("wms_title"); $wms_srs=strtok(trim($jMap->web->metadata->get("wms_srs")), " "); $wms_onlineresource=$jMap->web->metadata->get("wms_onlineresource"); $map_extent=$jMap->extent; $layer = $jMap->getLayerByName('filtro'); $wms_title=$layer->metadata->get("wms_title"); $clasp = $layer->getClass('parcela'); //$clasp->setExpression($filtro); $image=$jMap->draw(); if($query!=""){ //$layer->set( "DATA","the_geom from (SELECT * FROM alachua WHERE ".$_POST['atributo']."= '".$_POST['condicion']."') as subquery using unique gid using srid=4326"); $jLayer = ms_newLayerObj($jMap); $jLayer->set( "name", "atributo"); $jLayer->set( "type", MS_LAYER_POLYGON); $jLayer->set( "status", MS_ON); //$jLayer->set( "connectiontype",MS_POSTGIS ); $jLayer->setConnectionType(MS_POSTGIS); $jLayer->set( "connection","user=xxxx password=xxxx host=localhost port=xxxx dbname=template_postgis" ); $jLayer->set( "data","the_geom from (SELECT * FROM alachua WHERE ".$_POST['atributo']."= '".$_POST['condicion']."') as subquery using unique gid using srid=4326"); $jLayer->set("maxscale",'-0.1'); $jLayer->set("minscale",'-0.1'); $jLayer->set("transparency",'100'); $jLayer->set("sizeunits",'pixels'); //Creamos un classObj dentro del LayerObj $jLayer->set("classitem",$_POST['atributo']); $jLayer->setProjection("epsg:4326"); $jClass = ms_newClassObj($jLayer); //Creamos un styleObj dentro del classObj $jStyle = ms_newStyleObj($jClass); $jStyle->color->setRGB(00, 99, 0); $jStyle->outlinecolor->setRGB(0, 0, 0); $jLayer->metadata->set('wms_title', 'atributo'); $jLayer->metadata->set('wms_abstract', 'generated by gvSIG'); $jLayer->metadata->set('wms_extent', '529495.77 602500.66 588409.96 660674.98'); $jLayer->metadata->set('gml_include_items', 'all'); $jImagen = $jMap->draw(); ********** var NASAwms1 = new OpenLayers.Layer.WMS("atributo", " http://localhost/cgi-bin/mapserv?map=%2Fvar%2Fwww%2FgisPrueba1%2FdmWmsDB2.map", {layers: 'atributo', format: 'image/png', projection:new OpenLayers.Projection("EPSG:4623"),transparent: true},{isBaseLayer: false, visibility:true}); } -------------- next part -------------- An HTML attachment was scrubbed... URL: From michal.sredl at gmail.com Fri Aug 26 08:50:37 2011 From: michal.sredl at gmail.com (=?ISO-8859-2?B?TWljaGFsIKly6WRs?=) Date: Fri, 26 Aug 2011 17:50:37 +0200 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: References: <84446DEF76453C439E9E97E438E13A6301DE93@suutari.haapa.mmm.fi> Message-ID: Hi Steve, regardless of the projection settings, I get the following result: For http://localhost//cgi-bin/ows?map=mapfile&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 I see msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN validation failed. msEvalRegex(): Regular expression error. String failed expression test. And for http://localhost//cgi-bin/ows?mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 I see mapserv(): Web application error. Parameter 'qstring' value fails to validate. msValidateParameter(): Regular expression error. Parameter pattern validation failed. Cheers, Michal 2011/8/26 Steve Lime : > I would agree this sounds like a bug. The map extent *should* be > projected to the layer extent and that's what's used to identify > candidate features. Can you check what happens with a native mapserver > attribute query in this case? If possible try this: > > 1) set your MAP projection back to geographic, and restore your > geographic map extent. > 2) add this line to the layer metadata 'qstring_validation' '^[0-9]$' > 3) go to the following URL: > > ?http://localhost//cgi-bin/ows?map=[yourmapfile]&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 > > and see what happens. > > This will run a different query function msQueryByAttributes() that's > not new to 6.0.x. > > Steve > > 2011/8/26 Michal ?r?dl : >> Hi Jukka, >> >> the current settings returns expected result with &srsName=EPSG:4326 >> as well. The original settings doesn't work neither with >> &srsName=EPSG:4326 nor &srsName=EPSG::102067. >> >> Yes, it looks like there would be a problem in case of several WFS >> layers with different projections of the source data. >> >> Cheers, >> >> Mike >> >> 2011/8/26 Rahkonen Jukka : >>> Hi, >>> >>> Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. >>> >>> Could you have one more trial with the original settings and see if adding &srsName=EPSG:4326 or &srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with &srsName=EPSG:4326. >>> >>> -Jukka Rahkonen. >>> >>> Michal ?r?dl wrote: >>> >>> >>>> Hi all, >>> >>>> problem solved. I needed to set: >>> >>>> EXTENT -905000 -1230000 -400000 -900000 >>> >>> and >>> >>> PROJECTION >>> ## ?"init=epsg:4326" >>> ?"init=epsg:102067" >>> END >>> >>> (Epsg 102067 is the projection of the layer being filtered.) >>> >>> Thank you very much again, >>> >>> Michal >>> >>> >>> 2011/8/25 Michal ?r?dl : >>>> Hi Steve, >>>> >>>> Thanks a lot. The extent should be large enough to encompass all the >>>> features. Here comes the whole mapfile: >>>> >>>> MAP >>>> NAME "MIS WFS Server" >>>> STATUS ON >>>> SIZE 500 500 >>>> EXTENT -180 -90 180 90 >>>> SHAPEPATH "data/" >>>> IMAGECOLOR 255 255 255 >>>> CONFIG MS_ERRORFILE "log/mapserv.log" >>>> DEBUG 5 >>>> >>>> WEB >>>> ?IMAGEPATH "/var/www/tmp/" >>>> ?IMAGEURL "/tmp/" >>>> ?METADATA >>>> ? ?"wfs_title" ? ? ? ? ? ?"MIS WFS Server" ?## REQUIRED >>>> ? ?"wfs_onlineresource" ? "http://127.0.0.1/cgi-bin/ows?" >>>> ? ?"wfs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" >>>> ? ?"wms_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>> ? ?"wcs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>> ? ?"ows_enable_request" "*" >>>> ? ?"ows_updatesequence" "2011-29-05T00:24:00" >>>> ?END >>>> END >>>> >>>> PROJECTION >>>> ?"init=epsg:4326" >>>> END >>>> >>>> LAYER >>>> ?NAME "typ" >>>> ?METADATA >>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>> ? ?"wfs_include_items" "all" >>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>> ? ?"gml_types" "auto" >>>> ? ?"gml_geometries" "msGeometry" >>>> ? ?"gml_msGeometry_type" "polygon" >>>> ?END >>>> ?DATA typ.shp >>>> ?TYPE POLYGON >>>> ?STATUS ON >>>> ?PROJECTION >>>> ? ?"init=epsg:102067" >>>> ?END >>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>> ?CLASS >>>> ? ?NAME "Typ" >>>> ? ?STYLE >>>> ? ? ?COLOR 0 0 155 >>>> ? ? ?OUTLINECOLOR 120 120 120 >>>> ? ?END >>>> ? ?TEMPLATE "templates/typ_zver.html" >>>> ?END >>>> ?DEBUG 5 >>>> END # Layer >>>> >>>> LAYER >>>> ? ?NAME "hsrs" >>>> ? ?TYPE RASTER >>>> ? ?STATUS ON >>>> ? ?CONNECTION "http://www.bnhelp.cz/cgi-bin/crtopo?" >>>> ? ?DEBUG ON >>>> ? ?CONNECTIONTYPE WMS >>>> ? ?METADATA >>>> ? ? ? ?"wms_srs" ? ? ? ? ? ? "EPSG:4326" >>>> ? ? ? ?"wms_name" ? ? ? ? ? ?"obce,kraje,hr_cr,sidla,doprava" >>>> ? ? ? ?"wms_title" ? ? ? ? ? ?"CR Topo" >>>> ? ? ? ?"wms_server_version" ?"1.1.1" >>>> ? ? ? ?"wms_format" ? ? ? ? ?"image/png" >>>> ? ? ? ?"wms_latlonboundingbox" "11.9384 48.2337 18.957 51.3549" >>>> ? ?END >>>> END >>>> >>>> END # Map File >>>> >>>> Cheers, >>>> >>>> Michal >>>> >>>> 2011/8/25 Steve Lime : >>>>> What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve >>>>> >>>>> Sent from my iPad >>>>> >>>>> On Aug 24, 2011, at 7:58 AM, Michal ?r?dl wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> I am trying to use FES filter for WFS layer and get no result, even >>>>>> thought I should get one. >>>>>> >>>>>> In my browser, I request >>>>>> >>>>>> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=>>>>> xmlns:ogc="http://www.opengis.net/ogc">ZVER2 >>>>>> >>>>>> and get >>>>>> >>>>>> >>>>> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>>>>> xmlns:gml="http://www.opengis.net/gml" >>>>>> xmlns:wfs="http://www.opengis.net/wfs" >>>>>> xmlns:ogc="http://www.opengis.net/ogc" >>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>>> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >>>>>> http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 >>>>>> http://www.opengis.net/wfs >>>>>> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >>>>>> >>>>>> missing >>>>>> >>>>>> >>>>>> >>>>>> even though I do know, that features with ZVER=2 do exist. >>>>>> >>>>>> In the mapserver log file, I get >>>>>> >>>>>> [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned >>>>>> no results. No matching record(s) found. >>>>>> [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time >>>>>> (msLoadMap not incl.): 0.002s >>>>>> [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. >>>>>> [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. >>>>>> >>>>>> I have checked http://mapserver.org/errors.html#id2 with similar error >>>>>> "msQueryByPoint: search returned no results" and tried to create a >>>>>> simple template: >>>>>> >>>>>> >>>>>> >>>>>> ?[lrn] >>>>>> ?[ZVER] >>>>>> >>>>>> >>>>>> but with no effect. >>>>>> >>>>>> In the mapfile, there is >>>>>> >>>>>> LAYER >>>>>> ?NAME "typ" >>>>>> ?METADATA >>>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>>> ? ?"gml_types" "auto" >>>>>> ? ?"gml_geometries" "msGeometry" >>>>>> ? ?"gml_msGeometry_type" "polygon" >>>>>> ?END >>>>>> ?DATA typ.shp >>>>>> ?TYPE POLYGON >>>>>> ?STATUS ON >>>>>> ?PROJECTION >>>>>> ? ?"init=epsg:102067" >>>>>> ?END >>>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>>> ?CLASS >>>>>> ? ?NAME "Typ" >>>>>> ? ?STYLE >>>>>> ? ? ?COLOR 0 0 155 >>>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>>> ? ?END >>>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>>> ?END >>>>>> ?DEBUG 5 >>>>>> END # Layer >>>>>> >>>>>> What is wrong with my FES filter? How can I make it to run? >>>>>> >>>>>> Thanks a lot, >>>>>> >>>>>> Michal >>>>>> _______________________________________________ >>>>>> 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 acarolinagc at gmail.com Fri Aug 26 08:54:52 2011 From: acarolinagc at gmail.com (Amalia Carolina Canavire) Date: Fri, 26 Aug 2011 12:54:52 -0300 Subject: [mapserver-users] Fwd: Error in WMS server mswmsloadgetmapparams wms server error. invalid layer s given in the layers parameter In-Reply-To: References: Message-ID: Hi,i dont good speak english. i have a map file with one layer default, i have added dynamically, one layer , that i get of consult a data base, into this map file, but i have got one error "wms mswmsloadgetmapparams wms server invalid layer s given in the layers parameter" en php $nombreMapa ="dmWmsDB2"; $jMap = ms_newMapObj("/var/www/gisPrueba1/".$nombreMapa.".map"); //$wms_title=$jMap->web->metadata->get("wms_title"); $wms_srs=strtok(trim($jMap->web->metadata->get("wms_srs")), " "); $wms_onlineresource=$jMap->web->metadata->get("wms_onlineresource"); $map_extent=$jMap->extent; $layer = $jMap->getLayerByName('filtro'); $wms_title=$layer->metadata->get("wms_title"); $clasp = $layer->getClass('parcela'); //$clasp->setExpression($filtro); $image=$jMap->draw(); if($query!=""){ //$layer->set( "DATA","the_geom from (SELECT * FROM alachua WHERE ".$_POST['atributo']."= '".$_POST['condicion']."') as subquery using unique gid using srid=4326"); $jLayer = ms_newLayerObj($jMap); $jLayer->set( "name", "atributo"); $jLayer->set( "type", MS_LAYER_POLYGON); $jLayer->set( "status", MS_ON); //$jLayer->set( "connectiontype",MS_POSTGIS ); $jLayer->setConnectionType(MS_POSTGIS); $jLayer->set( "connection","user=xxxx password=xxxx host=localhost port=xxxx dbname=template_postgis" ); $jLayer->set( "data","the_geom from (SELECT * FROM alachua WHERE ".$_POST['atributo']."= '".$_POST['condicion']."') as subquery using unique gid using srid=4326"); $jLayer->set("maxscale",'-0.1'); $jLayer->set("minscale",'-0.1'); $jLayer->set("transparency",'100'); $jLayer->set("sizeunits",'pixels'); //Creamos un classObj dentro del LayerObj $jLayer->set("classitem",$_POST['atributo']); $jLayer->setProjection("epsg:4326"); $jClass = ms_newClassObj($jLayer); //Creamos un styleObj dentro del classObj $jStyle = ms_newStyleObj($jClass); $jStyle->color->setRGB(00, 99, 0); $jStyle->outlinecolor->setRGB(0, 0, 0); $jLayer->metadata->set('wms_title', 'atributo'); $jLayer->metadata->set('wms_abstract', 'generated by gvSIG'); $jLayer->metadata->set('wms_extent', '529495.77 602500.66 588409.96 660674.98'); $jLayer->metadata->set('gml_include_items', 'all'); $jImagen = $jMap->draw(); ********** var NASAwms1 = new OpenLayers.Layer.WMS("atributo", " http://localhost/cgi-bin/mapserv?map=%2Fvar%2Fwww%2FgisPrueba1%2FdmWmsDB2.map", {layers: 'atributo', format: 'image/png', projection:new OpenLayers.Projection("EPSG:4623"),transparent: true},{isBaseLayer: false, visibility:true}); } -- *************** * :) *sonrei que te queda lindo :):):):): **amy **cgc ************************** * -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Fri Aug 26 08:54:58 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Fri, 26 Aug 2011 15:54:58 +0000 Subject: [mapserver-users] Error in WMS server mswmsloadgetmapparams wms server error. invalid layer s given in the layers parameter In-Reply-To: References: Message-ID: <84446DEF76453C439E9E97E438E13A6301E04F@suutari.haapa.mmm.fi> Hi, I do not understand php but my guess is that WMS title for a layer is used instead of WMS name. -Jukka Rahkonen- ________________________________ L?hett?j?: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] k?ytt?j?n Amalia Carolina Canavire [acarolinagc at gmail.com] puolesta L?hetetty: 26. elokuuta 2011 18:40 Vastaanottaja: mapserver-users at lists.osgeo.org Aihe: [mapserver-users] Error in WMS server mswmsloadgetmapparams wms server error. invalid layer s given in the layers parameter Hi,i dont good speak english. i have a map file with one layer default, i have added dynamically, one layer , that i get of consult a data base, into this map file, but i have got one error "wms mswmsloadgetmapparams wms server invalid layer s given in the layers parameter" en php $nombreMapa ="dmWmsDB2"; $jMap = ms_newMapObj("/var/www/gisPrueba1/".$nombreMapa.".map"); //$wms_title=$jMap->web->metadata->get("wms_title"); $wms_srs=strtok(trim($jMap->web->metadata->get("wms_srs")), " "); $wms_onlineresource=$jMap->web->metadata->get("wms_onlineresource"); $map_extent=$jMap->extent; $layer = $jMap->getLayerByName('filtro'); $wms_title=$layer->metadata->get("wms_title"); $clasp = $layer->getClass('parcela'); //$clasp->setExpression($filtro); $image=$jMap->draw(); if($query!=""){ //$layer->set( "DATA","the_geom from (SELECT * FROM alachua WHERE ".$_POST['atributo']."= '".$_POST['condicion']."') as subquery using unique gid using srid=4326"); $jLayer = ms_newLayerObj($jMap); $jLayer->set( "name", "atributo"); $jLayer->set( "type", MS_LAYER_POLYGON); $jLayer->set( "status", MS_ON); //$jLayer->set( "connectiontype",MS_POSTGIS ); $jLayer->setConnectionType(MS_POSTGIS); $jLayer->set( "connection","user=xxxx password=xxxx host=localhost port=xxxx dbname=template_postgis" ); $jLayer->set( "data","the_geom from (SELECT * FROM alachua WHERE ".$_POST['atributo']."= '".$_POST['condicion']."') as subquery using unique gid using srid=4326"); $jLayer->set("maxscale",'-0.1'); $jLayer->set("minscale",'-0.1'); $jLayer->set("transparency",'100'); $jLayer->set("sizeunits",'pixels'); //Creamos un classObj dentro del LayerObj $jLayer->set("classitem",$_POST['atributo']); $jLayer->setProjection("epsg:4326"); $jClass = ms_newClassObj($jLayer); //Creamos un styleObj dentro del classObj $jStyle = ms_newStyleObj($jClass); $jStyle->color->setRGB(00, 99, 0); $jStyle->outlinecolor->setRGB(0, 0, 0); $jLayer->metadata->set('wms_title', 'atributo'); $jLayer->metadata->set('wms_abstract', 'generated by gvSIG'); $jLayer->metadata->set('wms_extent', '529495.77 602500.66 588409.96 660674.98'); $jLayer->metadata->set('gml_include_items', 'all'); $jImagen = $jMap->draw(); ********** var NASAwms1 = new OpenLayers.Layer.WMS("atributo", "http://localhost/cgi-bin/mapserv?map=%2Fvar%2Fwww%2FgisPrueba1%2FdmWmsDB2.map", {layers: 'atributo', format: 'image/png', projection:new OpenLayers.Projection("EPSG:4623"),transparent: true},{isBaseLayer: false, visibility:true}); } From bfraser at geoanalytic.com Fri Aug 26 10:12:45 2011 From: bfraser at geoanalytic.com (Brent Fraser) Date: Fri, 26 Aug 2011 11:12:45 -0600 Subject: [mapserver-users] Dashed outline for polygon (migration to 6.0) In-Reply-To: <1314363617016-6728657.post@n2.nabble.com> References: <1314363617016-6728657.post@n2.nabble.com> Message-ID: <4E57D40D.6000104@geoanalytic.com> Perta, I use the following for dashed lines with v6 (AGG/PNG output) SYMBOL NAME 'dashed5' TYPE SIMPLE END LAYER # Trails TYPE LINE CLASS NAME 'Trails' STYLE SYMBOL "dashed5" PATTERN 5 5 END WIDTH 1 COLOR 80 80 80 END END END Best Regards, Brent Fraser On 8/26/2011 7:00 AM, Petra Pietrasov? wrote: > Hi all, > > our mapserver is beeing migrated from version 5.6 (5.6.6) to version 6.0 > (6.0.1). > We have used "Migration Guide" for it. > We have a problem with a polygon layer specifically with outline. We use > dashed outline for this layer in the version 5.6. > But in the version 6.0, we are not doing well with dashed symbol. We have > tried everything but the outline is still simple not dashed. > > Can you help us? We don't know if this is a problem of new version or we are > doing something in the wrong way. > > Thanks for your answer. > > Petra P. > > > > > version 5.6 > > ############# SYMBOL ################# > SYMBOL > NAME "LINE12" > TYPE ELLIPSE > POINTS > 1 1 > END > STYLE > 10 10 10 10 > END > END > ############## SYMBOL ################ > > > > ################################ ODTOKLINIE_NEJ > ############################### > LAYER > . . . . > CLASS > NAME "odtokov? linie nejdel?? (?erven?)" > > STYLE > SYMBOL "LINE12" > COLOR 255 255 0 > WIDTH 2 > END > > END > > END > ############################## END ODTOKLINIE_NEJ > ############################### > > > > > version 6.0 > > ############# SYMBOL ################# > SYMBOL > NAME "LINE12" > TYPE ELLIPSE > POINTS > 1 1 > END > END > ############## SYMBOL ################ > > > > ################################ ODTOKLINIE_NEJ > ############################### > LAYER > . . . . > CLASS > NAME "odtokov? linie nejdel?? (?erven?)" > > STYLE > SYMBOL "LINE12" > COLOR 255 255 0 > WIDTH 2 > PATTERN > 10 10 10 10 > END > END > > END > > END > ############################## END ODTOKLINIE_NEJ > ############################### > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/Dashed-outline-for-polygon-migration-to-6-0-tp6728657p6728657.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 bfraser at geoanalytic.com Fri Aug 26 10:39:08 2011 From: bfraser at geoanalytic.com (Brent Fraser) Date: Fri, 26 Aug 2011 11:39:08 -0600 Subject: [mapserver-users] dynamic layer classification In-Reply-To: References: Message-ID: <4E57DA3C.4040508@geoanalytic.com> Puneet, I think currently the short answer is Mapscript. I had a similar need last year (http://lists.osgeo.org/pipermail/mapserver-users/2010-March/065050.html) where I needed to have the symbology stored in the database and the classes varied over time (users created new class defs in the database via a web page). Steve Lime suggested an enahancement where classes were defined by a SLD file or url: LAYER NAME 'extreme-symbology' DATA ... CONNECTION ... SLD 'some flle' or 'some url' ... END which is an elegant solution, but currently not implemented... Best Regards, Brent Fraser On 8/26/2011 8:35 AM, Mr. Puneet Kishor wrote: > hola, > > I need some guidance on this (and my MapServer foo is severely rusted). My immediate need is to color a polygon layer (held in PostGIS) based on an attribute in a separate table. The number of CLASSes is considerable, more than 80 or so. This leads to a longer term need -- > > The coloring of these polys is a crucial and universal need in my field of work, and it horrendously complicated determining the correct color, and the calculations for the appropriate color keep on changing from time to time. In other words, many different applications need this ability to classify polys based on certain attributes. So, I am creating a web app that does nothing but tell what color to use -- you give it a set of attributes, and the web app replies with the color. It would be a RESTful app, sending the color information back as JSON. How could I use this information with MapServer? > > In an ideal scenario, MapServer would query the data source, then, for each class in the layer, it would send a query to this color app, and the color app would tell MapServer what color to use to render the poly. The same app would be used by other apps, be they MapServer, OL, Polymaps, or even non-mapping apps such as R, etc. > > Suggestions on how to proceed? > > -- > Puneet Kishor > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From sdlime at gmail.com Fri Aug 26 10:41:52 2011 From: sdlime at gmail.com (Steve Lime) Date: Fri, 26 Aug 2011 12:41:52 -0500 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: References: <84446DEF76453C439E9E97E438E13A6301DE93@suutari.haapa.mmm.fi> Message-ID: You must have a default mapfile set in apache, that's cool. Use the second URL. Change qstring_validation to qstring_validation_pattern from my first message, my mistake. Steve 2011/8/26 Michal ?r?dl : > Hi Steve, > > regardless of the projection settings, I get the following result: > > For > > ?http://localhost//cgi-bin/ows?map=mapfile&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 > > I see > > ?msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN > validation failed. msEvalRegex(): Regular expression error. String > failed expression test. > > And for > > ?http://localhost//cgi-bin/ows?mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 > > I see > > ?mapserv(): Web application error. Parameter 'qstring' value fails to > validate. msValidateParameter(): Regular expression error. Parameter > pattern validation failed. > > Cheers, > > Michal > > > 2011/8/26 Steve Lime : >> I would agree this sounds like a bug. The map extent *should* be >> projected to the layer extent and that's what's used to identify >> candidate features. Can you check what happens with a native mapserver >> attribute query in this case? If possible try this: >> >> 1) set your MAP projection back to geographic, and restore your >> geographic map extent. >> 2) add this line to the layer metadata 'qstring_validation' '^[0-9]$' >> 3) go to the following URL: >> >> ?http://localhost//cgi-bin/ows?map=[yourmapfile]&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >> >> and see what happens. >> >> This will run a different query function msQueryByAttributes() that's >> not new to 6.0.x. >> >> Steve >> >> 2011/8/26 Michal ?r?dl : >>> Hi Jukka, >>> >>> the current settings returns expected result with &srsName=EPSG:4326 >>> as well. The original settings doesn't work neither with >>> &srsName=EPSG:4326 nor &srsName=EPSG::102067. >>> >>> Yes, it looks like there would be a problem in case of several WFS >>> layers with different projections of the source data. >>> >>> Cheers, >>> >>> Mike >>> >>> 2011/8/26 Rahkonen Jukka : >>>> Hi, >>>> >>>> Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. >>>> >>>> Could you have one more trial with the original settings and see if adding &srsName=EPSG:4326 or &srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with &srsName=EPSG:4326. >>>> >>>> -Jukka Rahkonen. >>>> >>>> Michal ?r?dl wrote: >>>> >>>> >>>>> Hi all, >>>> >>>>> problem solved. I needed to set: >>>> >>>>> EXTENT -905000 -1230000 -400000 -900000 >>>> >>>> and >>>> >>>> PROJECTION >>>> ## ?"init=epsg:4326" >>>> ?"init=epsg:102067" >>>> END >>>> >>>> (Epsg 102067 is the projection of the layer being filtered.) >>>> >>>> Thank you very much again, >>>> >>>> Michal >>>> >>>> >>>> 2011/8/25 Michal ?r?dl : >>>>> Hi Steve, >>>>> >>>>> Thanks a lot. The extent should be large enough to encompass all the >>>>> features. Here comes the whole mapfile: >>>>> >>>>> MAP >>>>> NAME "MIS WFS Server" >>>>> STATUS ON >>>>> SIZE 500 500 >>>>> EXTENT -180 -90 180 90 >>>>> SHAPEPATH "data/" >>>>> IMAGECOLOR 255 255 255 >>>>> CONFIG MS_ERRORFILE "log/mapserv.log" >>>>> DEBUG 5 >>>>> >>>>> WEB >>>>> ?IMAGEPATH "/var/www/tmp/" >>>>> ?IMAGEURL "/tmp/" >>>>> ?METADATA >>>>> ? ?"wfs_title" ? ? ? ? ? ?"MIS WFS Server" ?## REQUIRED >>>>> ? ?"wfs_onlineresource" ? "http://127.0.0.1/cgi-bin/ows?" >>>>> ? ?"wfs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" >>>>> ? ?"wms_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>>> ? ?"wcs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>>> ? ?"ows_enable_request" "*" >>>>> ? ?"ows_updatesequence" "2011-29-05T00:24:00" >>>>> ?END >>>>> END >>>>> >>>>> PROJECTION >>>>> ?"init=epsg:4326" >>>>> END >>>>> >>>>> LAYER >>>>> ?NAME "typ" >>>>> ?METADATA >>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>> ? ?"wfs_include_items" "all" >>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>> ? ?"gml_types" "auto" >>>>> ? ?"gml_geometries" "msGeometry" >>>>> ? ?"gml_msGeometry_type" "polygon" >>>>> ?END >>>>> ?DATA typ.shp >>>>> ?TYPE POLYGON >>>>> ?STATUS ON >>>>> ?PROJECTION >>>>> ? ?"init=epsg:102067" >>>>> ?END >>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>> ?CLASS >>>>> ? ?NAME "Typ" >>>>> ? ?STYLE >>>>> ? ? ?COLOR 0 0 155 >>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>> ? ?END >>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>> ?END >>>>> ?DEBUG 5 >>>>> END # Layer >>>>> >>>>> LAYER >>>>> ? ?NAME "hsrs" >>>>> ? ?TYPE RASTER >>>>> ? ?STATUS ON >>>>> ? ?CONNECTION "http://www.bnhelp.cz/cgi-bin/crtopo?" >>>>> ? ?DEBUG ON >>>>> ? ?CONNECTIONTYPE WMS >>>>> ? ?METADATA >>>>> ? ? ? ?"wms_srs" ? ? ? ? ? ? "EPSG:4326" >>>>> ? ? ? ?"wms_name" ? ? ? ? ? ?"obce,kraje,hr_cr,sidla,doprava" >>>>> ? ? ? ?"wms_title" ? ? ? ? ? ?"CR Topo" >>>>> ? ? ? ?"wms_server_version" ?"1.1.1" >>>>> ? ? ? ?"wms_format" ? ? ? ? ?"image/png" >>>>> ? ? ? ?"wms_latlonboundingbox" "11.9384 48.2337 18.957 51.3549" >>>>> ? ?END >>>>> END >>>>> >>>>> END # Map File >>>>> >>>>> Cheers, >>>>> >>>>> Michal >>>>> >>>>> 2011/8/25 Steve Lime : >>>>>> What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve >>>>>> >>>>>> Sent from my iPad >>>>>> >>>>>> On Aug 24, 2011, at 7:58 AM, Michal ?r?dl wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> I am trying to use FES filter for WFS layer and get no result, even >>>>>>> thought I should get one. >>>>>>> >>>>>>> In my browser, I request >>>>>>> >>>>>>> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=>>>>>> xmlns:ogc="http://www.opengis.net/ogc">ZVER2 >>>>>>> >>>>>>> and get >>>>>>> >>>>>>> >>>>>> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>>>>>> xmlns:gml="http://www.opengis.net/gml" >>>>>>> xmlns:wfs="http://www.opengis.net/wfs" >>>>>>> xmlns:ogc="http://www.opengis.net/ogc" >>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>>>> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >>>>>>> http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 >>>>>>> http://www.opengis.net/wfs >>>>>>> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >>>>>>> >>>>>>> missing >>>>>>> >>>>>>> >>>>>>> >>>>>>> even though I do know, that features with ZVER=2 do exist. >>>>>>> >>>>>>> In the mapserver log file, I get >>>>>>> >>>>>>> [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned >>>>>>> no results. No matching record(s) found. >>>>>>> [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time >>>>>>> (msLoadMap not incl.): 0.002s >>>>>>> [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. >>>>>>> [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. >>>>>>> >>>>>>> I have checked http://mapserver.org/errors.html#id2 with similar error >>>>>>> "msQueryByPoint: search returned no results" and tried to create a >>>>>>> simple template: >>>>>>> >>>>>>> >>>>>>> >>>>>>> ?[lrn] >>>>>>> ?[ZVER] >>>>>>> >>>>>>> >>>>>>> but with no effect. >>>>>>> >>>>>>> In the mapfile, there is >>>>>>> >>>>>>> LAYER >>>>>>> ?NAME "typ" >>>>>>> ?METADATA >>>>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>>>> ? ?"gml_types" "auto" >>>>>>> ? ?"gml_geometries" "msGeometry" >>>>>>> ? ?"gml_msGeometry_type" "polygon" >>>>>>> ?END >>>>>>> ?DATA typ.shp >>>>>>> ?TYPE POLYGON >>>>>>> ?STATUS ON >>>>>>> ?PROJECTION >>>>>>> ? ?"init=epsg:102067" >>>>>>> ?END >>>>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>>>> ?CLASS >>>>>>> ? ?NAME "Typ" >>>>>>> ? ?STYLE >>>>>>> ? ? ?COLOR 0 0 155 >>>>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>>>> ? ?END >>>>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>>>> ?END >>>>>>> ?DEBUG 5 >>>>>>> END # Layer >>>>>>> >>>>>>> What is wrong with my FES filter? How can I make it to run? >>>>>>> >>>>>>> Thanks a lot, >>>>>>> >>>>>>> Michal >>>>>>> _______________________________________________ >>>>>>> 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 punk.kish at gmail.com Fri Aug 26 10:50:57 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Fri, 26 Aug 2011 12:50:57 -0500 Subject: [mapserver-users] dynamic layer classification In-Reply-To: <4E57DA3C.4040508@geoanalytic.com> References: <4E57DA3C.4040508@geoanalytic.com> Message-ID: <114DB458-5F0B-45AB-B3EE-C580A8891E5F@gmail.com> On Aug 26, 2011, at 12:39 PM, Brent Fraser wrote: > Puneet, > > I think currently the short answer is Mapscript. > > I had a similar need last year (http://lists.osgeo.org/pipermail/mapserver-users/2010-March/065050.html) where I needed to have the symbology stored in the database and the classes varied over time (users created new class defs in the database via a web page). > > Steve Lime suggested an enahancement where classes were defined by a SLD file or url: > > LAYER > NAME 'extreme-symbology' > DATA ... > CONNECTION ... > SLD 'some flle' or 'some url' > ... > END > > which is an elegant solution, but currently not implemented... Yes, that would be a very nice solution, precisely the kind of thing I am looking for. In fact, even better would be LAYER .. SLD 'some expression' where 'some expression' could be stored in a file, or retrieve via a URL, or from a db query. But, until that comes along, I could and will use MapScript. I compiled MS 6.0.1 yesterday, and discovered, much to my delight, that MapScript in my favorite programming language (the one that begins with P) is alive and doing well. So, how would I go about implementing this in MapScript? I would have to create the layer definition on the fly, no? Any pointers? > > Best Regards, > Brent Fraser > > > On 8/26/2011 8:35 AM, Mr. Puneet Kishor wrote: >> hola, >> >> I need some guidance on this (and my MapServer foo is severely rusted). My immediate need is to color a polygon layer (held in PostGIS) based on an attribute in a separate table. The number of CLASSes is considerable, more than 80 or so. This leads to a longer term need -- >> >> The coloring of these polys is a crucial and universal need in my field of work, and it horrendously complicated determining the correct color, and the calculations for the appropriate color keep on changing from time to time. In other words, many different applications need this ability to classify polys based on certain attributes. So, I am creating a web app that does nothing but tell what color to use -- you give it a set of attributes, and the web app replies with the color. It would be a RESTful app, sending the color information back as JSON. How could I use this information with MapServer? >> >> In an ideal scenario, MapServer would query the data source, then, for each class in the layer, it would send a query to this color app, and the color app would tell MapServer what color to use to render the poly. The same app would be used by other apps, be they MapServer, OL, Polymaps, or even non-mapping apps such as R, etc. >> >> Suggestions on how to proceed? >> >> -- >> Puneet Kishor >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > From jk.chen at sdl.usu.edu Fri Aug 26 10:54:58 2011 From: jk.chen at sdl.usu.edu (JK Chen) Date: Fri, 26 Aug 2011 17:54:58 +0000 Subject: [mapserver-users] my overview map is dark, what is going on? Is it because of map server (I created), or the client code? Message-ID: <75E6E48D29E14B4C93DA8ADFCA6D205A11C2CC99@Mercury.usurf.usu.edu> Hi, I made my own map using the Map Server and client with OpenLayers. At zoom out levels, my Overview map becomes dark, however, the box in there is draggable. But, how come it is dark? How to fix that? Root cause? Sorry, I'm very new to the map space. So, pardon me for the questions. I included these in this email thread. * Map file, is listed end of the email. * Here is the screen shot I got. Attached. * OpenLayers code used to create the map is also listed here. The screenshot can be accessed here too. http://osgeo-org.1803224.n2.nabble.com/file/n6729648/Dark_Overview_Map.jpg OpenLayers code: this.wms_basic_layer = new OpenLayers.Layer.WMS( wms.wms_layer_display_name, wms.wms_url, {layers: wms.wms_layer_name}, {wrapDateLine: true}); this.map.addLayer(this.wms_basic_layer) Map file: MAP # a Map file starts with MAP keyword #CONFIG "MS_ERRORFILE" "c:\dev\ms_error.txt" #DEBUG 5 IMAGETYPE jpeg EXTENT -180 -90 180 90 SIZE 256 256 SHAPEPATH "." IMAGECOLOR 255 255 255 CONFIG "PROJ_LIB" "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin/" PROJECTION "init=epsg:4326" END WEB MINSCALEDENOM 1000 MAXSCALEDENOM 7000000 METADATA "wms_title" "WMS Server" "wms_abstract" "Vantage WMS Server" END END LAYER #basemap NAME basemap # layer name exposted to URL EXTENT -180 -90 180 90 # cover the entire world TILEINDEX "baseGN" # referring to shape file SHAPEPAH\TITLEIDEX.shp TILEITEM "location" # always "location" STATUS ON TYPE RASTER # it's raster image METADATA "wms_title" "basemap" END END END -------------- next part -------------- An HTML attachment was scrubbed... URL: From michal.sredl at gmail.com Fri Aug 26 11:08:48 2011 From: michal.sredl at gmail.com (=?ISO-8859-2?B?TWljaGFsIKly6WRs?=) Date: Fri, 26 Aug 2011 20:08:48 +0200 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: References: <84446DEF76453C439E9E97E438E13A6301DE93@suutari.haapa.mmm.fi> Message-ID: Hi Steve, for epsg:4326 and url http://localhost//cgi-bin/ows?mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 it says msQueryByAttributes(): Search returned no results. No matching record(s) found, layer and area of interest do not overlap. Cheers, Mike 2011/8/26 Steve Lime : > You must have a default mapfile set in apache, that's cool. Use the second URL. > > Change qstring_validation to qstring_validation_pattern from my first > message, my mistake. > > Steve > > 2011/8/26 Michal ?r?dl : >> Hi Steve, >> >> regardless of the projection settings, I get the following result: >> >> For >> >> ?http://localhost//cgi-bin/ows?map=mapfile&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >> >> I see >> >> ?msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN >> validation failed. msEvalRegex(): Regular expression error. String >> failed expression test. >> >> And for >> >> ?http://localhost//cgi-bin/ows?mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >> >> I see >> >> ?mapserv(): Web application error. Parameter 'qstring' value fails to >> validate. msValidateParameter(): Regular expression error. Parameter >> pattern validation failed. >> >> Cheers, >> >> Michal >> >> >> 2011/8/26 Steve Lime : >>> I would agree this sounds like a bug. The map extent *should* be >>> projected to the layer extent and that's what's used to identify >>> candidate features. Can you check what happens with a native mapserver >>> attribute query in this case? If possible try this: >>> >>> 1) set your MAP projection back to geographic, and restore your >>> geographic map extent. >>> 2) add this line to the layer metadata 'qstring_validation' '^[0-9]$' >>> 3) go to the following URL: >>> >>> ?http://localhost//cgi-bin/ows?map=[yourmapfile]&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>> >>> and see what happens. >>> >>> This will run a different query function msQueryByAttributes() that's >>> not new to 6.0.x. >>> >>> Steve >>> >>> 2011/8/26 Michal ?r?dl : >>>> Hi Jukka, >>>> >>>> the current settings returns expected result with &srsName=EPSG:4326 >>>> as well. The original settings doesn't work neither with >>>> &srsName=EPSG:4326 nor &srsName=EPSG::102067. >>>> >>>> Yes, it looks like there would be a problem in case of several WFS >>>> layers with different projections of the source data. >>>> >>>> Cheers, >>>> >>>> Mike >>>> >>>> 2011/8/26 Rahkonen Jukka : >>>>> Hi, >>>>> >>>>> Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. >>>>> >>>>> Could you have one more trial with the original settings and see if adding &srsName=EPSG:4326 or &srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with &srsName=EPSG:4326. >>>>> >>>>> -Jukka Rahkonen. >>>>> >>>>> Michal ?r?dl wrote: >>>>> >>>>> >>>>>> Hi all, >>>>> >>>>>> problem solved. I needed to set: >>>>> >>>>>> EXTENT -905000 -1230000 -400000 -900000 >>>>> >>>>> and >>>>> >>>>> PROJECTION >>>>> ## ?"init=epsg:4326" >>>>> ?"init=epsg:102067" >>>>> END >>>>> >>>>> (Epsg 102067 is the projection of the layer being filtered.) >>>>> >>>>> Thank you very much again, >>>>> >>>>> Michal >>>>> >>>>> >>>>> 2011/8/25 Michal ?r?dl : >>>>>> Hi Steve, >>>>>> >>>>>> Thanks a lot. The extent should be large enough to encompass all the >>>>>> features. Here comes the whole mapfile: >>>>>> >>>>>> MAP >>>>>> NAME "MIS WFS Server" >>>>>> STATUS ON >>>>>> SIZE 500 500 >>>>>> EXTENT -180 -90 180 90 >>>>>> SHAPEPATH "data/" >>>>>> IMAGECOLOR 255 255 255 >>>>>> CONFIG MS_ERRORFILE "log/mapserv.log" >>>>>> DEBUG 5 >>>>>> >>>>>> WEB >>>>>> ?IMAGEPATH "/var/www/tmp/" >>>>>> ?IMAGEURL "/tmp/" >>>>>> ?METADATA >>>>>> ? ?"wfs_title" ? ? ? ? ? ?"MIS WFS Server" ?## REQUIRED >>>>>> ? ?"wfs_onlineresource" ? "http://127.0.0.1/cgi-bin/ows?" >>>>>> ? ?"wfs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" >>>>>> ? ?"wms_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>>>> ? ?"wcs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>>>> ? ?"ows_enable_request" "*" >>>>>> ? ?"ows_updatesequence" "2011-29-05T00:24:00" >>>>>> ?END >>>>>> END >>>>>> >>>>>> PROJECTION >>>>>> ?"init=epsg:4326" >>>>>> END >>>>>> >>>>>> LAYER >>>>>> ?NAME "typ" >>>>>> ?METADATA >>>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>>> ? ?"wfs_include_items" "all" >>>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>>> ? ?"gml_types" "auto" >>>>>> ? ?"gml_geometries" "msGeometry" >>>>>> ? ?"gml_msGeometry_type" "polygon" >>>>>> ?END >>>>>> ?DATA typ.shp >>>>>> ?TYPE POLYGON >>>>>> ?STATUS ON >>>>>> ?PROJECTION >>>>>> ? ?"init=epsg:102067" >>>>>> ?END >>>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>>> ?CLASS >>>>>> ? ?NAME "Typ" >>>>>> ? ?STYLE >>>>>> ? ? ?COLOR 0 0 155 >>>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>>> ? ?END >>>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>>> ?END >>>>>> ?DEBUG 5 >>>>>> END # Layer >>>>>> >>>>>> LAYER >>>>>> ? ?NAME "hsrs" >>>>>> ? ?TYPE RASTER >>>>>> ? ?STATUS ON >>>>>> ? ?CONNECTION "http://www.bnhelp.cz/cgi-bin/crtopo?" >>>>>> ? ?DEBUG ON >>>>>> ? ?CONNECTIONTYPE WMS >>>>>> ? ?METADATA >>>>>> ? ? ? ?"wms_srs" ? ? ? ? ? ? "EPSG:4326" >>>>>> ? ? ? ?"wms_name" ? ? ? ? ? ?"obce,kraje,hr_cr,sidla,doprava" >>>>>> ? ? ? ?"wms_title" ? ? ? ? ? ?"CR Topo" >>>>>> ? ? ? ?"wms_server_version" ?"1.1.1" >>>>>> ? ? ? ?"wms_format" ? ? ? ? ?"image/png" >>>>>> ? ? ? ?"wms_latlonboundingbox" "11.9384 48.2337 18.957 51.3549" >>>>>> ? ?END >>>>>> END >>>>>> >>>>>> END # Map File >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Michal >>>>>> >>>>>> 2011/8/25 Steve Lime : >>>>>>> What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve >>>>>>> >>>>>>> Sent from my iPad >>>>>>> >>>>>>> On Aug 24, 2011, at 7:58 AM, Michal ?r?dl wrote: >>>>>>> >>>>>>>> Hi all, >>>>>>>> >>>>>>>> I am trying to use FES filter for WFS layer and get no result, even >>>>>>>> thought I should get one. >>>>>>>> >>>>>>>> In my browser, I request >>>>>>>> >>>>>>>> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=>>>>>>> xmlns:ogc="http://www.opengis.net/ogc">ZVER2 >>>>>>>> >>>>>>>> and get >>>>>>>> >>>>>>>> >>>>>>> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>>>>>>> xmlns:gml="http://www.opengis.net/gml" >>>>>>>> xmlns:wfs="http://www.opengis.net/wfs" >>>>>>>> xmlns:ogc="http://www.opengis.net/ogc" >>>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>>>>> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >>>>>>>> http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 >>>>>>>> http://www.opengis.net/wfs >>>>>>>> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >>>>>>>> >>>>>>>> missing >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> even though I do know, that features with ZVER=2 do exist. >>>>>>>> >>>>>>>> In the mapserver log file, I get >>>>>>>> >>>>>>>> [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned >>>>>>>> no results. No matching record(s) found. >>>>>>>> [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time >>>>>>>> (msLoadMap not incl.): 0.002s >>>>>>>> [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. >>>>>>>> [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. >>>>>>>> >>>>>>>> I have checked http://mapserver.org/errors.html#id2 with similar error >>>>>>>> "msQueryByPoint: search returned no results" and tried to create a >>>>>>>> simple template: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> ?[lrn] >>>>>>>> ?[ZVER] >>>>>>>> >>>>>>>> >>>>>>>> but with no effect. >>>>>>>> >>>>>>>> In the mapfile, there is >>>>>>>> >>>>>>>> LAYER >>>>>>>> ?NAME "typ" >>>>>>>> ?METADATA >>>>>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>>>>> ? ?"gml_types" "auto" >>>>>>>> ? ?"gml_geometries" "msGeometry" >>>>>>>> ? ?"gml_msGeometry_type" "polygon" >>>>>>>> ?END >>>>>>>> ?DATA typ.shp >>>>>>>> ?TYPE POLYGON >>>>>>>> ?STATUS ON >>>>>>>> ?PROJECTION >>>>>>>> ? ?"init=epsg:102067" >>>>>>>> ?END >>>>>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>>>>> ?CLASS >>>>>>>> ? ?NAME "Typ" >>>>>>>> ? ?STYLE >>>>>>>> ? ? ?COLOR 0 0 155 >>>>>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>>>>> ? ?END >>>>>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>>>>> ?END >>>>>>>> ?DEBUG 5 >>>>>>>> END # Layer >>>>>>>> >>>>>>>> What is wrong with my FES filter? How can I make it to run? >>>>>>>> >>>>>>>> Thanks a lot, >>>>>>>> >>>>>>>> Michal >>>>>>>> _______________________________________________ >>>>>>>> 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 bfraser at geoanalytic.com Fri Aug 26 11:29:16 2011 From: bfraser at geoanalytic.com (Brent Fraser) Date: Fri, 26 Aug 2011 12:29:16 -0600 Subject: [mapserver-users] dynamic layer classification In-Reply-To: <114DB458-5F0B-45AB-B3EE-C580A8891E5F@gmail.com> References: <4E57DA3C.4040508@geoanalytic.com> <114DB458-5F0B-45AB-B3EE-C580A8891E5F@gmail.com> Message-ID: <4E57E5FC.8020607@geoanalytic.com> Hopefully your favorite scripting language is Python (and not PHP or Perl) as the support is much better. I'm no expert in Mapscript, but in general your script would do something like: 1. Load the 'template' map file (containing most of the map/layer/class definitions) 2. Get the Layer object of interest, and iterate thru the class objects assigning the desired symbology 3. Generate and send the image to the browser There is reference doc on the Mapserver site for Mapscript but I didn't see any tutorial. GeoMoose has some extensive PHP Mapscript you might be able to use as a guide. Best Regards, Brent Fraser On 8/26/2011 11:50 AM, Mr. Puneet Kishor wrote: > On Aug 26, 2011, at 12:39 PM, Brent Fraser wrote: > >> Puneet, >> >> I think currently the short answer is Mapscript. >> >> I had a similar need last year (http://lists.osgeo.org/pipermail/mapserver-users/2010-March/065050.html) where I needed to have the symbology stored in the database and the classes varied over time (users created new class defs in the database via a web page). >> >> Steve Lime suggested an enahancement where classes were defined by a SLD file or url: >> >> LAYER >> NAME 'extreme-symbology' >> DATA ... >> CONNECTION ... >> SLD 'some flle' or 'some url' >> ... >> END >> >> which is an elegant solution, but currently not implemented... > > Yes, that would be a very nice solution, precisely the kind of thing I am looking for. In fact, even better would be > > LAYER > .. > SLD 'some expression' > > where 'some expression' could be stored in a file, or retrieve via a URL, or from a db query. > > But, until that comes along, I could and will use MapScript. I compiled MS 6.0.1 yesterday, and discovered, much to my delight, that MapScript in my favorite programming language (the one that begins with P) is alive and doing well. > > So, how would I go about implementing this in MapScript? I would have to create the layer definition on the fly, no? Any pointers? > > > >> Best Regards, >> Brent Fraser >> >> >> On 8/26/2011 8:35 AM, Mr. Puneet Kishor wrote: >>> hola, >>> >>> I need some guidance on this (and my MapServer foo is severely rusted). My immediate need is to color a polygon layer (held in PostGIS) based on an attribute in a separate table. The number of CLASSes is considerable, more than 80 or so. This leads to a longer term need -- >>> >>> The coloring of these polys is a crucial and universal need in my field of work, and it horrendously complicated determining the correct color, and the calculations for the appropriate color keep on changing from time to time. In other words, many different applications need this ability to classify polys based on certain attributes. So, I am creating a web app that does nothing but tell what color to use -- you give it a set of attributes, and the web app replies with the color. It would be a RESTful app, sending the color information back as JSON. How could I use this information with MapServer? >>> >>> In an ideal scenario, MapServer would query the data source, then, for each class in the layer, it would send a query to this color app, and the color app would tell MapServer what color to use to render the poly. The same app would be used by other apps, be they MapServer, OL, Polymaps, or even non-mapping apps such as R, etc. >>> >>> Suggestions on how to proceed? >>> >>> -- >>> Puneet Kishor >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users >>> > From sdlime at gmail.com Fri Aug 26 13:53:46 2011 From: sdlime at gmail.com (Steve Lime) Date: Fri, 26 Aug 2011 15:53:46 -0500 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: References: <84446DEF76453C439E9E97E438E13A6301DE93@suutari.haapa.mmm.fi> Message-ID: Ok, definitely a bug here... Will take a look. Steve 2011/8/26 Michal ?r?dl : > Hi Steve, > > for epsg:4326 and url > > http://localhost//cgi-bin/ows?mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 > > it says > > msQueryByAttributes(): Search returned no results. No matching > record(s) found, layer and area of interest do not overlap. > > Cheers, > > Mike > > 2011/8/26 Steve Lime : >> You must have a default mapfile set in apache, that's cool. Use the second URL. >> >> Change qstring_validation to qstring_validation_pattern from my first >> message, my mistake. >> >> Steve >> >> 2011/8/26 Michal ?r?dl : >>> Hi Steve, >>> >>> regardless of the projection settings, I get the following result: >>> >>> For >>> >>> ?http://localhost//cgi-bin/ows?map=mapfile&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>> >>> I see >>> >>> ?msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN >>> validation failed. msEvalRegex(): Regular expression error. String >>> failed expression test. >>> >>> And for >>> >>> ?http://localhost//cgi-bin/ows?mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>> >>> I see >>> >>> ?mapserv(): Web application error. Parameter 'qstring' value fails to >>> validate. msValidateParameter(): Regular expression error. Parameter >>> pattern validation failed. >>> >>> Cheers, >>> >>> Michal >>> >>> >>> 2011/8/26 Steve Lime : >>>> I would agree this sounds like a bug. The map extent *should* be >>>> projected to the layer extent and that's what's used to identify >>>> candidate features. Can you check what happens with a native mapserver >>>> attribute query in this case? If possible try this: >>>> >>>> 1) set your MAP projection back to geographic, and restore your >>>> geographic map extent. >>>> 2) add this line to the layer metadata 'qstring_validation' '^[0-9]$' >>>> 3) go to the following URL: >>>> >>>> ?http://localhost//cgi-bin/ows?map=[yourmapfile]&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>>> >>>> and see what happens. >>>> >>>> This will run a different query function msQueryByAttributes() that's >>>> not new to 6.0.x. >>>> >>>> Steve >>>> >>>> 2011/8/26 Michal ?r?dl : >>>>> Hi Jukka, >>>>> >>>>> the current settings returns expected result with &srsName=EPSG:4326 >>>>> as well. The original settings doesn't work neither with >>>>> &srsName=EPSG:4326 nor &srsName=EPSG::102067. >>>>> >>>>> Yes, it looks like there would be a problem in case of several WFS >>>>> layers with different projections of the source data. >>>>> >>>>> Cheers, >>>>> >>>>> Mike >>>>> >>>>> 2011/8/26 Rahkonen Jukka : >>>>>> Hi, >>>>>> >>>>>> Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. >>>>>> >>>>>> Could you have one more trial with the original settings and see if adding &srsName=EPSG:4326 or &srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with &srsName=EPSG:4326. >>>>>> >>>>>> -Jukka Rahkonen. >>>>>> >>>>>> Michal ?r?dl wrote: >>>>>> >>>>>> >>>>>>> Hi all, >>>>>> >>>>>>> problem solved. I needed to set: >>>>>> >>>>>>> EXTENT -905000 -1230000 -400000 -900000 >>>>>> >>>>>> and >>>>>> >>>>>> PROJECTION >>>>>> ## ?"init=epsg:4326" >>>>>> ?"init=epsg:102067" >>>>>> END >>>>>> >>>>>> (Epsg 102067 is the projection of the layer being filtered.) >>>>>> >>>>>> Thank you very much again, >>>>>> >>>>>> Michal >>>>>> >>>>>> >>>>>> 2011/8/25 Michal ?r?dl : >>>>>>> Hi Steve, >>>>>>> >>>>>>> Thanks a lot. The extent should be large enough to encompass all the >>>>>>> features. Here comes the whole mapfile: >>>>>>> >>>>>>> MAP >>>>>>> NAME "MIS WFS Server" >>>>>>> STATUS ON >>>>>>> SIZE 500 500 >>>>>>> EXTENT -180 -90 180 90 >>>>>>> SHAPEPATH "data/" >>>>>>> IMAGECOLOR 255 255 255 >>>>>>> CONFIG MS_ERRORFILE "log/mapserv.log" >>>>>>> DEBUG 5 >>>>>>> >>>>>>> WEB >>>>>>> ?IMAGEPATH "/var/www/tmp/" >>>>>>> ?IMAGEURL "/tmp/" >>>>>>> ?METADATA >>>>>>> ? ?"wfs_title" ? ? ? ? ? ?"MIS WFS Server" ?## REQUIRED >>>>>>> ? ?"wfs_onlineresource" ? "http://127.0.0.1/cgi-bin/ows?" >>>>>>> ? ?"wfs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" >>>>>>> ? ?"wms_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>>>>> ? ?"wcs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>>>>> ? ?"ows_enable_request" "*" >>>>>>> ? ?"ows_updatesequence" "2011-29-05T00:24:00" >>>>>>> ?END >>>>>>> END >>>>>>> >>>>>>> PROJECTION >>>>>>> ?"init=epsg:4326" >>>>>>> END >>>>>>> >>>>>>> LAYER >>>>>>> ?NAME "typ" >>>>>>> ?METADATA >>>>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>>>> ? ?"wfs_include_items" "all" >>>>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>>>> ? ?"gml_types" "auto" >>>>>>> ? ?"gml_geometries" "msGeometry" >>>>>>> ? ?"gml_msGeometry_type" "polygon" >>>>>>> ?END >>>>>>> ?DATA typ.shp >>>>>>> ?TYPE POLYGON >>>>>>> ?STATUS ON >>>>>>> ?PROJECTION >>>>>>> ? ?"init=epsg:102067" >>>>>>> ?END >>>>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>>>> ?CLASS >>>>>>> ? ?NAME "Typ" >>>>>>> ? ?STYLE >>>>>>> ? ? ?COLOR 0 0 155 >>>>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>>>> ? ?END >>>>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>>>> ?END >>>>>>> ?DEBUG 5 >>>>>>> END # Layer >>>>>>> >>>>>>> LAYER >>>>>>> ? ?NAME "hsrs" >>>>>>> ? ?TYPE RASTER >>>>>>> ? ?STATUS ON >>>>>>> ? ?CONNECTION "http://www.bnhelp.cz/cgi-bin/crtopo?" >>>>>>> ? ?DEBUG ON >>>>>>> ? ?CONNECTIONTYPE WMS >>>>>>> ? ?METADATA >>>>>>> ? ? ? ?"wms_srs" ? ? ? ? ? ? "EPSG:4326" >>>>>>> ? ? ? ?"wms_name" ? ? ? ? ? ?"obce,kraje,hr_cr,sidla,doprava" >>>>>>> ? ? ? ?"wms_title" ? ? ? ? ? ?"CR Topo" >>>>>>> ? ? ? ?"wms_server_version" ?"1.1.1" >>>>>>> ? ? ? ?"wms_format" ? ? ? ? ?"image/png" >>>>>>> ? ? ? ?"wms_latlonboundingbox" "11.9384 48.2337 18.957 51.3549" >>>>>>> ? ?END >>>>>>> END >>>>>>> >>>>>>> END # Map File >>>>>>> >>>>>>> Cheers, >>>>>>> >>>>>>> Michal >>>>>>> >>>>>>> 2011/8/25 Steve Lime : >>>>>>>> What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve >>>>>>>> >>>>>>>> Sent from my iPad >>>>>>>> >>>>>>>> On Aug 24, 2011, at 7:58 AM, Michal ?r?dl wrote: >>>>>>>> >>>>>>>>> Hi all, >>>>>>>>> >>>>>>>>> I am trying to use FES filter for WFS layer and get no result, even >>>>>>>>> thought I should get one. >>>>>>>>> >>>>>>>>> In my browser, I request >>>>>>>>> >>>>>>>>> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=>>>>>>>> xmlns:ogc="http://www.opengis.net/ogc">ZVER2 >>>>>>>>> >>>>>>>>> and get >>>>>>>>> >>>>>>>>> >>>>>>>> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>>>>>>>> xmlns:gml="http://www.opengis.net/gml" >>>>>>>>> xmlns:wfs="http://www.opengis.net/wfs" >>>>>>>>> xmlns:ogc="http://www.opengis.net/ogc" >>>>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>>>>>> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >>>>>>>>> http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 >>>>>>>>> http://www.opengis.net/wfs >>>>>>>>> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >>>>>>>>> >>>>>>>>> missing >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> even though I do know, that features with ZVER=2 do exist. >>>>>>>>> >>>>>>>>> In the mapserver log file, I get >>>>>>>>> >>>>>>>>> [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned >>>>>>>>> no results. No matching record(s) found. >>>>>>>>> [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time >>>>>>>>> (msLoadMap not incl.): 0.002s >>>>>>>>> [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. >>>>>>>>> [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. >>>>>>>>> >>>>>>>>> I have checked http://mapserver.org/errors.html#id2 with similar error >>>>>>>>> "msQueryByPoint: search returned no results" and tried to create a >>>>>>>>> simple template: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> ?[lrn] >>>>>>>>> ?[ZVER] >>>>>>>>> >>>>>>>>> >>>>>>>>> but with no effect. >>>>>>>>> >>>>>>>>> In the mapfile, there is >>>>>>>>> >>>>>>>>> LAYER >>>>>>>>> ?NAME "typ" >>>>>>>>> ?METADATA >>>>>>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>>>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>>>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>>>>>> ? ?"gml_types" "auto" >>>>>>>>> ? ?"gml_geometries" "msGeometry" >>>>>>>>> ? ?"gml_msGeometry_type" "polygon" >>>>>>>>> ?END >>>>>>>>> ?DATA typ.shp >>>>>>>>> ?TYPE POLYGON >>>>>>>>> ?STATUS ON >>>>>>>>> ?PROJECTION >>>>>>>>> ? ?"init=epsg:102067" >>>>>>>>> ?END >>>>>>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>>>>>> ?CLASS >>>>>>>>> ? ?NAME "Typ" >>>>>>>>> ? ?STYLE >>>>>>>>> ? ? ?COLOR 0 0 155 >>>>>>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>>>>>> ? ?END >>>>>>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>>>>>> ?END >>>>>>>>> ?DEBUG 5 >>>>>>>>> END # Layer >>>>>>>>> >>>>>>>>> What is wrong with my FES filter? How can I make it to run? >>>>>>>>> >>>>>>>>> Thanks a lot, >>>>>>>>> >>>>>>>>> Michal >>>>>>>>> _______________________________________________ >>>>>>>>> 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 valemunoz at gmail.com Fri Aug 26 14:32:49 2011 From: valemunoz at gmail.com (=?ISO-8859-1?Q?Valeria_Mu=F1oz?=) Date: Fri, 26 Aug 2011 18:32:49 -0300 Subject: [mapserver-users] problem with Symbol and Style Message-ID: HI!!! i have problem with my mapfile. i'm trying to display street but i just get circle like this not a continuous and perfect line. my mapserver version is 6. please help!! my code is: LAYER NAME 'RM' TYPE LINE MAXSCALE 15000 LABELMAXSCALE 15000 MINSCALE 5000 LABELMINSCALE 5000 DATA 'street.shp' METADATA 'wms_title'RM' END STATUS DEFAULT TRANSPARENCY 100 PROJECTION 'proj=longlat' 'ellps=WGS84' 'datum=WGS84' 'no_defs' '' END LABELITEM 'NAME' CLASS NAME 'c_RM' STYLE SYMBOL 'linecc' ANTIALIAS TRUE SIZE 12 COLOR 200 112 64 END STYLE SYMBOL 'defline' ANTIALIAS TRUE SIZE 10 COLOR 224 136 72 END LABEL TYPE truetype FONT 'arialbd' SIZE 9 MINSIZE 9 MAXSIZE 9 ANTIALIAS TRUE COLOR 25 25 25 ANGLE FOLLOW FORCE FALSE POSITION cc BUFFER 10 MINDISTANCE 7000 MINFEATURESIZE 50 OFFSET 0 0 PARTIALS FALSE END END END Symbol Name 'linecc' Type ELLIPSE Filled TRUE ANTIALIAS TRUE Points 1 1 END END Symbol Name 'defline' Type ELLIPSE Filled TRUE ANTIALIAS TRUE Points 1 1 END END -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jukka.Rahkonen at mmmtike.fi Fri Aug 26 14:38:03 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Fri, 26 Aug 2011 21:38:03 +0000 Subject: [mapserver-users] dynamic layer classification In-Reply-To: <114DB458-5F0B-45AB-B3EE-C580A8891E5F@gmail.com> References: <4E57DA3C.4040508@geoanalytic.com>, <114DB458-5F0B-45AB-B3EE-C580A8891E5F@gmail.com> Message-ID: <84446DEF76453C439E9E97E438E13A6301E0E7@suutari.haapa.mmm.fi> Hi, There is naturally also the SLD_BODY way. Looks ugly but works. http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/osm-mapserver_i.map&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=469&HEIGHT=354&LAYERS=roadsfar_01&TRANSPARENT=TRUE&FORMAT=image/png&BBOX=252097.87225892936,6798498.983050847,526331.9582495452,7005490.169491526&SRS=EPSG:3067&STYLES=&SLD_BODY=%3CStyledLayerDescriptor%20version%3D%221.0.0%22%20xmlns%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld%22%20xmlns%3Agml%3D%22http%3A%2F%2Fwww.opengis.net%2Fgml%22%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net%2Fogc%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%20xsi%3AschemaLocation%3D%22http%3A%2F%2Fwww.opengis.net%2Fsld%20http%3A%2F%2Fschemas.opengis.net%2Fsld%2F1.0.0%2FStyledLayerDescriptor.xsd%22%3E%20%3CNamedLayer%3E%20%3CName%3Eroadsfar_01%3C%2FName%3E%20%3CUserStyle%3E%20%3CFeatureTypeStyle%3E%20%3CRule%3E%20%3Cogc%3AFilter%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Ehighway%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3Etrunk%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3C%2Fogc%3AFilter%3E%20%3CMinScaleDenominator%3E1000010.000000%3C%2FMinScaleDenominator%3E%20%3CMaxScaleDenominator%3E2500010.000000%3C%2FMaxScaleDenominator%3E%20%3CLineSymbolizer%3E%20%3CStroke%3E%20%3CCssParameter%20name%3D%22stroke%22%3E%2300ff00%3C%2FCssParameter%3E%20%3CCssParameter%20name%3D%22stroke-opacity%22%3E1.00%3C%2FCssParameter%3E%20%3CCssParameter%20name%3D%22stroke-width%22%3E3.00%3C%2FCssParameter%3E%20%3C%2FStroke%3E%20%3C%2FLineSymbolizer%3E%20%3CTextSymbolizer%3E%20%3CLabel%3Eref%3C%2FLabel%3E%20%3CFont%3E%20%3CCssParameter%20name%3D%22font-family%22%3Escb%3C%2FCssParameter%3E%20%3CCssParameter%20name%3D%22font-size%22%3E16.00%3C%2FCssParameter%3E%20%3C%2FFont%3E%20%3CLabelPlacement%3E%20%3CPointPlacement%3E%20%3CAnchorPoint%3E%20%3CAnchorPointX%3E0.5%3C%2FAnchorPointX%3E%20%3CAnchorPointY%3E0.5%3C%2FAnchorPointY%3E%20%3C%2FAnchorPoint%3E%20%3C%2FPointPlacement%3E%20%3C%2FLabelPlacement%3E%20%3CFill%3E%20%3CCssParameter%20name%3D%22fill%22%3E%23000000%3C%2FCssParameter%3E%20%3C%2FFill%3E%20%3C%2FTextSymbolizer%3E%20%3C%2FRule%3E%20%3CRule%3E%20%3Cogc%3AFilter%3E%3Cogc%3APropertyIsEqualTo%3E%3Cogc%3APropertyName%3Ehighway%3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3Eprimary%3C%2Fogc%3ALiteral%3E%3C%2Fogc%3APropertyIsEqualTo%3E%3C%2Fogc%3AFilter%3E%20%3CMinScaleDenominator%3E1000010.000000%3C%2FMinScaleDenominator%3E%20%3CMaxScaleDenominator%3E2500010.000000%3C%2FMaxScaleDenominator%3E%20%3CLineSymbolizer%3E%20%3CStroke%3E%20%3CCssParameter%20name%3D%22stroke%22%3E%23ff0000%3C%2FCssParameter%3E%20%3CCssParameter%20name%3D%22stroke-opacity%22%3E1.00%3C%2FCssParameter%3E%20%3CCssParameter%20name%3D%22stroke-width%22%3E3.00%3C%2FCssParameter%3E%20%3C%2FStroke%3E%20%3C%2FLineSymbolizer%3E%20%3CTextSymbolizer%3E%20%3CLabel%3Eref%3C%2FLabel%3E%20%3CFont%3E%20%3CCssParameter%20name%3D%22font-family%22%3Escb%3C%2FCssParameter%3E%20%3CCssParameter%20name%3D%22font-size%22%3E16.00%3C%2FCssParameter%3E%20%3C%2FFont%3E%20%3CLabelPlacement%3E%20%3CPointPlacement%3E%20%3CAnchorPoint%3E%20%3CAnchorPointX%3E0.5%3C%2FAnchorPointX%3E%20%3CAnchorPointY%3E0.5%3C%2FAnchorPointY%3E%20%3C%2FAnchorPoint%3E%20%3C%2FPointPlacement%3E%20%3C%2FLabelPlacement%3E%20%3CFill%3E%20%3CCssParameter%20name%3D%22fill%22%3E%230000ff%3C%2FCssParameter%3E%20%3C%2FFill%3E%20%3C%2FTextSymbolizer%3E%20%3C%2FRule%3E%20%3C%2FFeatureTypeStyle%3E%20%3C%2FUserStyle%3E%20%3C%2FNamedLayer%3E%20%3C%2FStyledLayerDescriptor%3E SLD_BODY written out roadsfar_01 highwaytrunk 1000010.000000 2500010.000000 #00ff00 1.00 3.00 scb 16.00 0.5 0.5 #000000 highwayprimary 1000010.000000 2500010.000000 #ff0000 1.00 3.00 scb 16.00 0.5 0.5 #0000ff -Jukka Rahkonen- ________________________________________ L?hett?j?: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] käyttäjän Mr. Puneet Kishor [punk.kish at gmail.com] puolesta L?hetetty: 26. elokuuta 2011 20:50 Vastaanottaja: Brent Fraser Kopio: MapServer Aihe: Re: [mapserver-users] dynamic layer classification On Aug 26, 2011, at 12:39 PM, Brent Fraser wrote: > Puneet, > > I think currently the short answer is Mapscript. > > I had a similar need last year (http://lists.osgeo.org/pipermail/mapserver-users/2010-March/065050.html) where I needed to have the symbology stored in the database and the classes varied over time (users created new class defs in the database via a web page). > > Steve Lime suggested an enahancement where classes were defined by a SLD file or url: > > LAYER > NAME 'extreme-symbology' > DATA ... > CONNECTION ... > SLD 'some flle' or 'some url' > ... > END > > which is an elegant solution, but currently not implemented... Yes, that would be a very nice solution, precisely the kind of thing I am looking for. In fact, even better would be LAYER .. SLD 'some expression' where 'some expression' could be stored in a file, or retrieve via a URL, or from a db query. But, until that comes along, I could and will use MapScript. I compiled MS 6.0.1 yesterday, and discovered, much to my delight, that MapScript in my favorite programming language (the one that begins with P) is alive and doing well. So, how would I go about implementing this in MapScript? I would have to create the layer definition on the fly, no? Any pointers? > > Best Regards, > Brent Fraser > > > On 8/26/2011 8:35 AM, Mr. Puneet Kishor wrote: >> hola, >> >> I need some guidance on this (and my MapServer foo is severely rusted). My immediate need is to color a polygon layer (held in PostGIS) based on an attribute in a separate table. The number of CLASSes is considerable, more than 80 or so. This leads to a longer term need -- >> >> The coloring of these polys is a crucial and universal need in my field of work, and it horrendously complicated determining the correct color, and the calculations for the appropriate color keep on changing from time to time. In other words, many different applications need this ability to classify polys based on certain attributes. So, I am creating a web app that does nothing but tell what color to use -- you give it a set of attributes, and the web app replies with the color. It would be a RESTful app, sending the color information back as JSON. How could I use this information with MapServer? >> >> In an ideal scenario, MapServer would query the data source, then, for each class in the layer, it would send a query to this color app, and the color app would tell MapServer what color to use to render the poly. The same app would be used by other apps, be they MapServer, OL, Polymaps, or even non-mapping apps such as R, etc. >> >> Suggestions on how to proceed? >> >> -- >> Puneet Kishor >> _______________________________________________ >> 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 Ludovic.Granjon at u-bourgogne.fr Sat Aug 27 02:00:16 2011 From: Ludovic.Granjon at u-bourgogne.fr (Ludovic Granjon) Date: Sat, 27 Aug 2011 11:00:16 +0200 Subject: [mapserver-users] dynamic layer classification In-Reply-To: <4E57E5FC.8020607@geoanalytic.com> References: <4E57DA3C.4040508@geoanalytic.com> <114DB458-5F0B-45AB-B3EE-C580A8891E5F@gmail.com> <4E57E5FC.8020607@geoanalytic.com> Message-ID: <20110827110016.139850duk0yhw6ko@webmail.u-bourgogne.fr> Maybe an other way is to use a mapfile in xml instead mapscript and so you can do what you want with the xml and transform it in .map when it's ok. With this solution you are "mapscipt independant" and you doesn't need mapscript. I did something like that for adding a lot of layers. Ludovic Brent Fraser a ?crit?: > Hopefully your favorite scripting language is Python (and not PHP > or Perl) as the support is much better. I'm no expert in Mapscript, > but in general your script would do something like: > > 1. Load the 'template' map file (containing most of the > map/layer/class definitions) > 2. Get the Layer object of interest, and iterate thru the class > objects assigning the desired symbology > 3. Generate and send the image to the browser > > There is reference doc on the Mapserver site for Mapscript but I > didn't see any tutorial. GeoMoose has some extensive PHP Mapscript > you might be able to use as a guide. > > Best Regards, > Brent Fraser > > > On 8/26/2011 11:50 AM, Mr. Puneet Kishor wrote: >> On Aug 26, 2011, at 12:39 PM, Brent Fraser wrote: >> >>> Puneet, >>> >>> I think currently the short answer is Mapscript. >>> >>> I had a similar need last year >>> (http://lists.osgeo.org/pipermail/mapserver-users/2010-March/065050.html) >>> where I needed to have the symbology stored in the database and >>> the classes varied over time (users created new class defs in the >>> database via a web page). >>> >>> Steve Lime suggested an enahancement where classes were defined >>> by a SLD file or url: >>> >>> LAYER >>> NAME 'extreme-symbology' >>> DATA ... >>> CONNECTION ... >>> SLD 'some flle' or 'some url' >>> ... >>> END >>> >>> which is an elegant solution, but currently not implemented... >> >> Yes, that would be a very nice solution, precisely the kind of >> thing I am looking for. In fact, even better would be >> >> LAYER >> .. >> SLD 'some expression' >> >> where 'some expression' could be stored in a file, or retrieve via >> a URL, or from a db query. >> >> But, until that comes along, I could and will use MapScript. I >> compiled MS 6.0.1 yesterday, and discovered, much to my delight, >> that MapScript in my favorite programming language (the one that >> begins with P) is alive and doing well. >> >> So, how would I go about implementing this in MapScript? I would >> have to create the layer definition on the fly, no? Any pointers? >> >> >> >>> Best Regards, >>> Brent Fraser >>> >>> >>> On 8/26/2011 8:35 AM, Mr. Puneet Kishor wrote: >>>> hola, >>>> >>>> I need some guidance on this (and my MapServer foo is severely >>>> rusted). My immediate need is to color a polygon layer (held in >>>> PostGIS) based on an attribute in a separate table. The number of >>>> CLASSes is considerable, more than 80 or so. This leads to a >>>> longer term need -- >>>> >>>> The coloring of these polys is a crucial and universal need in my >>>> field of work, and it horrendously complicated determining the >>>> correct color, and the calculations for the appropriate color >>>> keep on changing from time to time. In other words, many >>>> different applications need this ability to classify polys based >>>> on certain attributes. So, I am creating a web app that does >>>> nothing but tell what color to use -- you give it a set of >>>> attributes, and the web app replies with the color. It would be a >>>> RESTful app, sending the color information back as JSON. How >>>> could I use this information with MapServer? >>>> >>>> In an ideal scenario, MapServer would query the data source, >>>> then, for each class in the layer, it would send a query to this >>>> color app, and the color app would tell MapServer what color to >>>> use to render the poly. The same app would be used by other apps, >>>> be they MapServer, OL, Polymaps, or even non-mapping apps such as >>>> R, etc. >>>> >>>> Suggestions on how to proceed? >>>> >>>> -- >>>> Puneet Kishor >>>> _______________________________________________ >>>> 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 emmanuel.belo at camptocamp.com Tue Aug 23 09:11:28 2011 From: emmanuel.belo at camptocamp.com (Emmanuel Belo) Date: Tue, 23 Aug 2011 18:11:28 +0200 Subject: [mapserver-users] Problem GetFeature with geom filter on WFS In-Reply-To: <84446DEF76453C439E9E97E438E13A6301A120@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301A120@suutari.haapa.mmm.fi> Message-ID: Hi, is anyone of the community interested in fixing this issue in Mapserver? We could remove the limit, but having a first BBOX filter in PostGIS would be a good solution to select candidates for mapserver to do the precise geographical filtering. Please contact me, I could provide some funding for this issue to be solved. Best regards, Emmanuel Belo emmanuel.belo at camptocamp.com On 18 August 2011 18:23, Rahkonen Jukka wrote: > Hi, > > I agree that if Mapserver is doing the final filtering then passing > maxFeatures="100" value for the query selecting the candidates is not right. > But have you tested what happens if you run your WFS query without > maxFeatures? It would be good to know if the result set is OK then. > > -Jukka Rahkonen- > > St?phane Brunner wrote: > > > > Hello Steve, > > > > Sorry for the delay. I as on holiday last couple of weeks but the > > issue is still a blocker for us. > > > > Your say ? PostGIS should be returning an appropriate set of candidate > > features ? but with our request PostGIS returns only the 100 first > > features (a subset of all features) without taking any geographical > > aspect into account. MapServer filters them correctly but as we get > > only the 100 first results from the DB, we miss many objects and/or > > they are not related to the area where we want to apply a geographical > > filter. We've done a test on how MapServer handles the 100 first > > results and it's working. > > > > We also tested the behavior with a SHP file and it works like a charm, > > there is no limitation. For our understanding, there is an issue in > > the way mapserver pass the query to PostGIS as there is an > > inappropriate LIMIT value in the SQL statement and mapserver doesn't > > seem to pass a BBOX in order to prefilter the set in the DB. > > > > Best regards > > St?phane Brunner > > > > > > 2011/7/30 Steve Lime : > > > The filter encoding code only translates certain things > > into native SQL, the rest is handled in a uniform way within > > MapServer. Hopefully this will change over time and more > > processing will be moved to the database but there hasn't > > been time to do that yet, maybe for 6.2. > > > > > > PostGIS should be returning an appropriate set of candidate > > features for MapServer to perform additional filtering. > > Shapefiles work the same way. If you look at the SQL executed > > by Postgres you should see all of the matching features plus > > a few more. > > > > > > Steve > > > > > > Sent from my iPad > > > > > > On Jul 28, 2011, at 9:18 AM, St?phane Brunner > > wrote: > > > > > >> Hello, > > >> > > >> I log the sql request on spatial filter and I have this: > > >> select > > "oid","nummer","gemeinde","gueltigkeit","flgrundb","quote","ei > > gentuemer","adresse_lang",encode(ST_AsBinary(ST_Force_2D("geom > "),'NDR'),'hex') > > >> as geom,"oid" from (SELECT oid, t1.geom, t1.nummer, t2.gemeinde, > > >> t1.gueltigkeit1_txt as gueltigkeit, t2.flgrundb, > > ((t2.zaehler::text || > > >> '/'::text) || t2.nenner::text) AS quote, t2.eigentuemer, > > >> (((t2.adresse::text || ', '::text) || t2.plz::text) || ' > > '::text) || > > >> t2.ort::text AS adresse_lang FROM > > av.liegenschaften_liegenschaft_area > > >> as t1, av.view_gemlis_geomaste_parzelle as t2 WHERE > > t1.gdid = t2.gdeid > > >> and t1.nummer = t2.parznr::text) AS foo where geom && > > >> GeomFromText('POLYGON((620000 218000,620000 278000,690000 > > >> 278000,690000 218000,620000 218000))',-1) limit 100 > > >> > > >> I didn't see any postggis filter than I try to do a > > spatial filter on > > >> one of the 100 first results > > >> Than I have a correct result ... > > >> > > >> Than why mapserver doesn't use postgis spatial filter ? > > Does I miss something ? > > >> > > >> Thank-you in advance > > >> St?phane Brunner > > >> > > >> > > >> > > >> 2011/7/26 St?phane Brunner : > > >>> Hello, > > >>> > > >>> I just test it with a shape file, and it's working... > > >>> I will investigate a little bit more to know why it's not > > working with postgres. > > >>> > > >>> Sincerely > > >>> St?phane Brunner > > >>> > > >>> > > >>> 2011/7/25 Steve Lime : > > >>>> Never mind on version, I saw 6.0.0 in the response... ;-) Steve > > >>>> > > >>>> On Mon, Jul 25, 2011 at 6:19 AM, St?phane Brunner > > >>>> wrote: > > >>>>> > > >>>>> Hello, > > >>>>> > > >>>>> I have the mapfile [0]. when I done a GetFeature on the > > nummer [1] I > > >>>>> have 4 results [2] (with duplicate but it's an other issue). > > >>>>> When I done a spatial filter [3] I have no results [4] > > but I should > > >>>>> have at least one result ... > > >>>>> > > >>>>> Thanks in advance for having a look on this issue. > > >>>>> > > >>>>> Sincerely yours > > >>>>> St?phane Brunner > > >>>>> > > >>>>> Following: specified, GetCapabilities [5], > > describefeaturetype [6]. > > >>>>> > > >>>>> mapfile [0]: > > >>>>> MAP > > >>>>> NAME "map" > > >>>>> > > >>>>> EXTENT 620000 218000 690000 278000 > > >>>>> > > >>>>> UNITS METERS > > >>>>> IMAGETYPE jpeg > > >>>>> RESOLUTION 72 > > >>>>> DEFRESOLUTION 72 > > >>>>> IMAGECOLOR 255 255 255 > > >>>>> STATUS ON > > >>>>> FONTSET "fonts.conf" > > >>>>> SYMBOLSET "symbole.sym" > > >>>>> MAXSIZE 5000 > > >>>>> > > >>>>> PROJECTION > > >>>>> "init=epsg:21781" > > >>>>> END > > >>>>> > > >>>>> #### > > >>>>> # Used by overlays > > >>>>> #### > > >>>>> OUTPUTFORMAT > > >>>>> NAME png256 > > >>>>> DRIVER AGG/PNG > > >>>>> MIMETYPE "image/png256" > > >>>>> IMAGEMODE RGBA > > >>>>> EXTENSION "png" > > >>>>> FORMATOPTION "INTERLACE=OFF" > > >>>>> FORMATOPTION "QUANTIZE_FORCE=ON" > > >>>>> FORMATOPTION "QUANTIZE_DITHER=OFF" > > >>>>> FORMATOPTION "QUANTIZE_COLORS=256" > > >>>>> END > > >>>>> OUTPUTFORMAT > > >>>>> NAME png > > >>>>> DRIVER AGG/PNG > > >>>>> MIMETYPE "image/png" > > >>>>> IMAGEMODE RGBA > > >>>>> EXTENSION "png" > > >>>>> FORMATOPTION "INTERLACE=OFF" > > >>>>> FORMATOPTION "QUANTIZE_DITHER=OFF" > > >>>>> END > > >>>>> > > >>>>> WEB > > >>>>> METADATA > > >>>>> "ows_title" "map" > > >>>>> "ows_srs" "epsg:21781" > > >>>>> "ows_encoding" "UTF-8" > > >>>>> "wms_feature_info_mime_type" > > "application/vnd.ogc.gml" > > >>>>> "wms_enable_request" "*" > > >>>>> "ows_enable_request" "*" > > >>>>> "gml_include_items" "all" > > >>>>> "gml_featureid" "id" > > >>>>> "wfs_title" "map" > > >>>>> "wfs_srs" "epsg:21781" > > >>>>> END > > >>>>> IMAGEPATH '/var/tmp/' > > >>>>> END > > >>>>> > > >>>>> LEGEND > > >>>>> IMAGECOLOR 240 240 240 > > >>>>> LABEL > > >>>>> FONT arial > > >>>>> ANTIALIAS true > > >>>>> TYPE truetype > > >>>>> SIZE 9 > > >>>>> COLOR 0 0 0 > > >>>>> END > > >>>>> END > > >>>>> > > >>>>> > > >>>>> LAYER > > >>>>> NAME "Liegenschaft_Query" > > >>>>> TYPE POLYGON > > >>>>> STATUS ON > > >>>>> TEMPLATE fooOnlyForWMSGetFeatureInfo > > >>>>> CONNECTIONTYPE postgis > > >>>>> PROCESSING "CLOSE_CONNECTION=DEFER" > > >>>>> CONNECTION "user=www-data password=www-data dbname=dev > > host=localhost" > > >>>>> DATA "geom from (SELECT oid, t1.geom, t1.nummer FROM > > >>>>> av.view_i_liegenschaft_all AS t1) AS foo using unique oid using > > >>>>> SRID=-1" > > >>>>> # GROUP "TOPIC_Liegenschaften_LN" > > >>>>> EXTENT 620000 218000 690000 278000 > > >>>>> METADATA > > >>>>> "ows_title" "Liegenschaft_Query" > > >>>>> "ows_srs" "epsg:21781" > > >>>>> "id_attribute_string" "oid" > > >>>>> "ows_featureid" "oid" > > >>>>> "ows_geometries" "geom" > > >>>>> "ows_geom_type" "polygon" > > >>>>> "query_returned_attributes" "nummer" > > >>>>> "gml_include_items" "oid,nummer,geom" > > >>>>> "gml_geometries" "geom" > > >>>>> "gml_geom_type" "polygon" > > >>>>> "gml_nummer_type" "Character" > > >>>>> #"gml_groups" "TOPIC_Liegenschaften_LN" > > >>>>> "gml_featureid" "oid" > > >>>>> "wfs_title" "Liegenschaft_Query" > > >>>>> "wfs_srs" "epsg:21781" > > >>>>> END > > >>>>> DUMP TRUE > > >>>>> PROJECTION > > >>>>> "init=epsg:21781" > > >>>>> END > > >>>>> > > >>>>> CLASS > > >>>>> NAME "Liegenschaft" > > >>>>> STYLE > > >>>>> SYMBOL "circle" > > >>>>> SIZE 3 > > >>>>> OUTLINECOLOR 0 0 0 > > >>>>> END > > >>>>> END > > >>>>> END > > >>>>> END > > >>>>> > > >>>>> query on the nummer [1]: > > >>>>> > service="WFS" > > >>>>> version="1.0.0" maxFeatures="100" > > >>>>> xsi:schemaLocation="http://www.opengis.net/wfs > > >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" > > >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > >>>>> > >>>>> xmlns:feature="http://mapserver.gis.umn.edu/mapserver"> > > >>>>> > > >>>>> > > >>>>> nummer > > >>>>> 3634 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> response on the nummer [2]: > > >>>>> > > >>>>> > >>>>> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > > >>>>> xmlns:wfs="http://www.opengis.net/wfs" > > >>>>> xmlns:gml="http://www.opengis.net/gml" > > >>>>> xmlns:ogc="http://www.opengis.net/ogc" > > >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > >>>>> xsi:schemaLocation="http://www.opengis.net/wfs > > >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd > > >>>>> http://mapserver.gis.umn.edu/mapserver > > >>>>> > > >>>>> > > http://c2cpc89.camptocamp.com/sbrunner/mapserv?SERVICE=WFS& > ;VERSION=1.0.0> > &REQUEST=DescribeFeatureType&TYPENAME=feature:Liegensc > > haft_Query&OUTPUTFORMAT=XMLSCHEMA"> > > >>>>> > > >>>>> > > >>>>> 661054.808000,244611.321000 > > >>>>> 663053.704000,244888.622000 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > 661054.808000,244854.251000 > > >>>>> 661088.687000,244888.622000 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> 661076.579000,244888.622000 > > >>>>> 661054.808000,244875.484000 661062.744000,244858.448000 > > >>>>> 661064.653000,244854.251000 661088.687000,244869.173000 > > >>>>> 661076.579000,244888.622000 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> 2380997 > > >>>>> 3634 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > 661054.808000,244854.251000 > > >>>>> 661088.687000,244888.622000 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> 661076.579000,244888.622000 > > >>>>> 661054.808000,244875.484000 661062.744000,244858.448000 > > >>>>> 661064.653000,244854.251000 661088.687000,244869.173000 > > >>>>> 661076.579000,244888.622000 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> 2380997 > > >>>>> 3634 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > 663017.565000,244611.321000 > > >>>>> 663053.704000,244650.084000 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> 663017.565000,244635.722000 > > >>>>> 663033.235000,244611.321000 663045.949000,244619.485000 > > >>>>> 663053.704000,244626.417000 663034.337000,244650.084000 > > >>>>> 663017.565000,244635.722000 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> 2384539 > > >>>>> 3634 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > 663017.565000,244611.321000 > > >>>>> 663053.704000,244650.084000 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> 663017.565000,244635.722000 > > >>>>> 663033.235000,244611.321000 663045.949000,244619.485000 > > >>>>> 663053.704000,244626.417000 663034.337000,244650.084000 > > >>>>> 663017.565000,244635.722000 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> 2384539 > > >>>>> 3634 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> query with spatial filter [3]: > > >>>>> > service="WFS" > > >>>>> version="1.0.0" maxFeatures="100" > > >>>>> xsi:schemaLocation="http://www.opengis.net/wfs > > >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" > > >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > >>>>> > >>>>> xmlns:feature="http://mapserver.gis.umn.edu/mapserver"> > > >>>>> > > >>>>> > > >>>>> geom > > >>>>> > srsName="EPSG:21781"> > > >>>>> 661070.024,244872.084 > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> response with spatial filter [4]: > > >>>>> > > >>>>> > >>>>> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > > >>>>> xmlns:wfs="http://www.opengis.net/wfs" > > >>>>> xmlns:gml="http://www.opengis.net/gml" > > >>>>> xmlns:ogc="http://www.opengis.net/ogc" > > >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > >>>>> xsi:schemaLocation="http://www.opengis.net/wfs > > >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd > > >>>>> http://mapserver.gis.umn.edu/mapserver > > >>>>> > > >>>>> > > http://c2cpc89.camptocamp.com/sbrunner/mapserv?SERVICE=WFS& > ;VERSION=1.0.0> > &REQUEST=DescribeFeatureType&TYPENAME=feature:Liegensc > > haft_Query&OUTPUTFORMAT=XMLSCHEMA"> > > >>>>> > > >>>>> missing > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> GetCapabilities [5]: > > >>>>> > > >>>>> > >>>>> version="1.0.0" > > >>>>> updateSequence="0" > > >>>>> xmlns="http://www.opengis.net/wfs" > > >>>>> xmlns:ogc="http://www.opengis.net/ogc" > > >>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > >>>>> xsi:schemaLocation="http://www.opengis.net/wfs > > >>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd"> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> MapServer WFS > > >>>>> Amtliche Vermessung > > >>>>> Die amtliche Vermessung nach DM01 Darstellung als WMS > > >>>>> Dienst f?r MapFish Projekte > > >>>>> > > >>>>> > > http://c2cpc89.camptocamp.com/sbrunner/mapserv > ? > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > >>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" > > >>>>> /> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > >>>>> > > onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" /> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > >>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" > > >>>>> /> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > >>>>> > > onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" /> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > >>>>> onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" > > >>>>> /> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > >>>>> > > onlineResource="http://c2cpc89.camptocamp.com/sbrunner/mapserv?" /> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> Liegenschaft_Query > > >>>>> Liegenschaft_Query > > >>>>> > > >>>>> epsg:21781 > > >>>>> > maxx="690000" > > >>>>> maxy="278000" /> > > >>>>> > > >>>>> > > >>>>> Liegenschaft_Query_ALL > > >>>>> Liegenschaft_Query_ALL > > >>>>> epsg:21781 > > >>>>> > > >>>>> > maxx="690000" > > >>>>> maxy="278000" /> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> describefeaturetype [6]: > > >>>>> > > >>>>> > >>>>> targetNamespace="http://mapserver.gis.umn.edu/mapserver" > > >>>>> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" > > >>>>> xmlns:ogc="http://www.opengis.net/ogc" > > >>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" > > >>>>> xmlns="http://www.w3.org/2001/XMLSchema" > > >>>>> xmlns:gml="http://www.opengis.net/gml" > > >>>>> elementFormDefault="qualified" version="0.1" > > > >>>>> > > >>>>> > >>>>> > schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd" > > >>>>> /> > > >>>>> > > >>>>> > >>>>> type="ms:Liegenschaft_QueryType" > > >>>>> substitutionGroup="gml:_Feature" /> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > >>>>> minOccurs="0" maxOccurs="1"/> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > >>>>> -- > > >>>>> camptocamp.com > > >>>>> mapfish.org > > >>>>> _______________________________________________ > > >>>>> mapserver-users mailing list > > >>>>> mapserver-users at lists.osgeo.org > > >>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > >>>> > > >>>> > > >>> > > >>> > > >>> > > >>> -- > > >>> camptocamp.com > > >>> mapfish.org > > >>> > > >> > > >> > > >> > > >> -- > > >> camptocamp.com > > >> mapfish.org > > > > > > > > > > > -- > > camptocamp.com > > mapfish.org > > _______________________________________________ > > 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 > -- Camptocamp SA Emmanuel BELO PSE A CH-1015 Lausanne +41 21 619 10 25 (direct) +41 21 619 10 10 (centrale) +41 21 619 10 00 (fax) -------------- next part -------------- An HTML attachment was scrubbed... URL: From acarolinagc at gmail.com Wed Aug 24 09:29:51 2011 From: acarolinagc at gmail.com (Amalia Carolina Canavire) Date: Wed, 24 Aug 2011 13:29:51 -0300 Subject: [mapserver-users] Fwd: [Gvsig_usuarios] Fwd: consulta de novato consultas sql , mapserver, gvsig In-Reply-To: References: Message-ID: Teniendo en cuenta la respuesta de foro, como es posible hacer lo siguiente: * Lo hecho: Muestro en pagina web, parcelas de un lugar , tal q puedo hacer zoom, recorrer mapa, tomando los datos de postgres. * Lo que deseo: deseo ahora poder hacer consultas a base de dato, tal q pueda por ejemplo al selecionar un atributo supongamos tama?o , visualizar con otro color las parcelas q superan determinado tama?o, con GVSIG puedo hacer filtros de base de datos, pero como hago lo mismo com mapscript, siguiendo el ejemplo que me brindaron y puse al final logre tomar la columna tam de base de dato y se la paso a por setExpression, pero mi duda es COMO HAGO PARA Q ME COLOREE O ME COLOQUE UN SIMBOLO EN LAS PARCELAS DETERMINADAS, porque con la sugerencia muestro lo mismo q la capa q tiene todos las parcelas.Capaz mis preguntas sean redundantes, pero quiero aprender. Tengo este map con el q toy probando de manera simple una capa tiene todas las parcelas del lugar, la otra capa es de un ejemplo q tome de alguien generoso q brindo sugerencia MAP NAME map_generated_by_gvsig SIZE 600 400 EXTENT 529495.77 602500.66 588410.0 660675.0 SYMBOLSET "dmWmsDB2.sym" FONTSET "fonts.txt" LEGEND IMAGECOLOR -1 -1 -1 LABEL FONT "vera" ANGLE FOLLOW COLOR 0 0 0 ENCODING "UTF-8" TYPE truetype SIZE 8 END STATUS ON TRANSPARENT ON END WEB METADATA "wms_encoding" "UTF-8" "wms_title" "Mapserver WMS" "wms_abstract" "" "wms_srs" " EPSG:4326" "wms_onlineresource" " http://localhost/cgi-bin/mapserv?map=%2Fvar%2Fwww%2FgisPrueba1%2FdmWmsDB2.map " END END PROJECTION "init=epsg:4326" END LAYER NAME "public.alachua" STATUS ON TYPE POLYGON CONNECTIONTYPE POSTGIS CONNECTION "user=XXXpassword=XXX host=XXX port=XXX dbname=XXX" DATA "the_geom from xxxxx as subquery using unique gid using srid=4326" MAXSCALE -1.0 MINSCALE -1.0 TRANSPARENCY 100 SIZEUNITS pixels PROJECTION "init=epsg:4326" END CLASS STYLE COLOR 255 51 51 OUTLINECOLOR 28 90 49 WIDTH 1 END NAME "default" END METADATA "wms_title" "public.alachua" "wms_abstract" "generated by gvSIG" "wms_extent" "529495.77 602500.66 588409.96 660674.98" "gml_include_items" "all" END END # Layer LAYER NAME "filtro" STATUS ON TYPE POLYGON CLASSITEM "hola" CONNECTIONTYPE POSTGIS CONNECTION "user=XXXpassword=XXX host=XXX port=XXX dbname=XXX" DATA "the_geom from xxxxx as subquery using unique gid using srid=4326" TYPE POLYGON CLASSITEM "tam" PROJECTION "init=epsg:4326" END #fin projection CLASS NAME "parcela" STYLE SYMBOL 0 OUTLINECOLOR 96 96 96 SIZE 2 END #fin style END #fin class METADATA "wms_title" "public.alachua" "wms_abstract" "generated by gvSIG" "wms_extent" "529495.77 602500.66 588409.96 660674.98" END END # layer END php $jMap = ms_newMapObj("/var/www/gisPrueba1/".$nombreMapa.".map"); $layer = $jMap->getLayerByName('filtro'); $clasp = $layer->getClass('parcela'); $clasp->setExpression("tam"); LO QUE HAGO CON GVSIG, EN DONDE LO AMARILLO ES DE CONSULTA, A ESO QUIERO LLEGAR A HACER DINAMICANTE? [image: Screenshot-1.png] Perd?n el anterior mail anterior sali? cortado. > > Insisto en que investigues MapScritp. Es la ?nica forma que conozco (quiz?s > alguien en la lista conozca otra) de pasar par?metros v?a formulario html > para definir la simbolog?a a aplicar. > > Te adjunto un ejemplo: > > ------En el Mapfile > > LAYER > NAME "*Parcelas*" > STATUS ON > CONNECTIONTYPE POSTGIS > CONNECTION "host=localhost dbname=BD user=uuuuu password=xxxxxxx" > DATA "the_geom from parcelas USING UNIQUE gid USING SRID=4326" > TYPE POLYGON > *CLASSITEM* "*idmza*" > PROJECTION > "init=epsg:4326" > END #fin projection > * CLASS* > *NAME* "*Parce*" > STYLE > SYMBOL 0 > OUTLINECOLOR 96 96 96 > SIZE 2 > END #fin style > END #fin class > END #fin layer > > ---------En tu aplicaci?n WEB > > $variable= "proveniente del formulario"; > > 1? Consulta a la BD > > $query = "*SELECT idmza FROM parcelas WHERE manzana = '$variable*'; > $result = pg_Exec($dbconn, $query); > $row = pg_Fetch_Row($result, 0); > *$filtro * = $row[1]; > > 2? Definici?n del Mapfile > > //Ubicaci?n del map file > $map_path="c:/ms4w/apps/mapa_web/"; > $map = ms_newMapObj($map_path."/*mapa_parcelas.map*"); > > 3? Filtrar parcelas con el resultado de la consulta > //para filtrar las parcelas > $layer = $map->getLayerByName('*Parcelas*'); // se posiciona en el > layer Parcelas > $clasp = $layer->getClass('*Parce*'); //Obtiene el objeto > CLASS de nombre 'Parce' del layer Parcelas > $clasp->setExpression(*$filtro*); //Solo las > parcelas con el mismo "idmza" se representaran con el estilo definido en el > CLASS 'Parce' > > 4? Imprimir el mapa > > //dibujar mapa > $image=$map->draw(); > $image_url=$image->saveWebImage(); > > > Luego en el cuerpo de la p?gina imprim?s la imagen que queda guardada en > "$image_url" > > Espero te sirva de gu?a! > Saludos > > PD: te recomiendo env?es tus consultas a la lista de Mapserver[1] o a > OSGEOes[2], para no mezclar temas. > > [1] http://www.osgeo.org/mailman/listinfo/mapserver-users > [2] http://lists.osgeo.org/mailman/listinfo/spanish > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-1.png Type: image/png Size: 280348 bytes Desc: not available URL: From jk.chen at sdl.usu.edu Fri Aug 26 10:52:25 2011 From: jk.chen at sdl.usu.edu (JK Chen) Date: Fri, 26 Aug 2011 17:52:25 +0000 Subject: [mapserver-users] my overview map is dark, what is going on? Is it because of map server (I created), or the client code? Message-ID: <75E6E48D29E14B4C93DA8ADFCA6D205A11C2CC82@Mercury.usurf.usu.edu> Hi, I made my own map using the Map Server and client with OpenLayers. At zoom out levels, my Overview map becomes dark, however, the box in there is draggable. But, how come it is dark? How to fix that? Root cause? Sorry, I'm very new to the map space. So, pardon me for the questions. I included these in this email thread. * Map file, is listed end of the email. * Here is the screen shot I got. Attached. * OpenLayers code used to create the map is also listed here. The screenshot can be accessed here too. http://osgeo-org.1803224.n2.nabble.com/file/n6729648/Dark_Overview_Map.jpg OpenLayers code: this.wms_basic_layer = new OpenLayers.Layer.WMS( wms.wms_layer_display_name, wms.wms_url, {layers: wms.wms_layer_name}, {wrapDateLine: true}); this.map.addLayer(this.wms_basic_layer) Map file: MAP # a Map file starts with MAP keyword #CONFIG "MS_ERRORFILE" "c:\dev\ms_error.txt" #DEBUG 5 IMAGETYPE jpeg EXTENT -180 -90 180 90 SIZE 256 256 SHAPEPATH "." IMAGECOLOR 255 255 255 CONFIG "PROJ_LIB" "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/cgi-bin/" PROJECTION "init=epsg:4326" END WEB MINSCALEDENOM 1000 MAXSCALEDENOM 7000000 METADATA "wms_title" "WMS Server" "wms_abstract" "Vantage WMS Server" END END LAYER #basemap NAME basemap # layer name exposted to URL EXTENT -180 -90 180 90 # cover the entire world TILEINDEX "baseGN" # referring to shape file SHAPEPAH\TITLEIDEX.shp TILEITEM "location" # always "location" STATUS ON TYPE RASTER # it's raster image METADATA "wms_title" "basemap" END END END -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Dark Overview Map.jpg Type: image/jpeg Size: 131361 bytes Desc: Dark Overview Map.jpg URL: From havard.tveite at umb.no Sat Aug 27 14:44:07 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Sat, 27 Aug 2011 23:44:07 +0200 Subject: [mapserver-users] problem with Symbol and Style In-Reply-To: References: Message-ID: <4E596527.7010503@umb.no> Valeria, To display simple lines (in the latest versions of Mapserver), you should take away the SYMBOL from the STYLE, and specify the WIDTH of the line (not the SIZE). You can skip ANTIALIAS (you can't even turn it off for AGG). STYLE WIDTH 12 COLOR 200 112 64 END STYLE WIDTH 10 COLOR 224 136 72 END H?vard On 26/08/11 23:32, Valeria Mu?oz wrote: > HI!!! > > i have problem with my mapfile. i'm trying to display street but i just > get circle like this not a continuous and perfect line. > > my mapserver version is 6. > > > please help!! > > my code is: > > LAYER > NAME 'RM' > TYPE LINE > MAXSCALE 15000 > LABELMAXSCALE 15000 > MINSCALE 5000 > LABELMINSCALE 5000 > DATA 'street.shp' > METADATA > 'wms_title'RM' > END > STATUS DEFAULT > TRANSPARENCY 100 > PROJECTION > 'proj=longlat' > 'ellps=WGS84' > 'datum=WGS84' > 'no_defs' > '' > END > LABELITEM 'NAME' > CLASS > > NAME 'c_RM' > STYLE > SYMBOL 'linecc' > ANTIALIAS TRUE > SIZE 12 > COLOR 200 112 64 > END > STYLE > SYMBOL 'defline' > ANTIALIAS TRUE > SIZE 10 > COLOR 224 136 72 > END > LABEL > TYPE truetype > FONT 'arialbd' > SIZE 9 > MINSIZE 9 > MAXSIZE 9 > ANTIALIAS TRUE > COLOR 25 25 25 > ANGLE FOLLOW > FORCE FALSE > POSITION cc > BUFFER 10 > MINDISTANCE 7000 > MINFEATURESIZE 50 > OFFSET 0 0 > PARTIALS FALSE > END > END > END > > Symbol > Name 'linecc' > Type ELLIPSE > Filled TRUE > ANTIALIAS TRUE > Points > 1 1 > END > END > Symbol > Name 'defline' > Type ELLIPSE > Filled TRUE > ANTIALIAS TRUE > Points > 1 1 > END > END > > From punk.kish at gmail.com Sat Aug 27 15:02:11 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 27 Aug 2011 17:02:11 -0500 Subject: [mapserver-users] baby steps with MapScript (problem) Message-ID: <09176724-4E93-432B-8EFD-D125E69D34A2@gmail.com> I am relearning MapScript after years of innocence. I have a fairly simple script like so (also at http://pastebin.com/7rehitjH). The image is created, but is empty, plain white. There is some silliness on my part, something obvious I am overlooking or doing wrong, and I need someone to point it to me. Needless to say, the same map draws fine via MapServer CGI -- my $map = new mapscript::mapObj(); warn "New mapObj() error: $mapscript::ms_error->{message}\n" unless $map; $map->{status} = $mapscript::MS_ON; # STATUS ON $map->{units} = $mapscript::MS_DD; # UNITS DD $map->setImageType('png'); # IMAGETYPE PNG $map->{imagecolor} = new mapscript::colorObj(255, 255, 255); # IMAGECOLOR 255 255 255 $map->setSize(1000, 600); # SIZE 1000 600 $map->setExtent( -180, -90, 180, 90 ); # EXTENT -180 -90 180 90 $map->selectOutputFormat( 'png' ); # Choose active output format $map->setProjection( "proj=latlong" ); # PROJECTION # "proj=latlong" # END my $outputFormatObj = new mapscript::outputFormatObj('GD/PNG'); # DRIVER "GD/PNG" $outputFormatObj->setExtension('png'); # EXTENSION "png" $outputFormatObj->setMimetype('image/png'); # MIMETYPE "image/png" $outputFormatObj->{imagemode} = $mapscript::MS_IMAGEMODE_RGB; # IMAGEMODE RGB | PC256 $map->setOutputFormat( $outputFormatObj ); my $layerObj = new mapscript::layerObj($map); $layerObj->setConnectionType($mapscript::MS_POSTGIS, ''); $layerObj->{connection} = "host=127.0.0.1 port=5432 dbname=$db user=$dbuser password=$pwd"; $layerObj->{data} = 'the_geom FROM table USING UNIQUE gid'; my $classObj = new mapscript::classObj($layerObj); $classObj->{name} = 'foo'; my $styleObj = new mapscript::styleObj($classObj); $styleObj->{color} = new mapscript::colorObj( 132, 132, 132); $styleObj->{outlinecolor} = new mapscript::colorObj(0, 0, 0); # create an image for drawing. my $img = $map->draw(); warn "prepareImage() error: $mapscript::ms_error->{message}\n" unless $img; $img->save("$tmp_dir/$image_name"); From punk.kish at gmail.com Sat Aug 27 15:53:15 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 27 Aug 2011 17:53:15 -0500 Subject: [mapserver-users] Re: baby steps with MapScript (problem) In-Reply-To: <09176724-4E93-432B-8EFD-D125E69D34A2@gmail.com> References: <09176724-4E93-432B-8EFD-D125E69D34A2@gmail.com> Message-ID: <67DAC809-8F61-4773-8DF2-6A6F43021491@gmail.com> Never mind... figured out the error, and its working now, On Aug 27, 2011, at 5:02 PM, Mr. Puneet Kishor wrote: > I am relearning MapScript after years of innocence. I have a fairly simple script like so (also at http://pastebin.com/7rehitjH). The image is created, but is empty, plain white. There is some silliness on my part, something obvious I am overlooking or doing wrong, and I need someone to point it to me. Needless to say, the same map draws fine via MapServer CGI -- > > my $map = new mapscript::mapObj(); > warn "New mapObj() error: $mapscript::ms_error->{message}\n" unless $map; > > $map->{status} = $mapscript::MS_ON; # STATUS ON > $map->{units} = $mapscript::MS_DD; # UNITS DD > $map->setImageType('png'); # IMAGETYPE PNG > $map->{imagecolor} = new mapscript::colorObj(255, 255, 255); # IMAGECOLOR 255 255 255 > $map->setSize(1000, 600); # SIZE 1000 600 > $map->setExtent( -180, -90, 180, 90 ); # EXTENT -180 -90 180 90 > $map->selectOutputFormat( 'png' ); # Choose active output format > $map->setProjection( "proj=latlong" ); # PROJECTION > # "proj=latlong" > # END > > my $outputFormatObj = new mapscript::outputFormatObj('GD/PNG'); # DRIVER "GD/PNG" > $outputFormatObj->setExtension('png'); # EXTENSION "png" > $outputFormatObj->setMimetype('image/png'); # MIMETYPE "image/png" > $outputFormatObj->{imagemode} = $mapscript::MS_IMAGEMODE_RGB; # IMAGEMODE RGB | PC256 > > $map->setOutputFormat( $outputFormatObj ); > > my $layerObj = new mapscript::layerObj($map); > $layerObj->setConnectionType($mapscript::MS_POSTGIS, ''); > $layerObj->{connection} = "host=127.0.0.1 port=5432 dbname=$db user=$dbuser password=$pwd"; > $layerObj->{data} = 'the_geom FROM table USING UNIQUE gid'; > > my $classObj = new mapscript::classObj($layerObj); > $classObj->{name} = 'foo'; > > my $styleObj = new mapscript::styleObj($classObj); > $styleObj->{color} = new mapscript::colorObj( 132, 132, 132); > $styleObj->{outlinecolor} = new mapscript::colorObj(0, 0, 0); > > # create an image for drawing. > my $img = $map->draw(); > warn "prepareImage() error: $mapscript::ms_error->{message}\n" unless $img; > > $img->save("$tmp_dir/$image_name"); From punk.kish at gmail.com Sat Aug 27 16:02:19 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sat, 27 Aug 2011 18:02:19 -0500 Subject: [mapserver-users] layer classification with MapScript Message-ID: <31425F5E-BBE3-4E52-8237-FE6C16137BCA@gmail.com> I have a layer classification issue. I want to do something along the lines of (semi-pseudocode ahead) -- $layerObj->{data} = 'the_geom FROM (SELECT gid, the_geom, class_name, class_color FROM table) t USING UNIQUE gid'; $layerObj->{classitem} = 'class_name'; while (my $row in $layerObj->{data}) { create class with 'name = class_name', 'expression = class_name', 'color = class_color' } How do I iterate over the rows retrieved from the table in order to create classes? I don't see any obvious reference to a db result set. From bfraser at geoanalytic.com Sun Aug 28 08:19:04 2011 From: bfraser at geoanalytic.com (Brent Fraser) Date: Sun, 28 Aug 2011 09:19:04 -0600 Subject: [mapserver-users] layer classification with MapScript In-Reply-To: <31425F5E-BBE3-4E52-8237-FE6C16137BCA@gmail.com> References: <31425F5E-BBE3-4E52-8237-FE6C16137BCA@gmail.com> Message-ID: <4E5A5C68.4020304@geoanalytic.com> Puneet, If you don't care about mapserver generating a legend graphic, you could use mapserver CGI's ability (no scripting required) to do attribute binding (get values from a feature's attribute values). I've used a single class def of: CLASS STYLE # Line, Poly and Point outline SYMBOL [sSymbol] OUTLINECOLOR [sOutlineColor] COLOR [sColor] SIZE [sSize] END TEXT ([Label]) LABEL ANGLE AUTO POSITION UR COLOR [lColor] OUTLINECOLOR [lOutlineColor] TYPE truetype FONT 'Arial' SIZE [lSize] END END where the data/connection accessed a view joining the feature table to a class table where the styling values were defined. And you need 3 layer defs, one for points, lines and polygons. But using this technique, there is no way to get a legend graphic show all the classes. So in your PHP code you would need to do a generic database query to get a set of classes, then for each row create a class object and add it to the layer object. Then have mapscript process the features and render a map image by doing a draw() (and a legend graphic by doing a drawLegend()). Or, as others have suggested, you could pass an SLD to mapserver via WMS and request a legend graphic. Best Regards, Brent Fraser On 8/27/2011 5:02 PM, Mr. Puneet Kishor wrote: > I have a layer classification issue. I want to do something along the lines of (semi-pseudocode ahead) -- > > $layerObj->{data} = 'the_geom FROM (SELECT gid, the_geom, class_name, class_color FROM table) t USING UNIQUE gid'; > $layerObj->{classitem} = 'class_name'; > > while (my $row in $layerObj->{data}) { > create class with 'name = class_name', 'expression = class_name', 'color = class_color' > } > > How do I iterate over the rows retrieved from the table in order to create classes? I don't see any obvious reference to a db result set._______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From valemunoz at gmail.com Sun Aug 28 11:30:04 2011 From: valemunoz at gmail.com (Valeria Munoz I) Date: Sun, 28 Aug 2011 14:30:04 -0400 Subject: [mapserver-users] problem with Symbol and Style In-Reply-To: <4E596527.7010503@umb.no> References: <4E596527.7010503@umb.no> Message-ID: <2D8D2D25-6588-464B-B480-07A57E2CBE52@gmail.com> Can i display a outliner? Thanks for the reply!! Enviado desde mi iPhone El 27-08-2011, a las 17:44, Havard Tveite escribi?: > Valeria, > > To display simple lines (in the latest versions of > Mapserver), you should take away the SYMBOL from the > STYLE, and specify the WIDTH of the line (not the > SIZE). You can skip ANTIALIAS (you can't even turn > it off for AGG). > > STYLE > WIDTH 12 > COLOR 200 112 64 > END > STYLE > WIDTH 10 > COLOR 224 136 72 > END > > > H?vard > > On 26/08/11 23:32, Valeria Mu?oz wrote: >> HI!!! >> >> i have problem with my mapfile. i'm trying to display street but i just >> get circle like this not a continuous and perfect line. >> >> my mapserver version is 6. >> >> >> please help!! >> >> my code is: >> >> LAYER >> NAME 'RM' >> TYPE LINE >> MAXSCALE 15000 >> LABELMAXSCALE 15000 >> MINSCALE 5000 >> LABELMINSCALE 5000 >> DATA 'street.shp' >> METADATA >> 'wms_title'RM' >> END >> STATUS DEFAULT >> TRANSPARENCY 100 >> PROJECTION >> 'proj=longlat' >> 'ellps=WGS84' >> 'datum=WGS84' >> 'no_defs' >> '' >> END >> LABELITEM 'NAME' >> CLASS >> >> NAME 'c_RM' >> STYLE >> SYMBOL 'linecc' >> ANTIALIAS TRUE >> SIZE 12 >> COLOR 200 112 64 >> END >> STYLE >> SYMBOL 'defline' >> ANTIALIAS TRUE >> SIZE 10 >> COLOR 224 136 72 >> END >> LABEL >> TYPE truetype >> FONT 'arialbd' >> SIZE 9 >> MINSIZE 9 >> MAXSIZE 9 >> ANTIALIAS TRUE >> COLOR 25 25 25 >> ANGLE FOLLOW >> FORCE FALSE >> POSITION cc >> BUFFER 10 >> MINDISTANCE 7000 >> MINFEATURESIZE 50 >> OFFSET 0 0 >> PARTIALS FALSE >> END >> END >> END >> >> Symbol >> Name 'linecc' >> Type ELLIPSE >> Filled TRUE >> ANTIALIAS TRUE >> Points >> 1 1 >> END >> END >> Symbol >> Name 'defline' >> Type ELLIPSE >> Filled TRUE >> ANTIALIAS TRUE >> Points >> 1 1 >> END >> END >> >> > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From punk.kish at gmail.com Sun Aug 28 11:27:41 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sun, 28 Aug 2011 13:27:41 -0500 Subject: [mapserver-users] layer classification with MapScript In-Reply-To: References: <31425F5E-BBE3-4E52-8237-FE6C16137BCA@gmail.com> Message-ID: On Aug 28, 2011, at 8:11 AM, Cristiano Sumariva wrote: > You can do database stuff using your programming language to access the > database. > > To create classes there is the msNewClassObj function to append a class to > an layer reference. > You can get function details in documentation page at > http://mapserver.org/mapscript/php/index.html#classes. > > If you want walk over records from the data statement declared on the data > field, maybe using the getShape( ), getNumResults() method on your layer > reference may do what you want. But I do not have practice using it. > > for ( loop = 0; loop < layer->getNumResults(); loop + 1 ) > dbRowFromDataField = layer->getResult( loop ); > class = msnewclass( layer ); > class->set( name, dbRowFromDataField.field ); > ... The above seems logical, but I think it might have to do with the results from a "click" query rather than the data retrieved by MS from the data source in the first place. In any case, the following doesn't do anything at all (empty, white image) -- for ( 0 .. $layerObj->getNumResults() - 1) { my $row = $layerObj->getResult( $_ ); my $classObj = new mapscript::classObj( $layerObj ); $classObj->{name} = $row->{interval_name}; my $styleObj = new map script::styleObj( $classObj ); set style color based on $row->{class_color}; } > > > 2011/8/27 Mr. Puneet Kishor > >> I have a layer classification issue. I want to do something along the lines >> of (semi-pseudocode ahead) -- >> >> $layerObj->{data} = 'the_geom FROM (SELECT gid, the_geom, class_name, >> class_color FROM table) t USING UNIQUE gid'; >> $layerObj->{classitem} = 'class_name'; >> >> while (my $row in $layerObj->{data}) { >> create class with 'name = class_name', 'expression = class_name', >> 'color = class_color' >> } >> >> How do I iterate over the rows retrieved from the table in order to create >> classes? I don't see any obvious reference to a db result >> set._______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> From punk.kish at gmail.com Sun Aug 28 12:32:49 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sun, 28 Aug 2011 14:32:49 -0500 Subject: [mapserver-users] layer classification with MapScript In-Reply-To: References: <31425F5E-BBE3-4E52-8237-FE6C16137BCA@gmail.com> Message-ID: <4D8950A3-833A-44B1-AB25-94979D88F6D1@gmail.com> On Aug 28, 2011, at 1:27 PM, Mr. Puneet Kishor wrote: > > On Aug 28, 2011, at 8:11 AM, Cristiano Sumariva wrote: > >> You can do database stuff using your programming language to access the >> database. >> >> To create classes there is the msNewClassObj function to append a class to >> an layer reference. >> You can get function details in documentation page at >> http://mapserver.org/mapscript/php/index.html#classes. >> >> If you want walk over records from the data statement declared on the data >> field, maybe using the getShape( ), getNumResults() method on your layer >> reference may do what you want. But I do not have practice using it. >> >> for ( loop = 0; loop < layer->getNumResults(); loop + 1 ) >> dbRowFromDataField = layer->getResult( loop ); >> class = msnewclass( layer ); >> class->set( name, dbRowFromDataField.field ); >> ... > > > The above seems logical, but I think it might have to do with the results from a "click" query rather than the data retrieved by MS from the data source in the first place. In any case, the following doesn't do anything at all (empty, white image) -- > > for ( 0 .. $layerObj->getNumResults() - 1) { > my $row = $layerObj->getResult( $_ ); > my $classObj = new mapscript::classObj( $layerObj ); > $classObj->{name} = $row->{interval_name}; > my $styleObj = new map script::styleObj( $classObj ); > set style color based on $row->{class_color}; > } > >> >> Heh, the above code was ridiculous on my part... it would try to create a new class for every single feature. Instead, the following works just fine my $dbh = DBI->connect( .. ); my $sth = $dbh->prepare("SELECT class_name, class_color FROM color_table"); $sth->execute; while (my ($class_name, $class_color) = $sth->fetchrow_array) { my $classObj = new mapscript::classObj( $layerObj ); $classObj->{name} = $class_name; $classObj->setExpression( $class_name ); my $styleObj = styleObj(classObj => $classObj, colorObj => colorObj('hex' => $class_color)); } I get all the classes made correctly without having to code them individually. The only minor downside, I have to make two different db calls -- one for MapServer, to get all the features, and one for the color information. Now, on to the next step -- retrieve these color values via a REST API, which is really my original aim. >> 2011/8/27 Mr. Puneet Kishor >> >>> I have a layer classification issue. I want to do something along the lines >>> of (semi-pseudocode ahead) -- >>> >>> $layerObj->{data} = 'the_geom FROM (SELECT gid, the_geom, class_name, >>> class_color FROM table) t USING UNIQUE gid'; >>> $layerObj->{classitem} = 'class_name'; >>> >>> while (my $row in $layerObj->{data}) { >>> create class with 'name = class_name', 'expression = class_name', >>> 'color = class_color' >>> } >>> >>> How do I iterate over the rows retrieved from the table in order to create >>> classes? I don't see any obvious reference to a db result >>> set._______________________________________________ >>> maps From Jukka.Rahkonen at mmmtike.fi Sun Aug 28 13:55:56 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Sun, 28 Aug 2011 20:55:56 +0000 Subject: [mapserver-users] Mapserver unnecessary slow with Spatialite Message-ID: <84446DEF76453C439E9E97E438E13A6301E172@suutari.haapa.mmm.fi> Hi, I have been playing a bit with Mapserver 6.0 and Spatialite and I was a bit surprised about how slow this combination is with any bigger Spatialite database. I asked for an opinion from Mr. Alesandro Furieri who wrote me some hints for making efficient queries which are utilising spatial index. This query comes basically from OGR Spatialite driver page http://www.gdal.org/ogr/drv_sqlite.html SELECT geometry, osm_id, highway, ref, name, tunnel FROM osm_line WHERE highway IS NOT NULL AND MBRIntersects(geometry, BuildMBR(1487400, 6894200, 1487500, 6894300)) ORDER BY z_order; OGR documentation says that query is using spatial index. However, Alesandro writes that it does not and suggests another SQL which is 20 times faster. Alesandro wrote: " Berlin dataset, your original SQL: I've simply adjusted the MBR coords. Execution time: 397 millis Please note: this layer contains very few rows (< 100k): so not using the Spatial Index imposes a very bland (but still noticeable) overhead. ================= SELECT geometry, osm_id, highway,ref, name, tunnel FROM osm_line WHERE highway IS NOT NULL AND ROWID IN ( SELECT pkid FROM idx_osm_line_GEOMETRY WHERE xmax > 1487400 AND xmin < 1487500 AND ymax > 6894200 AND ymin < 6894300) ORDER BY z_order; Same query: this time using the Spatial Index. Execution time: 17 millis ... really a lot better :-D and if applied to some larger dataset (> 1 million rows) the difference will become absolutely dramatic, as you are already experiencing in the Finland test case. SpatiaLite isn't PostGIS: you *must* explicitly write your SQL Queries in such a way to access the corresponding Spatial Index table as appropriate. Please note well: in SQLite/SpatiaLite the R*Tree Spatial Index simply is another table between many others. The SQL engine has absolutely no idea that a strict correlation exists between the "geometry" table and the corresponding R*Tree. So you are explicitly required to define an explicit sub-query in order to inquiry the R*Tree. " It seems that Mapserver, or at least the version shipped with MS4W, does not use Spatialite in an efficient way. With big Spatialite tables and small bounding boxes when spatial index can effectively limit the query it should be possible to make Mapserver to render at least 10 times faster. Is anybody interested in having a look on this? Or is this perhaps more suitable question for gdal-dev mailing list? -Jukka Rahkonen- From punk.kish at gmail.com Sun Aug 28 15:51:33 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Sun, 28 Aug 2011 17:51:33 -0500 Subject: [mapserver-users] layer classification with MapScript In-Reply-To: <4E5A5C68.4020304@geoanalytic.com> References: <31425F5E-BBE3-4E52-8237-FE6C16137BCA@gmail.com> <4E5A5C68.4020304@geoanalytic.com> Message-ID: Hi Brent, Thanks for the hand-holding. I got the solution for this first part of the challenge using MapScript; no Mapfile required at all. I will write up a more generalized article on this for the docs/wiki. On Aug 28, 2011, at 10:19 AM, Brent Fraser wrote: > Puneet, > > If you don't care about mapserver generating a legend graphic, you could use mapserver CGI's ability (no scripting required) to do attribute binding (get values from a feature's attribute values). I've used a single class def of: > > CLASS > STYLE # Line, Poly and Point outline > SYMBOL [sSymbol] > OUTLINECOLOR [sOutlineColor] > COLOR [sColor] > SIZE [sSize] > END > TEXT ([Label]) > LABEL > ANGLE AUTO > POSITION UR > COLOR [lColor] > OUTLINECOLOR [lOutlineColor] > TYPE truetype > FONT 'Arial' > SIZE [lSize] > END > END > > where the data/connection accessed a view joining the feature table to a class table where the styling values were defined. And you need 3 layer defs, one for points, lines and polygons. But using this technique, there is no way to get a legend graphic show all the classes. > > So in your PHP code you would need to do a generic database query to get a set of classes, then for each row create a class object and add it to the layer object. Then have mapscript process the features and render a map image by doing a draw() (and a legend graphic by doing a drawLegend()). Or, as others have suggested, you could pass an SLD to mapserver via WMS and request a legend graphic. > > Best Regards, > Brent Fraser > > > On 8/27/2011 5:02 PM, Mr. Puneet Kishor wrote: >> I have a layer classification issue. I want to do something along the lines of (semi-pseudocode ahead) -- >> >> $layerObj->{data} = 'the_geom FROM (SELECT gid, the_geom, class_name, class_color FROM table) t USING UNIQUE gid'; >> $layerObj->{classitem} = 'class_name'; >> >> while (my $row in $layerObj->{data}) { >> create class with 'name = class_name', 'expression = class_name', 'color = class_color' >> } >> >> How do I iterate over the rows retrieved from the table in order to create classes? I don't see any obvious reference to a db result set._______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > From tiedtke at gmail.com Sun Aug 28 15:53:35 2011 From: tiedtke at gmail.com (Thiago Tiedtke dos Reis) Date: Sun, 28 Aug 2011 19:53:35 -0300 Subject: [mapserver-users] Mapserver unnecessary slow with Spatialite In-Reply-To: <84446DEF76453C439E9E97E438E13A6301E172@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301E172@suutari.haapa.mmm.fi> Message-ID: Hi Jukka / Everybody, Recently, I have noticed this behavior in this combination: Spatialite+Mapserver In some tests with a large database containing roads and hidrography of Brazil, this is very noticeable, even with use of MBR cache or Spatial Index. I converted the same database to shapefile (esri), and the renderization in mapserver of this format is always more fast (sorry, I don't have times or comparations, but only tests in bench) than the spatialite (IMHO, the spatialite must "filter" more fast than shapefile, due features like spatial index and advanced structures of libspatialite+sqlite). I'll preparing two full ambients (windows 7 32bit and windows 7 64bit) to compile all packages and dependencies of mapserver, spatialite, gdal, etc ....using the GCC TDM, to do more precisely tests with GDAL >= 1.8, mapserver (svn) and spatialite 3.0.0. If someone can contribute in this combination: Mapserver+Spatialite(via Gdal), this will be very useful. When I finalize my ambients and tests, I'll return here with some values and times Thanks in advance! Eng. Msc. Thiago Tiedtke dos Reis Cartographic Engineer Research & Development Depto Engemap Geoinformation - Brazil www.engemap.com.br 2011/8/28 Rahkonen Jukka > Hi, > > I have been playing a bit with Mapserver 6.0 and Spatialite and I was a bit > surprised about how slow this combination is with any bigger Spatialite > database. I asked for an opinion from Mr. Alesandro Furieri who wrote me > some hints for making efficient queries which are utilising spatial index. > > This query comes basically from OGR Spatialite driver page > http://www.gdal.org/ogr/drv_sqlite.html > > SELECT geometry, osm_id, highway, ref, name, tunnel > FROM osm_line > WHERE highway IS NOT NULL AND > MBRIntersects(geometry, > BuildMBR(1487400, 6894200, 1487500, 6894300)) > ORDER BY z_order; > > OGR documentation says that query is using spatial index. However, > Alesandro writes that it does not and suggests another SQL which is 20 times > faster. > > Alesandro wrote: > " Berlin dataset, your original SQL: I've simply adjusted > the MBR coords. > Execution time: 397 millis > Please note: this layer contains very few rows (< 100k): > so not using the Spatial Index imposes a very bland (but > still noticeable) overhead. > > ================= > > SELECT geometry, osm_id, highway,ref, name, tunnel > FROM osm_line > WHERE highway IS NOT NULL AND ROWID IN ( > SELECT pkid FROM idx_osm_line_GEOMETRY > WHERE xmax > 1487400 AND xmin < 1487500 > AND ymax > 6894200 AND ymin < 6894300) > ORDER BY z_order; > > Same query: this time using the Spatial Index. > Execution time: 17 millis ... really a lot better :-D > and if applied to some larger dataset (> 1 million rows) > the difference will become absolutely dramatic, as you > are already experiencing in the Finland test case. > > SpatiaLite isn't PostGIS: you *must* explicitly write > your SQL Queries in such a way to access the corresponding > Spatial Index table as appropriate. > > Please note well: in SQLite/SpatiaLite the R*Tree > Spatial Index simply is another table between many > others. > The SQL engine has absolutely no idea that a strict > correlation exists between the "geometry" table and > the corresponding R*Tree. > So you are explicitly required to define an explicit > sub-query in order to inquiry the R*Tree. " > > It seems that Mapserver, or at least the version shipped with MS4W, does > not use Spatialite in an efficient way. With big Spatialite tables and > small bounding boxes when spatial index can effectively limit the query it > should be possible to make Mapserver to render at least 10 times faster. Is > anybody interested in having a look on this? Or is this perhaps more > suitable question for gdal-dev mailing list? > > -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 ivanc at kestrel-tech.com Sun Aug 28 20:37:47 2011 From: ivanc at kestrel-tech.com (Ivan Cardenas) Date: Sun, 28 Aug 2011 22:37:47 -0500 Subject: [mapserver-users] Offline Map caching options for Quantum GIS Message-ID: <8CE9567158494540A6F66FF3E13D33DB014E9397C9@DFW1MBX06.mex07a.mlsrvr.com> Hello, We need to place a mapping application in an area with limited and sometimes no internet access. Is there a convenient way to cache map tiles and/or city names for a region for Quantum GIS for subsequent use in a stand alone (no network) mode? Many thanks in advance! Ivan Cardenas Technical Director Kestrel Technology Group ivanc at kestrel-tech.com 281 242 6349 main 713 899 1415 mobile 281 491 0379 fax From sdlime at gmail.com Sun Aug 28 21:30:43 2011 From: sdlime at gmail.com (Steve Lime) Date: Sun, 28 Aug 2011 23:30:43 -0500 Subject: [mapserver-users] msQueryByFilter(): Search returned no results. In-Reply-To: References: <84446DEF76453C439E9E97E438E13A6301DE93@suutari.haapa.mmm.fi> Message-ID: Looking at the code the correct projection work is done. I wonder if there's something funky projecting the globe (-180 -90 180 90) to epsg:102067. Steve 2011/8/26 Steve Lime : > Ok, definitely a bug here... Will take a look. Steve > > 2011/8/26 Michal ?r?dl : >> Hi Steve, >> >> for epsg:4326 and url >> >> http://localhost//cgi-bin/ows?mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >> >> it says >> >> msQueryByAttributes(): Search returned no results. No matching >> record(s) found, layer and area of interest do not overlap. >> >> Cheers, >> >> Mike >> >> 2011/8/26 Steve Lime : >>> You must have a default mapfile set in apache, that's cool. Use the second URL. >>> >>> Change qstring_validation to qstring_validation_pattern from my first >>> message, my mistake. >>> >>> Steve >>> >>> 2011/8/26 Michal ?r?dl : >>>> Hi Steve, >>>> >>>> regardless of the projection settings, I get the following result: >>>> >>>> For >>>> >>>> ?http://localhost//cgi-bin/ows?map=mapfile&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>>> >>>> I see >>>> >>>> ?msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN >>>> validation failed. msEvalRegex(): Regular expression error. String >>>> failed expression test. >>>> >>>> And for >>>> >>>> ?http://localhost//cgi-bin/ows?mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>>> >>>> I see >>>> >>>> ?mapserv(): Web application error. Parameter 'qstring' value fails to >>>> validate. msValidateParameter(): Regular expression error. Parameter >>>> pattern validation failed. >>>> >>>> Cheers, >>>> >>>> Michal >>>> >>>> >>>> 2011/8/26 Steve Lime : >>>>> I would agree this sounds like a bug. The map extent *should* be >>>>> projected to the layer extent and that's what's used to identify >>>>> candidate features. Can you check what happens with a native mapserver >>>>> attribute query in this case? If possible try this: >>>>> >>>>> 1) set your MAP projection back to geographic, and restore your >>>>> geographic map extent. >>>>> 2) add this line to the layer metadata 'qstring_validation' '^[0-9]$' >>>>> 3) go to the following URL: >>>>> >>>>> ?http://localhost//cgi-bin/ows?map=[yourmapfile]&mode=itemnquery&qlayer=typ&qitem=zver&qstring=2 >>>>> >>>>> and see what happens. >>>>> >>>>> This will run a different query function msQueryByAttributes() that's >>>>> not new to 6.0.x. >>>>> >>>>> Steve >>>>> >>>>> 2011/8/26 Michal ?r?dl : >>>>>> Hi Jukka, >>>>>> >>>>>> the current settings returns expected result with &srsName=EPSG:4326 >>>>>> as well. The original settings doesn't work neither with >>>>>> &srsName=EPSG:4326 nor &srsName=EPSG::102067. >>>>>> >>>>>> Yes, it looks like there would be a problem in case of several WFS >>>>>> layers with different projections of the source data. >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Mike >>>>>> >>>>>> 2011/8/26 Rahkonen Jukka : >>>>>>> Hi, >>>>>>> >>>>>>> Good that you could make it to work. However, this feels maybe like a bug if it means that using ogc:PropertyIsEqualTo filter without any other filter works only if projection of the source data is the same than the default output projection from WFS. >>>>>>> >>>>>>> Could you have one more trial with the original settings and see if adding &srsName=EPSG:4326 or &srsName=EPSG::102067 is changing anything? And also if your current setting gives correct result with &srsName=EPSG:4326. >>>>>>> >>>>>>> -Jukka Rahkonen. >>>>>>> >>>>>>> Michal ?r?dl wrote: >>>>>>> >>>>>>> >>>>>>>> Hi all, >>>>>>> >>>>>>>> problem solved. I needed to set: >>>>>>> >>>>>>>> EXTENT -905000 -1230000 -400000 -900000 >>>>>>> >>>>>>> and >>>>>>> >>>>>>> PROJECTION >>>>>>> ## ?"init=epsg:4326" >>>>>>> ?"init=epsg:102067" >>>>>>> END >>>>>>> >>>>>>> (Epsg 102067 is the projection of the layer being filtered.) >>>>>>> >>>>>>> Thank you very much again, >>>>>>> >>>>>>> Michal >>>>>>> >>>>>>> >>>>>>> 2011/8/25 Michal ?r?dl : >>>>>>>> Hi Steve, >>>>>>>> >>>>>>>> Thanks a lot. The extent should be large enough to encompass all the >>>>>>>> features. Here comes the whole mapfile: >>>>>>>> >>>>>>>> MAP >>>>>>>> NAME "MIS WFS Server" >>>>>>>> STATUS ON >>>>>>>> SIZE 500 500 >>>>>>>> EXTENT -180 -90 180 90 >>>>>>>> SHAPEPATH "data/" >>>>>>>> IMAGECOLOR 255 255 255 >>>>>>>> CONFIG MS_ERRORFILE "log/mapserv.log" >>>>>>>> DEBUG 5 >>>>>>>> >>>>>>>> WEB >>>>>>>> ?IMAGEPATH "/var/www/tmp/" >>>>>>>> ?IMAGEURL "/tmp/" >>>>>>>> ?METADATA >>>>>>>> ? ?"wfs_title" ? ? ? ? ? ?"MIS WFS Server" ?## REQUIRED >>>>>>>> ? ?"wfs_onlineresource" ? "http://127.0.0.1/cgi-bin/ows?" >>>>>>>> ? ?"wfs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" >>>>>>>> ? ?"wms_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>>>>>> ? ?"wcs_srs" ? ? ? ? ? ? ? "EPSG:4326 EPSG:102067" ?## Recommended >>>>>>>> ? ?"ows_enable_request" "*" >>>>>>>> ? ?"ows_updatesequence" "2011-29-05T00:24:00" >>>>>>>> ?END >>>>>>>> END >>>>>>>> >>>>>>>> PROJECTION >>>>>>>> ?"init=epsg:4326" >>>>>>>> END >>>>>>>> >>>>>>>> LAYER >>>>>>>> ?NAME "typ" >>>>>>>> ?METADATA >>>>>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>>>>> ? ?"wfs_include_items" "all" >>>>>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>>>>> ? ?"gml_types" "auto" >>>>>>>> ? ?"gml_geometries" "msGeometry" >>>>>>>> ? ?"gml_msGeometry_type" "polygon" >>>>>>>> ?END >>>>>>>> ?DATA typ.shp >>>>>>>> ?TYPE POLYGON >>>>>>>> ?STATUS ON >>>>>>>> ?PROJECTION >>>>>>>> ? ?"init=epsg:102067" >>>>>>>> ?END >>>>>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>>>>> ?CLASS >>>>>>>> ? ?NAME "Typ" >>>>>>>> ? ?STYLE >>>>>>>> ? ? ?COLOR 0 0 155 >>>>>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>>>>> ? ?END >>>>>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>>>>> ?END >>>>>>>> ?DEBUG 5 >>>>>>>> END # Layer >>>>>>>> >>>>>>>> LAYER >>>>>>>> ? ?NAME "hsrs" >>>>>>>> ? ?TYPE RASTER >>>>>>>> ? ?STATUS ON >>>>>>>> ? ?CONNECTION "http://www.bnhelp.cz/cgi-bin/crtopo?" >>>>>>>> ? ?DEBUG ON >>>>>>>> ? ?CONNECTIONTYPE WMS >>>>>>>> ? ?METADATA >>>>>>>> ? ? ? ?"wms_srs" ? ? ? ? ? ? "EPSG:4326" >>>>>>>> ? ? ? ?"wms_name" ? ? ? ? ? ?"obce,kraje,hr_cr,sidla,doprava" >>>>>>>> ? ? ? ?"wms_title" ? ? ? ? ? ?"CR Topo" >>>>>>>> ? ? ? ?"wms_server_version" ?"1.1.1" >>>>>>>> ? ? ? ?"wms_format" ? ? ? ? ?"image/png" >>>>>>>> ? ? ? ?"wms_latlonboundingbox" "11.9384 48.2337 18.957 51.3549" >>>>>>>> ? ?END >>>>>>>> END >>>>>>>> >>>>>>>> END # Map File >>>>>>>> >>>>>>>> Cheers, >>>>>>>> >>>>>>>> Michal >>>>>>>> >>>>>>>> 2011/8/25 Steve Lime : >>>>>>>>> What is your default EXTENT set to in your mapfile? It should be large enough to encompass all features. - Steve >>>>>>>>> >>>>>>>>> Sent from my iPad >>>>>>>>> >>>>>>>>> On Aug 24, 2011, at 7:58 AM, Michal ?r?dl wrote: >>>>>>>>> >>>>>>>>>> Hi all, >>>>>>>>>> >>>>>>>>>> I am trying to use FES filter for WFS layer and get no result, even >>>>>>>>>> thought I should get one. >>>>>>>>>> >>>>>>>>>> In my browser, I request >>>>>>>>>> >>>>>>>>>> http://localhost//cgi-bin/ows?&REQUEST=GetFeature&VERSION=1.1.0&SERVICE=WFS&TYPENAME=typ&FILTER=>>>>>>>>> xmlns:ogc="http://www.opengis.net/ogc">ZVER2 >>>>>>>>>> >>>>>>>>>> and get >>>>>>>>>> >>>>>>>>>> >>>>>>>>> xmlns:ms="http://mapserver.gis.umn.edu/mapserver" >>>>>>>>>> xmlns:gml="http://www.opengis.net/gml" >>>>>>>>>> xmlns:wfs="http://www.opengis.net/wfs" >>>>>>>>>> xmlns:ogc="http://www.opengis.net/ogc" >>>>>>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>>>>>>> xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver >>>>>>>>>> http://127.0.0.1/cgi-bin/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=typ&OUTPUTFORMAT=text/xml;%20subtype=gml/3.1.1 >>>>>>>>>> http://www.opengis.net/wfs >>>>>>>>>> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> >>>>>>>>>> >>>>>>>>>> missing >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> even though I do know, that features with ZVER=2 do exist. >>>>>>>>>> >>>>>>>>>> In the mapserver log file, I get >>>>>>>>>> >>>>>>>>>> [Wed Aug 24 14:48:52 2011].296607 msQueryByFilter(): Search returned >>>>>>>>>> no results. No matching record(s) found. >>>>>>>>>> [Wed Aug 24 14:48:52 2011].296747 mapserv request processing time >>>>>>>>>> (msLoadMap not incl.): 0.002s >>>>>>>>>> [Wed Aug 24 14:48:52 2011].296764 msFreeMap(): freeing map at 0x2783120. >>>>>>>>>> [Wed Aug 24 14:48:52 2011].296773 freeLayer(): freeing layer at 0x278b570. >>>>>>>>>> >>>>>>>>>> I have checked http://mapserver.org/errors.html#id2 with similar error >>>>>>>>>> "msQueryByPoint: search returned no results" and tried to create a >>>>>>>>>> simple template: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> ?[lrn] >>>>>>>>>> ?[ZVER] >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> but with no effect. >>>>>>>>>> >>>>>>>>>> In the mapfile, there is >>>>>>>>>> >>>>>>>>>> LAYER >>>>>>>>>> ?NAME "typ" >>>>>>>>>> ?METADATA >>>>>>>>>> ? ?"wfs_title" ? ?"Typologie" ## REQUIRED >>>>>>>>>> ? ?"gml_featureid" "CISLO" ## REQUIRED >>>>>>>>>> ? ?"gml_include_items" "all" ?## Optional (serves all attributes for layer) >>>>>>>>>> ? ?"gml_types" "auto" >>>>>>>>>> ? ?"gml_geometries" "msGeometry" >>>>>>>>>> ? ?"gml_msGeometry_type" "polygon" >>>>>>>>>> ?END >>>>>>>>>> ?DATA typ.shp >>>>>>>>>> ?TYPE POLYGON >>>>>>>>>> ?STATUS ON >>>>>>>>>> ?PROJECTION >>>>>>>>>> ? ?"init=epsg:102067" >>>>>>>>>> ?END >>>>>>>>>> ?DUMP TRUE ? ? ? ? ? ## REQUIRED >>>>>>>>>> ?CLASS >>>>>>>>>> ? ?NAME "Typ" >>>>>>>>>> ? ?STYLE >>>>>>>>>> ? ? ?COLOR 0 0 155 >>>>>>>>>> ? ? ?OUTLINECOLOR 120 120 120 >>>>>>>>>> ? ?END >>>>>>>>>> ? ?TEMPLATE "templates/typ_zver.html" >>>>>>>>>> ?END >>>>>>>>>> ?DEBUG 5 >>>>>>>>>> END # Layer >>>>>>>>>> >>>>>>>>>> What is wrong with my FES filter? How can I make it to run? >>>>>>>>>> >>>>>>>>>> Thanks a lot, >>>>>>>>>> >>>>>>>>>> Michal >>>>>>>>>> _______________________________________________ >>>>>>>>>> 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 petra.pietrasova at sitewell.cz Mon Aug 29 00:33:36 2011 From: petra.pietrasova at sitewell.cz (=?UTF-8?Q?Petra_Pietrasov=C3=A1?=) Date: Mon, 29 Aug 2011 00:33:36 -0700 (PDT) Subject: [mapserver-users] Re: Dashed outline for polygon (migration to 6.0) In-Reply-To: <1314363617016-6728657.post@n2.nabble.com> References: <1314363617016-6728657.post@n2.nabble.com> Message-ID: <1314603216093-6736660.post@n2.nabble.com> Thank you for your answer. Anyway I have a with the polygon layer. We need DASHED OUTLINE in the polygon layer. I have tried your example in our layer (I have changed COLOR on OUTLINECOLOR) but dashed outline doesn't work. We are using this as outputformat: OUTPUTFORMAT NAME "AGG_Q" DRIVER AGG/PNG IMAGEMODE RGBA EXTENSION "png" MIMETYPE "image/png" FORMATOPTION "QUANTIZE_FORCE=ON" FORMATOPTION "QUANTIZE_DITHER=OFF" FORMATOPTION "QUANTIZE_COLORS=128" END -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Dashed-outline-for-polygon-migration-to-6-0-tp6728657p6736660.html Sent from the Mapserver - User mailing list archive at Nabble.com. From havard.tveite at umb.no Mon Aug 29 04:14:31 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Mon, 29 Aug 2011 13:14:31 +0200 Subject: [mapserver-users] Re: Dashed outline for polygon (migration to 6.0) In-Reply-To: <1314603216093-6736660.post@n2.nabble.com> References: <1314363617016-6728657.post@n2.nabble.com> <1314603216093-6736660.post@n2.nabble.com> Message-ID: <4E5B7497.7050504@umb.no> The following should work with AGG (don't use SYMBOL): ################################ ODTOKLINIE_NEJ ############################### LAYER . . . . CLASS NAME "odtokov? linie nejdel?? (?erven?)" STYLE OUTLINECOLOR 255 255 0 WIDTH 2 PATTERN 10 10 10 10 END END END END ############################## END ODTOKLINIE_NEJ H?vard On 8/29/2011 9:33 AM, Petra Pietrasov? wrote: > Thank you for your answer. Anyway I have a with the polygon layer. We need > DASHED OUTLINE in the polygon layer. I have tried your example in our layer > (I have changed COLOR on OUTLINECOLOR) but dashed outline doesn't work. > > > We are using this as outputformat: > OUTPUTFORMAT > NAME "AGG_Q" > DRIVER AGG/PNG > IMAGEMODE RGBA > EXTENSION "png" > MIMETYPE "image/png" > FORMATOPTION "QUANTIZE_FORCE=ON" > FORMATOPTION "QUANTIZE_DITHER=OFF" > FORMATOPTION "QUANTIZE_COLORS=128" > END From jcigar at ulb.ac.be Mon Aug 29 04:39:33 2011 From: jcigar at ulb.ac.be (Julien Cigar) Date: Mon, 29 Aug 2011 13:39:33 +0200 Subject: [mapserver-users] SLD ignored with mode=map .. ? Message-ID: <4E5B7A75.8020209@ulb.ac.be> Hello, everything is in the title :) : I wondered if it's normal that my SLD is ignored when mode=map (it works perfectly with WMS)? I use an URL like: http://home.bebif.be/mapserver?map=/path/to/mapfile.map&layer=metzger&mode=map&SLD=http://some.host.be/nobanis/mysld.xml Thank you, Julien -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. -------------- next part -------------- A non-text attachment was scrubbed... Name: jcigar.vcf Type: text/x-vcard Size: 292 bytes Desc: not available URL: From havard.tveite at umb.no Mon Aug 29 05:29:15 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Mon, 29 Aug 2011 14:29:15 +0200 Subject: [mapserver-users] problem with Symbol and Style In-Reply-To: <2D8D2D25-6588-464B-B480-07A57E2CBE52@gmail.com> References: <4E596527.7010503@umb.no> <2D8D2D25-6588-464B-B480-07A57E2CBE52@gmail.com> Message-ID: <4E5B861B.1010605@umb.no> The example I provided should give you an outline (color 200 112 64). H?vard On 8/28/2011 8:30 PM, Valeria Munoz I wrote: > Can i display a outliner? > > Thanks for the reply!! > > Enviado desde mi iPhone > > El 27-08-2011, a las 17:44, Havard Tveite escribi?: > >> Valeria, >> >> To display simple lines (in the latest versions of >> Mapserver), you should take away the SYMBOL from the >> STYLE, and specify the WIDTH of the line (not the >> SIZE). You can skip ANTIALIAS (you can't even turn >> it off for AGG). >> >> STYLE >> WIDTH 12 >> COLOR 200 112 64 >> END >> STYLE >> WIDTH 10 >> COLOR 224 136 72 >> END >> >> >> H?vard >> >> On 26/08/11 23:32, Valeria Mu?oz wrote: >>> HI!!! >>> >>> i have problem with my mapfile. i'm trying to display street but i just >>> get circle like this not a continuous and perfect line. >>> >>> my mapserver version is 6. >>> >>> >>> please help!! >>> >>> my code is: >>> >>> LAYER >>> NAME 'RM' >>> TYPE LINE >>> MAXSCALE 15000 >>> LABELMAXSCALE 15000 >>> MINSCALE 5000 >>> LABELMINSCALE 5000 >>> DATA 'street.shp' >>> METADATA >>> 'wms_title'RM' >>> END >>> STATUS DEFAULT >>> TRANSPARENCY 100 >>> PROJECTION >>> 'proj=longlat' >>> 'ellps=WGS84' >>> 'datum=WGS84' >>> 'no_defs' >>> '' >>> END >>> LABELITEM 'NAME' >>> CLASS >>> >>> NAME 'c_RM' >>> STYLE >>> SYMBOL 'linecc' >>> ANTIALIAS TRUE >>> SIZE 12 >>> COLOR 200 112 64 >>> END >>> STYLE >>> SYMBOL 'defline' >>> ANTIALIAS TRUE >>> SIZE 10 >>> COLOR 224 136 72 >>> END >>> LABEL >>> TYPE truetype >>> FONT 'arialbd' >>> SIZE 9 >>> MINSIZE 9 >>> MAXSIZE 9 >>> ANTIALIAS TRUE >>> COLOR 25 25 25 >>> ANGLE FOLLOW >>> FORCE FALSE >>> POSITION cc >>> BUFFER 10 >>> MINDISTANCE 7000 >>> MINFEATURESIZE 50 >>> OFFSET 0 0 >>> PARTIALS FALSE >>> END >>> END >>> END >>> >>> Symbol >>> Name 'linecc' >>> Type ELLIPSE >>> Filled TRUE >>> ANTIALIAS TRUE >>> Points >>> 1 1 >>> END >>> END >>> Symbol >>> Name 'defline' >>> Type ELLIPSE >>> Filled TRUE >>> ANTIALIAS TRUE >>> Points >>> 1 1 >>> END >>> END >>> >>> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users -- H?vard Tveite Department of Mathematical Sciences and Technology, UMB Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ From valemunoz at gmail.com Mon Aug 29 06:55:08 2011 From: valemunoz at gmail.com (Valeria Munoz I) Date: Mon, 29 Aug 2011 09:55:08 -0400 Subject: [mapserver-users] problem with Symbol and Style In-Reply-To: <4E5B861B.1010605@umb.no> References: <4E596527.7010503@umb.no> <2D8D2D25-6588-464B-B480-07A57E2CBE52@gmail.com> <4E5B861B.1010605@umb.no> Message-ID: <211FB770-BD16-4A4E-B0C8-9AD378491408@gmail.com> Thanks a lot! Enviado desde mi iPhone El 29-08-2011, a las 8:29, Havard Tveite escribi?: > The example I provided should give you an outline > (color 200 112 64). > > H?vard > > On 8/28/2011 8:30 PM, Valeria Munoz I wrote: >> Can i display a outliner? >> >> Thanks for the reply!! >> >> Enviado desde mi iPhone >> >> El 27-08-2011, a las 17:44, Havard Tveite escribi?: >> >>> Valeria, >>> >>> To display simple lines (in the latest versions of >>> Mapserver), you should take away the SYMBOL from the >>> STYLE, and specify the WIDTH of the line (not the >>> SIZE). You can skip ANTIALIAS (you can't even turn >>> it off for AGG). >>> >>> STYLE >>> WIDTH 12 >>> COLOR 200 112 64 >>> END >>> STYLE >>> WIDTH 10 >>> COLOR 224 136 72 >>> END >>> >>> >>> H?vard >>> >>> On 26/08/11 23:32, Valeria Mu?oz wrote: >>>> HI!!! >>>> >>>> i have problem with my mapfile. i'm trying to display street but i just >>>> get circle like this not a continuous and perfect line. >>>> >>>> my mapserver version is 6. >>>> >>>> >>>> please help!! >>>> >>>> my code is: >>>> >>>> LAYER >>>> NAME 'RM' >>>> TYPE LINE >>>> MAXSCALE 15000 >>>> LABELMAXSCALE 15000 >>>> MINSCALE 5000 >>>> LABELMINSCALE 5000 >>>> DATA 'street.shp' >>>> METADATA >>>> 'wms_title'RM' >>>> END >>>> STATUS DEFAULT >>>> TRANSPARENCY 100 >>>> PROJECTION >>>> 'proj=longlat' >>>> 'ellps=WGS84' >>>> 'datum=WGS84' >>>> 'no_defs' >>>> '' >>>> END >>>> LABELITEM 'NAME' >>>> CLASS >>>> >>>> NAME 'c_RM' >>>> STYLE >>>> SYMBOL 'linecc' >>>> ANTIALIAS TRUE >>>> SIZE 12 >>>> COLOR 200 112 64 >>>> END >>>> STYLE >>>> SYMBOL 'defline' >>>> ANTIALIAS TRUE >>>> SIZE 10 >>>> COLOR 224 136 72 >>>> END >>>> LABEL >>>> TYPE truetype >>>> FONT 'arialbd' >>>> SIZE 9 >>>> MINSIZE 9 >>>> MAXSIZE 9 >>>> ANTIALIAS TRUE >>>> COLOR 25 25 25 >>>> ANGLE FOLLOW >>>> FORCE FALSE >>>> POSITION cc >>>> BUFFER 10 >>>> MINDISTANCE 7000 >>>> MINFEATURESIZE 50 >>>> OFFSET 0 0 >>>> PARTIALS FALSE >>>> END >>>> END >>>> END >>>> >>>> Symbol >>>> Name 'linecc' >>>> Type ELLIPSE >>>> Filled TRUE >>>> ANTIALIAS TRUE >>>> Points >>>> 1 1 >>>> END >>>> END >>>> Symbol >>>> Name 'defline' >>>> Type ELLIPSE >>>> Filled TRUE >>>> ANTIALIAS TRUE >>>> Points >>>> 1 1 >>>> END >>>> END >>>> >>>> >>> >>> _______________________________________________ >>> mapserver-users mailing list >>> mapserver-users at lists.osgeo.org >>> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- > H?vard Tveite > Department of Mathematical Sciences and Technology, UMB > Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY > Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ From petra.pietrasova at sitewell.cz Mon Aug 29 05:59:31 2011 From: petra.pietrasova at sitewell.cz (=?UTF-8?Q?Petra_Pietrasov=C3=A1?=) Date: Mon, 29 Aug 2011 05:59:31 -0700 (PDT) Subject: [mapserver-users] Re: Dashed outline for polygon (migration to 6.0) In-Reply-To: <4E5B7497.7050504@umb.no> References: <1314363617016-6728657.post@n2.nabble.com> <1314603216093-6736660.post@n2.nabble.com> <4E5B7497.7050504@umb.no> Message-ID: <1314622771963-6737544.post@n2.nabble.com> Thank you , but even your example doesn?t work. Are you using the version of mapserver 6.0.1 and does dashed line work in it? if it works to you than the problem is not in the layer in the style of layer. Do you have any idea what we do wrong? Some setup of mapserver or output? We are using AGG output as I wrote before... -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Dashed-outline-for-polygon-migration-to-6-0-tp6728657p6737544.html Sent from the Mapserver - User mailing list archive at Nabble.com. From stephane.brunner at camptocamp.com Mon Aug 29 06:12:38 2011 From: stephane.brunner at camptocamp.com (=?ISO-8859-1?Q?St=E9phane_Brunner?=) Date: Mon, 29 Aug 2011 15:12:38 +0200 Subject: [mapserver-users] Problem GetFeature with geom filter on WFS In-Reply-To: <84446DEF76453C439E9E97E438E13A6301DA62@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301A120@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301DA42@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301DA62@suutari.haapa.mmm.fi> Message-ID: Hello, 2011/8/24 Rahkonen Jukka : > Hi, > > I am not too familiar with PostGIS, but isn't this && exactly an index based > BBOX query which is checking if the BBOX of the feature is intersecting with > the BBOX of the reference geometry? > where geom && >> >> GeomFromText('POLYGON((620000 218000,620000 278000,690000 >> >> 278000,690000 218000,620000 218000))',-1) This BBox is the Extents of the mapfile than in our case it always return true. > > ?Then perhaps what you wrote > "MapServer filters them correctly but as we get >> only the 100 first results from the DB, we miss many objects and/or >> they are not related to the area where we want to apply a geographical >> filter.?" > > could better be written "as?we?get only the 100 first?results within the > BBOX filtered with?fast but inaccurate index search, the result set after > Mapserver applying a geographical filter may have less that 100 features". Yes, but with a so large BBOX (extent from the mapfile, not geometry extent) in most cases it returns 0 results. Sincerely St?phane Brunner > > -Jukka Rahkonen- > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- camptocamp.com mapfish.org From Jukka.Rahkonen at mmmtike.fi Mon Aug 29 06:22:41 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Mon, 29 Aug 2011 13:22:41 +0000 Subject: [mapserver-users] Problem GetFeature with geom filter on WFS In-Reply-To: References: <84446DEF76453C439E9E97E438E13A6301A120@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301DA42@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301DA62@suutari.haapa.mmm.fi> Message-ID: <84446DEF76453C439E9E97E438E13A6301E46D@suutari.haapa.mmm.fi> Hi, Ok, understood. Do you have enough material now for filing a bug report? The desired behaviour would be to apply && filter for the first PostGIS query with the maximun extents of the geometry included in the filter of the WFS request, but without limit [maxFeatures]? -Jukka Rahkonen- St?phane Brunner wrote: > > Hello, > > 2011/8/24 Rahkonen Jukka : > > Hi, > > > > I am not too familiar with PostGIS, but isn't this && > exactly an index based > > BBOX query which is checking if the BBOX of the feature is > intersecting with > > the BBOX of the reference geometry? > > where geom && > >> >> GeomFromText('POLYGON((620000 218000,620000 278000,690000 > >> >> 278000,690000 218000,620000 218000))',-1) > This BBox is the Extents of the mapfile than in our case it > always return true. > > > > > ?Then perhaps what you wrote > > "MapServer filters them correctly but as we get > >> only the 100 first results from the DB, we miss many objects and/or > >> they are not related to the area where we want to apply a > geographical > >> filter.?" > > > > could better be written "as?we?get only the 100 first? > results within the > > BBOX filtered with?fast but inaccurate index search, the > result set after > > Mapserver applying a geographical filter may have less that > 100 features". > Yes, but with a so large BBOX (extent from the mapfile, not geometry > extent) in most cases it returns 0 results. > > Sincerely > St?phane Brunner > > > > > -Jukka Rahkonen- > > > > > > _______________________________________________ > > mapserver-users mailing list > > mapserver-users at lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > > > > > > -- > camptocamp.com > mapfish.org > From havard.tveite at umb.no Mon Aug 29 07:22:59 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Mon, 29 Aug 2011 16:22:59 +0200 Subject: [mapserver-users] Re: Dashed outline for polygon (migration to 6.0) In-Reply-To: <1314622771963-6737544.post@n2.nabble.com> References: <1314363617016-6728657.post@n2.nabble.com> <1314603216093-6736660.post@n2.nabble.com> <4E5B7497.7050504@umb.no> <1314622771963-6737544.post@n2.nabble.com> Message-ID: <4E5BA0C3.40002@umb.no> It works for me for 6.0.0, 6.0.1 and SVN trunk with AGG. I have also tried to include you OUTPUTFORMAT specification, and that works. It also works with GD. I have been testing with shp2img. H?vard Here is a complete layer with an inline feature. LAYER STATUS DEFAULT TYPE POLYGON FEATURE POINTS 5 5 5 25 45 25 45 5 5 5 END # Points END # Feature CLASS STYLE OUTLINECOLOR 0 0 0 WIDTH 6 PATTERN 20 20 END LINECAP BUTT END # STYLE END # CLASS END # LAYER On 8/29/2011 2:59 PM, Petra Pietrasov? wrote: > Thank you , > but even your example doesn?t work. > Are you using the version of mapserver 6.0.1 and does dashed line work in > it? if it works to you than the problem is not in the layer in the style of > layer. > > Do you have any idea what we do wrong? Some setup of mapserver or output? > > We are using AGG output as I wrote before... > > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/Dashed-outline-for-polygon-migration-to-6-0-tp6728657p6737544.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 -- H?vard Tveite Department of Mathematical Sciences and Technology, UMB Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ From mdeneen at gmail.com Mon Aug 29 08:03:43 2011 From: mdeneen at gmail.com (Mark Deneen) Date: Mon, 29 Aug 2011 11:03:43 -0400 Subject: [mapserver-users] Re: Dashed outline for polygon (migration to 6.0) In-Reply-To: <4E5BA0C3.40002@umb.no> References: <1314363617016-6728657.post@n2.nabble.com> <1314603216093-6736660.post@n2.nabble.com> <4E5B7497.7050504@umb.no> <1314622771963-6737544.post@n2.nabble.com> <4E5BA0C3.40002@umb.no> Message-ID: We had an issue where, depending on your projection, the dashed lines would only show up further north. As they got closer to the equator, they looked more solid. -M On Mon, Aug 29, 2011 at 10:22 AM, Havard Tveite wrote: > It works for me for 6.0.0, 6.0.1 and SVN trunk with AGG. > I have also tried to include you OUTPUTFORMAT specification, > and that works. ?It also works with GD. > I have been testing with shp2img. > > H?vard > > Here is a complete layer with an inline feature. > > ?LAYER > ? ?STATUS DEFAULT > ? ?TYPE POLYGON > ? ?FEATURE > ? ? ?POINTS > ? ? ? ?5 5 > ? ? ? ?5 25 > ? ? ? ?45 25 > ? ? ? ?45 5 > ? ? ? ?5 5 > ? ? ?END # Points > ? ?END # Feature > ? ?CLASS > ? ? ?STYLE > ? ? ? ?OUTLINECOLOR 0 0 0 > ? ? ? ?WIDTH 6 > ? ? ? ?PATTERN 20 20 END > ? ? ? ?LINECAP BUTT > ? ? ?END # STYLE > ? ?END # CLASS > ?END # LAYER > > On 8/29/2011 2:59 PM, Petra Pietrasov? wrote: >> >> Thank you , >> but even your example doesn?t work. >> Are you using the version of mapserver 6.0.1 and does dashed line work in >> it? if it works to you than the problem is not in the layer in the style >> of >> layer. >> >> Do you have any idea what we do wrong? Some setup of mapserver or output? >> >> We are using AGG output as I wrote before... >> >> -- >> View this message in context: >> http://osgeo-org.1803224.n2.nabble.com/Dashed-outline-for-polygon-migration-to-6-0-tp6728657p6737544.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 > > -- > H?vard Tveite > Department of Mathematical Sciences and Technology, UMB > Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY > Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From stephane.brunner at camptocamp.com Mon Aug 29 08:23:23 2011 From: stephane.brunner at camptocamp.com (=?ISO-8859-1?Q?St=E9phane_Brunner?=) Date: Mon, 29 Aug 2011 17:23:23 +0200 Subject: [mapserver-users] Problem GetFeature with geom filter on WFS In-Reply-To: <84446DEF76453C439E9E97E438E13A6301E46D@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301A120@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301DA42@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301DA62@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301E46D@suutari.haapa.mmm.fi> Message-ID: Hello, 2011/8/29 Rahkonen Jukka : > Hi, > > Ok, understood. Do you have enough material now for filing a bug report? I just done it: http://trac.osgeo.org/mapserver/ticket/4005 > The desired behaviour would be to apply && filter for the first PostGIS query with the maximun extents of the geometry included in the filter of the WFS request, but without limit [maxFeatures]? Effectively it's not the best but it's good enough, the best is to done the geometry filtering in postgis ;-). Sincerely St?phane > > -Jukka Rahkonen- > > > St?phane Brunner wrote: >> >> Hello, >> >> 2011/8/24 Rahkonen Jukka : >> > Hi, >> > >> > I am not too familiar with PostGIS, but isn't this && >> exactly an index based >> > BBOX query which is checking if the BBOX of the feature is >> intersecting with >> > the BBOX of the reference geometry? >> > where geom && >> >> >> GeomFromText('POLYGON((620000 218000,620000 278000,690000 >> >> >> 278000,690000 218000,620000 218000))',-1) >> This BBox is the Extents of the mapfile than in our case it >> always return true. >> >> > >> > ?Then perhaps what you wrote >> > "MapServer filters them correctly but as we get >> >> only the 100 first results from the DB, we miss many objects and/or >> >> they are not related to the area where we want to apply a >> geographical >> >> filter.?" >> > >> > could better be written "as?we?get only the 100 first >> results within the >> > BBOX filtered with?fast but inaccurate index search, the >> result set after >> > Mapserver applying a geographical filter may have less that >> 100 features". >> Yes, but with a so large BBOX (extent from the mapfile, not geometry >> extent) in most cases it returns 0 results. >> >> Sincerely >> St?phane Brunner >> >> > >> > -Jukka Rahkonen- >> > >> > >> > _______________________________________________ >> > mapserver-users mailing list >> > mapserver-users at lists.osgeo.org >> > http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > >> > >> >> >> >> -- >> camptocamp.com >> mapfish.org >> -- camptocamp.com mapfish.org From Jukka.Rahkonen at mmmtike.fi Mon Aug 29 08:50:37 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Mon, 29 Aug 2011 15:50:37 +0000 Subject: [mapserver-users] Problem GetFeature with geom filter on WFS In-Reply-To: References: <84446DEF76453C439E9E97E438E13A6301A120@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301DA42@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301DA62@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301E46D@suutari.haapa.mmm.fi>, Message-ID: <84446DEF76453C439E9E97E438E13A6301E9BA@suutari.haapa.mmm.fi> St?phane Brunner wrote: > Hello, 2011/8/29 Rahkonen Jukka : > Hi, > > Ok, understood. Do you have enough material now for filing a bug report? I just done it: http://trac.osgeo.org/mapserver/ticket/4005 > The desired behaviour would be to apply && filter for the first PostGIS query with the maximun extents of the geometry included in the filter of the WFS request, but without limit [maxFeatures]? > Effectively it's not the best but it's good enough, the best is to > done the geometry filtering in postgis ;-). Then why not to use TinyOWS http://tinyows.org ? -Jukka- Sincerely St?phane > > -Jukka Rahkonen- > > > St?phane Brunner wrote: >> >> Hello, >> >> 2011/8/24 Rahkonen Jukka : >> > Hi, >> > >> > I am not too familiar with PostGIS, but isn't this && >> exactly an index based >> > BBOX query which is checking if the BBOX of the feature is >> intersecting with >> > the BBOX of the reference geometry? >> > where geom && >> >> >> GeomFromText('POLYGON((620000 218000,620000 278000,690000 >> >> >> 278000,690000 218000,620000 218000))',-1) >> This BBox is the Extents of the mapfile than in our case it >> always return true. >> >> > >> > Then perhaps what you wrote >> > "MapServer filters them correctly but as we get >> >> only the 100 first results from the DB, we miss many objects and/or >> >> they are not related to the area where we want to apply a >> geographical >> >> filter. " >> > >> > could better be written "as we get only the 100 first >> results within the >> > BBOX filtered with fast but inaccurate index search, the >> result set after >> > Mapserver applying a geographical filter may have less that >> 100 features". >> Yes, but with a so large BBOX (extent from the mapfile, not geometry >> extent) in most cases it returns 0 results. >> >> Sincerely >> St?phane Brunner >> >> > >> > -Jukka Rahkonen- >> > >> > >> > _______________________________________________ >> > mapserver-users mailing list >> > mapserver-users at lists.osgeo.org >> > http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > >> > >> >> >> >> -- >> camptocamp.com >> mapfish.org >> -- camptocamp.com mapfish.org From punk.kish at gmail.com Mon Aug 29 19:49:20 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Mon, 29 Aug 2011 21:49:20 -0500 Subject: [mapserver-users] zoom out factor as int Message-ID: how do I express a zoom out factor in zoomPoint( int zoomfactor, pointObj imgpoint, int width, int height, rectObj extent, rectObj maxextent ) : int Obviously, 0.5 won't work as an int is expected. -- Puneet Kishor From havard.tveite at umb.no Tue Aug 30 00:44:36 2011 From: havard.tveite at umb.no (Havard Tveite) Date: Tue, 30 Aug 2011 09:44:36 +0200 Subject: [mapserver-users] Re: Dashed outline for polygon (migration to 6.0) In-Reply-To: References: <1314363617016-6728657.post@n2.nabble.com> <1314603216093-6736660.post@n2.nabble.com> <4E5B7497.7050504@umb.no> <1314622771963-6737544.post@n2.nabble.com> <4E5BA0C3.40002@umb.no> Message-ID: <4E5C94E4.8060500@umb.no> Interesting. I am sure that a bug report would be appreciated. Do you think you could create an example that demonstrates the problem? H?vard On 8/29/2011 5:03 PM, Mark Deneen wrote: > We had an issue where, depending on your projection, the dashed lines > would only show up further north. As they got closer to the equator, > they looked more solid. > > -M > > On Mon, Aug 29, 2011 at 10:22 AM, Havard Tveite wrote: >> It works for me for 6.0.0, 6.0.1 and SVN trunk with AGG. >> I have also tried to include you OUTPUTFORMAT specification, >> and that works. It also works with GD. >> I have been testing with shp2img. >> >> H?vard >> >> Here is a complete layer with an inline feature. >> >> LAYER >> STATUS DEFAULT >> TYPE POLYGON >> FEATURE >> POINTS >> 5 5 >> 5 25 >> 45 25 >> 45 5 >> 5 5 >> END # Points >> END # Feature >> CLASS >> STYLE >> OUTLINECOLOR 0 0 0 >> WIDTH 6 >> PATTERN 20 20 END >> LINECAP BUTT >> END # STYLE >> END # CLASS >> END # LAYER >> >> On 8/29/2011 2:59 PM, Petra Pietrasov? wrote: >>> >>> Thank you , >>> but even your example doesn?t work. >>> Are you using the version of mapserver 6.0.1 and does dashed line work in >>> it? if it works to you than the problem is not in the layer in the style >>> of >>> layer. >>> >>> Do you have any idea what we do wrong? Some setup of mapserver or output? >>> >>> We are using AGG output as I wrote before... >>> >>> -- >>> View this message in context: >>> http://osgeo-org.1803224.n2.nabble.com/Dashed-outline-for-polygon-migration-to-6-0-tp6728657p6737544.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 >> >> -- >> H?vard Tveite >> Department of Mathematical Sciences and Technology, UMB >> Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY >> Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> > -- H?vard Tveite Department of Mathematical Sciences and Technology, UMB Dr?bakveien 31, POBox 5003, N-1432 ?s, NORWAY Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/ From Jukka.Rahkonen at mmmtike.fi Tue Aug 30 02:07:57 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Tue, 30 Aug 2011 09:07:57 +0000 Subject: [mapserver-users] Re: Mapserver unnecessary slow with Spatialite In-Reply-To: <84446DEF76453C439E9E97E438E13A6301E172@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301E172@suutari.haapa.mmm.fi> Message-ID: <84446DEF76453C439E9E97E438E13A6301EBBD@suutari.haapa.mmm.fi> Hi, Even Rouault made a fix yesterday into the ogr sqlite driver. It gave 11 times more speed when doing small BBOX selections from a smallish table with 90000 linestrings. These queries are very typical for Mapserver and thus when the gdal version behind Mapserver is updated people should see much more speedy Spatialite rendering. It was also interesting that with the same sample data selecting from Spatialite was 3 times faster than from PostGIS. However, there is probably still one problem. Even wrote: " However, there is no gain to expect from the above change for a request such as : ogrinfo OSM_Finland.sqlite -sql "select geometry, osm_id ,highway,ref, name, tunnel from osm_line where highway is not null" -spat 389116 6677305 389579 6677661 Indeed, when you specify -sql, the driver (and to my knowlegde, this is true for all other OGR drivers) makes no attempt to merge the spatial filter, so the spatial filter is evaluated on OGR side, which will be rather slow. So, you have 2 possibilities, either use the "-where highway is not null" on a layer so that OGR can merge the attribute and spatial filters, or incorporate at hand the spatial filter inside the SQL query specified with -sql. " It is very common and handy to define the DATA in Mapserver mapfile with SQL like the one used in the example. If this is going to lead to slow Mapserver-OGR-Spatialite queries also in the future, could it be possible to add some kind of Mapserver processing option that would force the use of Spatialite spatial index table? It might behave so that if user adds a directive PROCESSING "USE_ SPATIALITE_SPATIAL_INDEX=YES" then Mapserver would construct SQL by adding the AND ROWID IN stuff as described in the GDAL ticket http://trac.osgeo.org/gdal/ticket/4212. xmax, xmin, ymax and ymin would be captured from the WMS BBOX. SELECT geometry, osm_id, highway,ref, name, tunnel FROM osm_line WHERE highway IS NOT NULL AND ROWID IN ( SELECT pkid FROM idx_osm_line_GEOMETRY WHERE xmax > 1487400 AND xmin < 1487500 AND ymax > 6894200 AND ymin < 6894300); If somebody is interested in having a try with Mapserver and Spatialite there is a sample database at http://188.64.1.61/tiedostot/berlin_2011_08_25.zip and corresponding mapfiles at http://latuviitta.org/documents/osm_maps.zip Use with MS4W should be as easy as unzipping the berlin.sqlite file into directory \ms4w\data\ and mapfiles into directory \ms4w\osm_maps\. After that the Berlin OpenStreetMap WMS should be ready at http://localhost/cgi-bin/mapserv.exe?map=/ms4w/osm_maps/osm_wms.map Because the spatial index issue the service will be rather slow. -Jukka Rahkonen- > -----Alkuper?inen viesti----- > L?hett?j?: Rahkonen Jukka > L?hetetty: 28. elokuuta 2011 23:56 > Vastaanottaja: MapServer > Aihe: Mapserver unnecessary slow with Spatialite > > Hi, > > I have been playing a bit with Mapserver 6.0 and Spatialite > and I was a bit surprised about how slow this combination is > with any bigger Spatialite database. I asked for an opinion > from Mr. Alesandro Furieri who wrote me some hints for making > efficient queries which are utilising spatial index. > > This query comes basically from OGR Spatialite driver page > http://www.gdal.org/ogr/drv_sqlite.html > > SELECT geometry, osm_id, highway, ref, name, tunnel > FROM osm_line > WHERE highway IS NOT NULL AND > MBRIntersects(geometry, > BuildMBR(1487400, 6894200, 1487500, 6894300)) > ORDER BY z_order; > > OGR documentation says that query is using spatial index. > However, Alesandro writes that it does not and suggests > another SQL which is 20 times faster. > > Alesandro wrote: > " Berlin dataset, your original SQL: I've simply adjusted > the MBR coords. > Execution time: 397 millis > Please note: this layer contains very few rows (< 100k): > so not using the Spatial Index imposes a very bland (but > still noticeable) overhead. > > ================= > > SELECT geometry, osm_id, highway,ref, name, tunnel > FROM osm_line > WHERE highway IS NOT NULL AND ROWID IN ( > SELECT pkid FROM idx_osm_line_GEOMETRY > WHERE xmax > 1487400 AND xmin < 1487500 > AND ymax > 6894200 AND ymin < 6894300) > ORDER BY z_order; > > Same query: this time using the Spatial Index. > Execution time: 17 millis ... really a lot better :-D > and if applied to some larger dataset (> 1 million rows) > the difference will become absolutely dramatic, as you > are already experiencing in the Finland test case. > > SpatiaLite isn't PostGIS: you *must* explicitly write > your SQL Queries in such a way to access the corresponding > Spatial Index table as appropriate. > > Please note well: in SQLite/SpatiaLite the R*Tree > Spatial Index simply is another table between many > others. > The SQL engine has absolutely no idea that a strict > correlation exists between the "geometry" table and > the corresponding R*Tree. > So you are explicitly required to define an explicit > sub-query in order to inquiry the R*Tree. " > > It seems that Mapserver, or at least the version shipped with > MS4W, does not use Spatialite in an efficient way. With big > Spatialite tables and small bounding boxes when spatial index > can effectively limit the query it should be possible to make > Mapserver to render at least 10 times faster. Is anybody > interested in having a look on this? Or is this perhaps more > suitable question for gdal-dev mailing list? > > -Jukka Rahkonen- From oliver.christen at camptocamp.com Tue Aug 30 03:40:13 2011 From: oliver.christen at camptocamp.com (Oliver Christen) Date: Tue, 30 Aug 2011 12:40:13 +0200 Subject: [mapserver-users] wrong tileindex path make mapserver 6 crash Message-ID: <4E5CBE0D.3090002@camptocamp.com> hello Im just wondering if it was normal for mapserver 6 to crash instead of returning an error message if a tileindex path was incorrect for a raster layer ? Im using 6.0.0-1 I have a raster layer using a tileindex (ortho/ortho.*): LAYER NAME 'ortho' TYPE RASTER STATUS ON TILEINDEX "ortho/ortho" TILEITEM "LOCATION" END at first the TILEINDEX was wrong set to "ortho", so effectively pointing to the folder instead of the files, which is of course wrong, but I would have expected an error message, not a crash. all I have in my error log is: mod_fcgid: error reading data, FastCGI server closed connection Premature end of script headers: mapserv I tried to turn on the debug with: CONFIG "MS_ERRORFILE" "/tmp/ms_error.txt" DEBUG 5 CONFIG "CPL_DEBUG" "ON" but ms_error.txt is empty is there any way to be able to obtain some error message which may help knowing where the error is? would this problem be fixed in 6.0.1? thanks in advance best regards Oliver From sdavies at sdc.com.au Tue Aug 30 04:43:32 2011 From: sdavies at sdc.com.au (Stephen Davies) Date: Tue, 30 Aug 2011 21:13:32 +0930 Subject: [mapserver-users] Issue with run-time substitution? Message-ID: <201108302113.32658.sdavies@sdc.com.au> I am running mapserver 6.0.1 with map files migrated from 5.6.3. One of my map files has stopped working properly and I suspect that it may be a bug in the 6.0.1 run-time substitution code. The relevant map file layer sections look like this: LAYER CONNECTIONTYPE postgis NAME "battery" DATA "geom from wmd using unique id using SRID=4283" CONNECTION "user=scldad dbname=benparts" STATUS ON TYPE POINT VALIDATION vucv '[0-9]*_[0-9]*' END FILTER (stype='B' and uc='%vucv%') PROJECTION "init=epsg:4283" END MAXSCALE 5000000 LABELITEM "label" CLASSITEM "state" CLASS EXPRESSION "G" STYLE COLOR 0 255 0 SYMBOL 'dot' SIZE 7 OFFSET 17 0 END LABEL POSITION CR TYPE TRUETYPE FONT arial SIZE 8 COLOR 0 255 0 OFFSET 20 0 FORCE TRUE STYLE GEOMTRANSFORM 'labelpoly' COLOR 255 255 255 END END END . . END There are twelve layers with essentially the same definition apart from the STYPE values. The invoking URL has &vucv=137_11 but the postgresql log reveals that no substitution has occurred. The final pgsql command still has '%vucv%'. I suspect that having more than one FILTER with the same substitution breaks things as all other substitutions work fine. (I also tried putting the substitution in the DATA entry but with no better result.) Cheers, Stephen -- ============================================================================= Stephen Davies Consulting P/L Voice: 08-8177 1595 Adelaide, South Australia. Fax : 08-8177 0133 Records & Collections Management. Mobile:040 304 0583 From jcigar at ulb.ac.be Tue Aug 30 04:49:20 2011 From: jcigar at ulb.ac.be (Julien Cigar) Date: Tue, 30 Aug 2011 13:49:20 +0200 Subject: [mapserver-users] Issue with run-time substitution? In-Reply-To: <201108302113.32658.sdavies@sdc.com.au> References: <201108302113.32658.sdavies@sdc.com.au> Message-ID: <4E5CCE40.5050706@ulb.ac.be> On 08/30/2011 13:43, Stephen Davies wrote: > I am running mapserver 6.0.1 with map files migrated from 5.6.3. > > One of my map files has stopped working properly and I suspect that it may be a > bug in the 6.0.1 run-time substitution code. > > The relevant map file layer sections look like this: > > LAYER > CONNECTIONTYPE postgis > NAME "battery" > DATA "geom from wmd using unique id using SRID=4283" > CONNECTION "user=scldad dbname=benparts" > STATUS ON > TYPE POINT > VALIDATION > vucv '[0-9]*_[0-9]*' > END > FILTER (stype='B' and uc='%vucv%') > PROJECTION > "init=epsg:4283" > END > MAXSCALE 5000000 > LABELITEM "label" > CLASSITEM "state" > CLASS > EXPRESSION "G" > STYLE > COLOR 0 255 0 > SYMBOL 'dot' > SIZE 7 > OFFSET 17 0 > END > LABEL > POSITION CR > TYPE TRUETYPE > FONT arial > SIZE 8 > COLOR 0 255 0 > OFFSET 20 0 > FORCE TRUE > STYLE > GEOMTRANSFORM 'labelpoly' > COLOR 255 255 255 > END > END > END > . > . > END > > There are twelve layers with essentially the same definition apart from the > STYPE values. > > The invoking URL has&vucv=137_11 but the postgresql log reveals that no > substitution has occurred. The final pgsql command still has '%vucv%'. > > I suspect that having more than one FILTER with the same substitution breaks > things as all other substitutions work fine. > > (I also tried putting the substitution in the DATA entry but with no better > result.) You should use a METADATA section, something like: METADATA "vucv_validation_pattern" '[0-9]*_[0-9]*' END instead of VALIDATION > > Cheers, > Stephen > -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. -------------- next part -------------- A non-text attachment was scrubbed... Name: jcigar.vcf Type: text/x-vcard Size: 292 bytes Desc: not available URL: From Steve.Toutant at inspq.qc.ca Tue Aug 30 05:23:26 2011 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Tue, 30 Aug 2011 08:23:26 -0400 Subject: RE [Polluriel potentiel] Re: [mapserver-users] Issue with run-time substitution? In-Reply-To: <4E5CCE40.5050706@ulb.ac.be> Message-ID: VALIDATION should work I use it in several mapfiles with MS6. Perhaps move the VALIDATION block before DATA, just between LAYER and CONNECTIONTYPE Julien Cigar @lists.osgeo.org Envoy? par : mapserver-users-bounces at lists.osgeo.org 2011-08-30 07:49 A mapserver-users at lists.osgeo.org cc Objet [Polluriel potentiel] Re: [mapserver-users] Issue with run-time substitution? On 08/30/2011 13:43, Stephen Davies wrote: > I am running mapserver 6.0.1 with map files migrated from 5.6.3. > > One of my map files has stopped working properly and I suspect that it may be a > bug in the 6.0.1 run-time substitution code. > > The relevant map file layer sections look like this: > > LAYER > CONNECTIONTYPE postgis > NAME "battery" > DATA "geom from wmd using unique id using SRID=4283" > CONNECTION "user=scldad dbname=benparts" > STATUS ON > TYPE POINT > VALIDATION > vucv '[0-9]*_[0-9]*' > END > FILTER (stype='B' and uc='%vucv%') > PROJECTION > "init=epsg:4283" > END > MAXSCALE 5000000 > LABELITEM "label" > CLASSITEM "state" > CLASS > EXPRESSION "G" > STYLE > COLOR 0 255 0 > SYMBOL 'dot' > SIZE 7 > OFFSET 17 0 > END > LABEL > POSITION CR > TYPE TRUETYPE > FONT arial > SIZE 8 > COLOR 0 255 0 > OFFSET 20 0 > FORCE TRUE > STYLE > GEOMTRANSFORM 'labelpoly' > COLOR 255 255 255 > END > END > END > . > . > END > > There are twelve layers with essentially the same definition apart from the > STYPE values. > > The invoking URL has&vucv=137_11 but the postgresql log reveals that no > substitution has occurred. The final pgsql command still has '%vucv%'. > > I suspect that having more than one FILTER with the same substitution breaks > things as all other substitutions work fine. > > (I also tried putting the substitution in the DATA entry but with no better > result.) You should use a METADATA section, something like: METADATA "vucv_validation_pattern" '[0-9]*_[0-9]*' END instead of VALIDATION > > Cheers, > Stephen > -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. _______________________________________________ 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: jcigar.vcf Type: application/octet-stream Size: 304 bytes Desc: not available URL: From jmckenna at gatewaygeomatics.com Tue Aug 30 06:17:59 2011 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 30 Aug 2011 10:17:59 -0300 Subject: [mapserver-users] wrong tileindex path make mapserver 6 crash In-Reply-To: <4E5CBE0D.3090002@camptocamp.com> References: <4E5CBE0D.3090002@camptocamp.com> Message-ID: <4E5CE307.6030304@gatewaygeomatics.com> Hello, When I need info like that during testing of tileindexes, I always use the shp2img commandline utility (http://www.mapserver.org/utilities/shp2img.html) with the "-all_debug" switch (see examples on that page). Hope that helps. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 11-08-30 7:40 AM, Oliver Christen wrote: > hello > Im just wondering if it was normal for mapserver 6 to crash instead of > returning an error message if a tileindex path was incorrect for a > raster layer ? > > Im using 6.0.0-1 > > I have a raster layer using a tileindex (ortho/ortho.*): > > LAYER > NAME 'ortho' > TYPE RASTER > STATUS ON > TILEINDEX "ortho/ortho" > TILEITEM "LOCATION" > END > > at first the TILEINDEX was wrong set to "ortho", so effectively pointing > to the folder instead of the files, which is of course wrong, but I > would have expected an error message, not a crash. > > all I have in my error log is: > mod_fcgid: error reading data, FastCGI server closed connection > Premature end of script headers: mapserv > > I tried to turn on the debug with: > CONFIG "MS_ERRORFILE" "/tmp/ms_error.txt" > DEBUG 5 > CONFIG "CPL_DEBUG" "ON" > > but ms_error.txt is empty > > is there any way to be able to obtain some error message which may help > knowing where the error is? > would this problem be fixed in 6.0.1? > > thanks in advance > best regards > Oliver From acarolinagc at gmail.com Tue Aug 30 06:55:20 2011 From: acarolinagc at gmail.com (Amalia Carolina Canavire) Date: Tue, 30 Aug 2011 10:55:20 -0300 Subject: [mapserver-users] msWMSLoadGetMapParams(): WMS server error. Invalid SRS given: SRS must be valid for all requested layers. EPSG 23030 Message-ID: Hola gente, una duda usando gvsig para poder generar una vista desde un .shp debo seleccionar una proyecci?n epsg 23030, porque no me reconece epsg 4326 (con esta opci?n mi vista es vacia , a que se debe? Estoy usando gvsig 1.1 por la extensi?n de publicaci?n, sobre ubuntu. Debido a ello , por las dudas, respeto esta proyecci?n epsg 23030, cuando utilizo vista desde wms, me muestra sin problema, ahora cuando lo hago para web, me sale el error de : msWMSLoadGetMapParams(): WMS server error. Invalid SRS given: SRS must be valid for all requested layers . Si cambio la proyeccion a 4326, no sale el error pero no me muestra nada. Mi codigo es el sgte: MAP NAME map_generated_by_gvsig SIZE 600 400 EXTENT -82.65814999999999 29.435378999999998 -82.05008 29.943614 SYMBOLSET "dmwms1.sym" FONTSET "fonts.txt" LEGEND IMAGECOLOR -1 -1 -1 LABEL FONT "vera" ANGLE FOLLOW COLOR 0 0 0 ENCODING "UTF-8" TYPE truetype SIZE 8 END STATUS ON TRANSPARENT ON END WEB METADATA "wms_encoding" "UTF-8" "wms_title" "Mapserver WMS" "wms_abstract" "" "wms_srs" " EPSG:23030" "wms_onlineresource" " http://localhost/cgi-bin/mapserv?map=%2Fvar%2Fwww%2FgisParcelsFL%2Fmap%2Fdmwms1.map " END END PROJECTION "init=epsg:23030" END LAYER NAME "tl_2010_12001_roads.shp" STATUS ON TYPE LINE DATA "/var/www/gisParcelsFL/tl_2010_12001_roads/tl_2010_12001_roads.shp" MAXSCALE -1.0 MINSCALE -1.0 TRANSPARENCY 100 SIZEUNITS pixels LABELITEM "FULLNAME" PROJECTION "init=epsg:23030" END CLASS STYLE COLOR 153 153 153 WIDTH 1 END NAME "default" LABEL FONT "vera" ANGLE FOLLOW COLOR 0 0 0 TYPE truetype SIZE 7.0 END END METADATA "wms_title" "tl_2010_12001_roads.shp" "wms_abstract" "generated by gvSIG" "wms_extent" "-82.65814999999999 29.435378999999998 -82.05008 29.943614" "gml_include_items" "all" END END # Layer END # Map File -- *************** * :) *sonrei que te queda lindo :):):):): **amy **cgc ************************** * -------------- next part -------------- An HTML attachment was scrubbed... URL: From boolean10001 at yahoo.com Tue Aug 30 07:16:36 2011 From: boolean10001 at yahoo.com (Carlos Ruiz) Date: Tue, 30 Aug 2011 07:16:36 -0700 (PDT) Subject: [mapserver-users] zoom out factor as int In-Reply-To: References: Message-ID: <1314713796.30613.YahooMailNeo@web38205.mail.mud.yahoo.com> Puneet, You have to handle negative integers. For example, to zoom in x2 you have to use +2, to zoom out you have to use -2. Cheers from M?xico IC Carlos Ruiz ----- Original Message ----- From: Mr. Puneet Kishor To: MapServer Cc: Sent: Monday, August 29, 2011 9:49 PM Subject: [mapserver-users] zoom out factor as int how do I express a zoom out factor in zoomPoint( int zoomfactor, pointObj imgpoint, int width, int height, rectObj extent, rectObj maxextent ) : int Obviously, 0.5 won't work as an int is expected. -- Puneet Kishor _______________________________________________ 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 punk.kish at gmail.com Tue Aug 30 07:20:09 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Tue, 30 Aug 2011 09:20:09 -0500 Subject: [mapserver-users] zoom out factor as int In-Reply-To: <1314713796.30613.YahooMailNeo@web38205.mail.mud.yahoo.com> References: <1314713796.30613.YahooMailNeo@web38205.mail.mud.yahoo.com> Message-ID: <4CD32BFA-2E3C-4B17-AAA2-50D86DB95A23@gmail.com> On Aug 30, 2011, at 9:16 AM, Carlos Ruiz wrote: > Puneet, > > You have to handle negative integers. For example, to zoom in x2 you have to use +2, to zoom out you have to use -2. Indeed I do... wouldn't have thought this up without your help. Many thanks Carlos. > > Cheers from M?xico > > > IC Carlos Ruiz > > > > ----- Original Message ----- > From: Mr. Puneet Kishor > To: MapServer > Cc: > Sent: Monday, August 29, 2011 9:49 PM > Subject: [mapserver-users] zoom out factor as int > > how do I express a zoom out factor in > > zoomPoint( int zoomfactor, pointObj imgpoint, int width, int height, rectObj extent, rectObj maxextent ) : int > > > Obviously, 0.5 won't work as an int is expected. > > > -- > Puneet Kishor From Jukka.Rahkonen at mmmtike.fi Tue Aug 30 08:40:45 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Tue, 30 Aug 2011 15:40:45 +0000 Subject: [mapserver-users] RE: Invalid SRS given: SRS must be valid for all requested layers. EPSG 23030 Message-ID: <84446DEF76453C439E9E97E438E13A6301ED42@suutari.haapa.mmm.fi> Hi, I do not understand Spanish but it looks like you have something wrong with projections. MAP EXTENT -82.65814999999999 29.435378999999998 -82.05008 29.943614 PROJECTION "init=epsg:23030" END Projection must be in meters which seem to be the unit for the EPSG:23030 units http://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::23030&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title= The same with "wms_extent" "-82.65814999999999 29.435378999999998 -82.05008 29.943614" use extents in the EPSG:23030 system and units. -Jukka Rahkonen- ________________________________ L?hett?j?: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] k?ytt?j?n Amalia Carolina Canavire [acarolinagc at gmail.com] puolesta L?hetetty: 30. elokuuta 2011 16:55 Vastaanottaja: Lista de Usuarios de gvSIG; mapserver-users at lists.osgeo.org Aihe: [mapserver-users] msWMSLoadGetMapParams(): WMS server error. Invalid SRS given: SRS must be valid for all requested layers. EPSG 23030 Hola gente, una duda usando gvsig para poder generar una vista desde un .shp debo seleccionar una proyecci?n epsg 23030, porque no me reconece epsg 4326 (con esta opci?n mi vista es vacia , a que se debe? Estoy usando gvsig 1.1 por la extensi?n de publicaci?n, sobre ubuntu. Debido a ello , por las dudas, respeto esta proyecci?n epsg 23030, cuando utilizo vista desde wms, me muestra sin problema, ahora cuando lo hago para web, me sale el error de : msWMSLoadGetMapParams(): WMS server error. Invalid SRS given: SRS must be valid for all requested layers . Si cambio la proyeccion a 4326, no sale el error pero no me muestra nada. Mi codigo es el sgte: MAP NAME map_generated_by_gvsig SIZE 600 400 EXTENT -82.65814999999999 29.435378999999998 -82.05008 29.943614 SYMBOLSET "dmwms1.sym" FONTSET "fonts.txt" LEGEND IMAGECOLOR -1 -1 -1 LABEL FONT "vera" ANGLE FOLLOW COLOR 0 0 0 ENCODING "UTF-8" TYPE truetype SIZE 8 END STATUS ON TRANSPARENT ON END WEB METADATA "wms_encoding" "UTF-8" "wms_title" "Mapserver WMS" "wms_abstract" "" "wms_srs" " EPSG:23030" "wms_onlineresource" "http://localhost/cgi-bin/mapserv?map=%2Fvar%2Fwww%2FgisParcelsFL%2Fmap%2Fdmwms1.map" END END PROJECTION "init=epsg:23030" END LAYER NAME "tl_2010_12001_roads.shp" STATUS ON TYPE LINE DATA "/var/www/gisParcelsFL/tl_2010_12001_roads/tl_2010_12001_roads.shp" MAXSCALE -1.0 MINSCALE -1.0 TRANSPARENCY 100 SIZEUNITS pixels LABELITEM "FULLNAME" PROJECTION "init=epsg:23030" END CLASS STYLE COLOR 153 153 153 WIDTH 1 END NAME "default" LABEL FONT "vera" ANGLE FOLLOW COLOR 0 0 0 TYPE truetype SIZE 7.0 END END METADATA "wms_title" "tl_2010_12001_roads.shp" "wms_abstract" "generated by gvSIG" "wms_extent" "-82.65814999999999 29.435378999999998 -82.05008 29.943614" "gml_include_items" "all" END END # Layer END # Map File -- ************** :) sonrei que te queda lindo :):):):): amy cgc ************************** From dmorissette at mapgears.com Tue Aug 30 09:08:16 2011 From: dmorissette at mapgears.com (Daniel Morissette) Date: Tue, 30 Aug 2011 12:08:16 -0400 Subject: [mapserver-users] SLD ignored with mode=map .. ? In-Reply-To: <4E5B7A75.8020209@ulb.ac.be> References: <4E5B7A75.8020209@ulb.ac.be> Message-ID: <4E5D0AF0.6000403@mapgears.com> Yes, that's the expected behavior: SLDs are supported only in WMS requests. On 11-08-29 07:39 AM, Julien Cigar wrote: > Hello, > > everything is in the title :) : I wondered if it's normal that my SLD is > ignored when mode=map (it works perfectly with WMS)? > > I use an URL like: > http://home.bebif.be/mapserver?map=/path/to/mapfile.map&layer=metzger&mode=map&SLD=http://some.host.be/nobanis/mysld.xml > > > Thank you, > Julien > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From acarolinagc at gmail.com Tue Aug 30 09:21:42 2011 From: acarolinagc at gmail.com (Amalia Carolina Canavire) Date: Tue, 30 Aug 2011 13:21:42 -0300 Subject: [mapserver-users] Re: Invalid SRS given: SRS must be valid for all requested layers. EPSG 23030 In-Reply-To: <84446DEF76453C439E9E97E438E13A6301ED42@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301ED42@suutari.haapa.mmm.fi> Message-ID: hi ,I don't good speak english, but i don't understand you, when you say "Projection must be in meters which seem to be the unit for the EPSG:23030 units", you can specify in where may correction in this code, please. thank for you time and helping. 2011/8/30 Rahkonen Jukka > Hi, > > I do not understand Spanish but it looks like you have something wrong with > projections. > > MAP > EXTENT -82.65814999999999 29.435378999999998 -82.05008 29.943614 > PROJECTION > "init=epsg:23030" > END > > Projection must be in meters which seem to be the unit for the EPSG:23030 > units > > http://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::23030&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title= > > The same with "wms_extent" "-82.65814999999999 29.435378999999998 -82.05008 > 29.943614" > use extents in the EPSG:23030 system and units. > > -Jukka Rahkonen- > > > ________________________________ > L?hett?j?: mapserver-users-bounces at lists.osgeo.org [ > mapserver-users-bounces at lists.osgeo.org] k?ytt?j?n Amalia Carolina > Canavire [acarolinagc at gmail.com] puolesta > L?hetetty: 30. elokuuta 2011 16:55 > Vastaanottaja: Lista de Usuarios de gvSIG; mapserver-users at lists.osgeo.org > Aihe: [mapserver-users] msWMSLoadGetMapParams(): WMS server error. Invalid > SRS given: SRS must be valid for all requested layers. EPSG 23030 > > Hola gente, una duda usando gvsig para poder generar una vista desde un > .shp debo seleccionar una proyecci?n epsg 23030, porque no me reconece epsg > 4326 (con esta opci?n mi vista es vacia , a que se debe? > Estoy usando gvsig 1.1 por la extensi?n de publicaci?n, sobre ubuntu. > Debido a ello , por las dudas, respeto esta proyecci?n epsg 23030, cuando > utilizo vista desde wms, me muestra sin problema, ahora cuando lo hago para > web, me sale el error de : > msWMSLoadGetMapParams(): WMS server error. Invalid SRS given: SRS must be > valid for all requested layers . > > Si cambio la proyeccion a 4326, no sale el error pero no me muestra nada. > Mi codigo es el sgte: > > > > MAP > NAME map_generated_by_gvsig > SIZE 600 400 > EXTENT -82.65814999999999 29.435378999999998 -82.05008 29.943614 > SYMBOLSET "dmwms1.sym" > FONTSET "fonts.txt" > LEGEND > IMAGECOLOR -1 -1 -1 > LABEL > FONT "vera" > ANGLE FOLLOW > COLOR 0 0 0 > ENCODING "UTF-8" > TYPE truetype > SIZE 8 > END > STATUS ON > TRANSPARENT ON > END > WEB > METADATA > "wms_encoding" "UTF-8" > "wms_title" "Mapserver WMS" > "wms_abstract" "" > "wms_srs" " EPSG:23030" > "wms_onlineresource" " > http://localhost/cgi-bin/mapserv?map=%2Fvar%2Fwww%2FgisParcelsFL%2Fmap%2Fdmwms1.map > " > END > END > PROJECTION > "init=epsg:23030" > END > LAYER > NAME "tl_2010_12001_roads.shp" > STATUS ON > TYPE LINE > DATA > "/var/www/gisParcelsFL/tl_2010_12001_roads/tl_2010_12001_roads.shp" > MAXSCALE -1.0 > MINSCALE -1.0 > TRANSPARENCY 100 > SIZEUNITS pixels > LABELITEM "FULLNAME" > PROJECTION > "init=epsg:23030" > END > CLASS > STYLE > COLOR 153 153 153 > WIDTH 1 > END > NAME "default" > LABEL > FONT "vera" > ANGLE FOLLOW > COLOR 0 0 0 > TYPE truetype > SIZE 7.0 > END > END > METADATA > "wms_title" "tl_2010_12001_roads.shp" > "wms_abstract" "generated by gvSIG" > "wms_extent" "-82.65814999999999 29.435378999999998 -82.05008 > 29.943614" > "gml_include_items" "all" > END > END # Layer > END # Map File > > -- > > ************** :) sonrei que te queda lindo :):):):): amy cgc > ************************** > > -- *************** * :) *sonrei que te queda lindo :):):):): **amy **cgc ************************** * -------------- next part -------------- An HTML attachment was scrubbed... URL: From punk.kish at gmail.com Tue Aug 30 09:58:41 2011 From: punk.kish at gmail.com (Mr. Puneet Kishor) Date: Tue, 30 Aug 2011 11:58:41 -0500 Subject: [mapserver-users] Re: Invalid SRS given: SRS must be valid for all requested layers. EPSG 23030 In-Reply-To: References: <84446DEF76453C439E9E97E438E13A6301ED42@suutari.haapa.mmm.fi> Message-ID: <37F97A75-970B-4F4B-89F9-A896C8D069B9@gmail.com> On Aug 30, 2011, at 11:21 AM, Amalia Carolina Canavire wrote: > hi ,I don't good speak english, but i don't understand you, when you say > "Projection must be in meters which seem to be the unit for the EPSG:23030 > units", you can specify in where may correction in this code, please. thank > for you time and helping. Your declared projection "EPSG:23030" uses meters, but your extent `EXTENT -82.65814999999999 29.435378999999998 -82.05008 29.943614` is definitely not in meters (unless, you are plotting a very tiny and strange area of the world that is only a few centimeters wide and long). Make sure your extent and projection units match. > > 2011/8/30 Rahkonen Jukka > >> Hi, >> >> I do not understand Spanish but it looks like you have something wrong with >> projections. >> >> MAP >> EXTENT -82.65814999999999 29.435378999999998 -82.05008 29.943614 >> PROJECTION >> "init=epsg:23030" >> END >> >> Projection must be in meters which seem to be the unit for the EPSG:23030 >> units >> >> http://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::23030&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title= >> >> The same with "wms_extent" "-82.65814999999999 29.435378999999998 -82.05008 >> 29.943614" >> use extents in the EPSG:23030 system and units. >> >> -Jukka Rahkonen- >> >> >> ________________________________ >> L?hett?j?: mapserver-users-bounces at lists.osgeo.org [ >> mapserver-users-bounces at lists.osgeo.org] k?ytt?j?n Amalia Carolina >> Canavire [acarolinagc at gmail.com] puolesta >> L?hetetty: 30. elokuuta 2011 16:55 >> Vastaanottaja: Lista de Usuarios de gvSIG; mapserver-users at lists.osgeo.org >> Aihe: [mapserver-users] msWMSLoadGetMapParams(): WMS server error. Invalid >> SRS given: SRS must be valid for all requested layers. EPSG 23030 >> >> Hola gente, una duda usando gvsig para poder generar una vista desde un >> .shp debo seleccionar una proyecci?n epsg 23030, porque no me reconece epsg >> 4326 (con esta opci?n mi vista es vacia , a que se debe? >> Estoy usando gvsig 1.1 por la extensi?n de publicaci?n, sobre ubuntu. >> Debido a ello , por las dudas, respeto esta proyecci?n epsg 23030, cuando >> utilizo vista desde wms, me muestra sin problema, ahora cuando lo hago para >> web, me sale el error de : >> msWMSLoadGetMapParams(): WMS server error. Invalid SRS given: SRS must be >> valid for all requested layers . >> >> Si cambio la proyeccion a 4326, no sale el error pero no me muestra nada. >> Mi codigo es el sgte: >> >> >> >> MAP >> NAME map_generated_by_gvsig >> SIZE 600 400 >> EXTENT -82.65814999999999 29.435378999999998 -82.05008 29.943614 >> SYMBOLSET "dmwms1.sym" >> FONTSET "fonts.txt" >> LEGEND >> IMAGECOLOR -1 -1 -1 >> LABEL >> FONT "vera" >> ANGLE FOLLOW >> COLOR 0 0 0 >> ENCODING "UTF-8" >> TYPE truetype >> SIZE 8 >> END >> STATUS ON >> TRANSPARENT ON >> END >> WEB >> METADATA >> "wms_encoding" "UTF-8" >> "wms_title" "Mapserver WMS" >> "wms_abstract" "" >> "wms_srs" " EPSG:23030" >> "wms_onlineresource" " >> http://localhost/cgi-bin/mapserv?map=%2Fvar%2Fwww%2FgisParcelsFL%2Fmap%2Fdmwms1.map >> " >> END >> END >> PROJECTION >> "init=epsg:23030" >> END >> LAYER >> NAME "tl_2010_12001_roads.shp" >> STATUS ON >> TYPE LINE >> DATA >> "/var/www/gisParcelsFL/tl_2010_12001_roads/tl_2010_12001_roads.shp" >> MAXSCALE -1.0 >> MINSCALE -1.0 >> TRANSPARENCY 100 >> SIZEUNITS pixels >> LABELITEM "FULLNAME" >> PROJECTION >> "init=epsg:23030" >> END >> CLASS >> STYLE >> COLOR 153 153 153 >> WIDTH 1 >> END >> NAME "default" >> LABEL >> FONT "vera" >> ANGLE FOLLOW >> COLOR 0 0 0 >> TYPE truetype >> SIZE 7.0 >> END >> END >> METADATA >> "wms_title" "tl_2010_12001_roads.shp" >> "wms_abstract" "generated by gvSIG" >> "wms_extent" "-82.65814999999999 29.435378999999998 -82.05008 >> 29.943614" >> "gml_include_items" "all" >> END >> END # Layer >> END # Map File >> >> -- >> >> ************** :) sonrei que te queda lindo :):):):): amy cgc >> ************************** >> >> > > > -- > > *************** * :) *sonrei que te queda lindo :):):):): **amy **cgc > ************************** > * > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From acarolinagc at gmail.com Tue Aug 30 10:34:13 2011 From: acarolinagc at gmail.com (Amalia Carolina Canavire) Date: Tue, 30 Aug 2011 14:34:13 -0300 Subject: Fwd: [mapserver-users] Re: Invalid SRS given: SRS must be valid for all requested layers. EPSG 23030 In-Reply-To: <4E5D1B7E.5050805@upm.es> References: <84446DEF76453C439E9E97E438E13A6301ED42@suutari.haapa.mmm.fi> <4E5D1B7E.5050805@upm.es> Message-ID: hi thank everybody, for you help, i changed my code,, but even i can not see layer /*********** on page php **************/ var options = { minResolution: "auto", minExtent: new OpenLayers.Bounds(-1, -1, 1, 1), maxResolution: "auto", maxExtent: new OpenLayers.Bounds("529495","602500","588410","660675"), controls:[ new OpenLayers.Control.LayerSwitcher({'ascending':false}), new OpenLayers.Control.MousePosition(), new OpenLayers.Control.PanZoom(), new OpenLayers.Control.ScaleLine() ] }; var map = new OpenLayers.Map('mapa', options ); var NASAwms2 = new OpenLayers.Layer.WMS("tl_2010_12001_roads.shp", " http://localhost/cgi-bin/mapserv?map=%2Fvar%2Fwww%2FgisParcelsFL%2Fmap%2Fdmwms1.map", {layers: 'tl_2010_12001_roads.shp', format: 'image/png', projection:new OpenLayers.Projection("EPSG:23030")},{isBaseLayer: true}); map.addLayer(NASAwms2); var overview = new OpenLayers.Control.OverviewMap({ mapOptions: { projection: new OpenLayers.Projection("EPSG:23030"), units: "m", maxExtent: new OpenLayers.Bounds("529495","602500","588410","660675"), maxResolution: 20, numZoomLevels: 5 } }); map.addControl(overview); map.zoomToMaxExtent(); /****************************************/ MAP NAME map_generated_by_gvsig SIZE 600 400 EXTENT 529495 602500 588410 660675 SYMBOLSET "dmwms1.sym" FONTSET "fonts.txt" LEGEND IMAGECOLOR -1 -1 -1 LABEL FONT "vera" ANGLE FOLLOW COLOR 0 0 0 ENCODING "UTF-8" TYPE truetype SIZE 8 END STATUS ON TRANSPARENT ON END WEB METADATA "wms_encoding" "UTF-8" "wms_title" "Mapserver WMS" "wms_abstract" "" "wms_srs" "epsg:4326 EPSG:23030" "wms_onlineresource" " http://localhost/cgi-bin/mapserv?map=%2Fvar%2Fwww%2FgisParcelsFL%2Fmap%2Fdmwms1.map " END END PROJECTION "init=epsg:23030" END LAYER NAME "tl_2010_12001_roads.shp" STATUS ON TYPE LINE UNITS METERS DATA "/var/www/gisParcelsFL/tl_2010_12001_roads/tl_2010_12001_roads.shp" MAXSCALE -1.0 MINSCALE -1.0 TRANSPARENCY 100 SIZEUNITS pixels LABELITEM "FULLNAME" #PROJECTION # "init=epsg:23030" #END CLASS STYLE COLOR 153 153 153 WIDTH 1 END NAME "default" LABEL FONT "vera" ANGLE FOLLOW COLOR 0 0 0 TYPE truetype SIZE 7.0 END END METADATA "wms_title" "tl_2010_12001_roads.shp" "wms_abstract" "generated by gvSIG" "wms_extent" "529495 602500 588410 660675" "gml_include_items" "all" END END # Layer END # Map File -------------- next part -------------- An HTML attachment was scrubbed... URL: From pcreso at pcreso.com Tue Aug 30 11:09:55 2011 From: pcreso at pcreso.com (pcreso at pcreso.com) Date: Tue, 30 Aug 2011 11:09:55 -0700 (PDT) Subject: [mapserver-users] Issue with run-time substitution? In-Reply-To: <4E5CCE40.5050706@ulb.ac.be> Message-ID: <1314727795.65612.YahooMailClassic@web160708.mail.bf1.yahoo.com> One question... >From a performance perspective, I would have thought that having the fliter FILTER? (stype='B' and uc='%vucv%') inside the DATA statement SQL would be faster, as only the relevant records would be returned to mapserver, & Postgres would be more efficient at doing this. Is there any advantage in using FILTER instead of an SQL WHERE clause for this? Brent Wood --- On Tue, 8/30/11, Julien Cigar wrote: From: Julien Cigar Subject: Re: [mapserver-users] Issue with run-time substitution? To: mapserver-users at lists.osgeo.org Date: Tuesday, August 30, 2011, 11:49 PM On 08/30/2011 13:43, Stephen Davies wrote: > I am running mapserver 6.0.1 with map files migrated from 5.6.3. > > One of my map files has stopped working properly and I suspect that it may be a > bug in the 6.0.1 run-time substitution code. > > The relevant map file layer sections look like this: > >? ???LAYER >? ? ? ? CONNECTIONTYPE postgis >? ? ? ? NAME "battery" >? ? ? ? DATA "geom from wmd? using unique id using SRID=4283" >? ? ? ? CONNECTION "user=scldad dbname=benparts" >? ? ? ? STATUS ON >? ? ? ? TYPE POINT >? ? ? ? VALIDATION >? ? ? ? ? vucv '[0-9]*_[0-9]*' >? ? ? ? END >? ? ? ? FILTER? (stype='B' and uc='%vucv%') >? ? ? ? PROJECTION >? ? ? ? ? "init=epsg:4283" >? ? ? ? END >? ? ? ? MAXSCALE 5000000 >? ? ? ? LABELITEM "label" >? ? ? ? CLASSITEM "state" >? ? ? ? CLASS >? ? ? ? ? EXPRESSION "G" >? ? ? ? ? STYLE >? ? ? ? ? ? COLOR? ? ? ? 0 255 0 >? ? ? ? ? ? SYMBOL 'dot' >? ? ? ? ? ? SIZE 7 >? ? ? ? ? ? OFFSET 17 0 >? ? ? ? ? END >? ? ? ? ? LABEL >? ? ? ? ? ? POSITION CR >? ? ? ? ? ? TYPE TRUETYPE >? ? ? ? ? ? FONT arial >? ? ? ? ? ? SIZE 8 >? ? ? ? ? ? COLOR 0 255 0 >? ? ? ? ? ? OFFSET 20 0 >? ? ? ? ? ? FORCE TRUE >? ? ? ? ? ? STYLE >? ? ? ? ? ? ? ? ? GEOMTRANSFORM 'labelpoly' >? ? ? ? ? ? ? ? ? COLOR???255 255 255 >? ? ? ? ? ? END >? ? ? ? ? END >? ? ? ? END > . > . > END > > There are twelve layers with essentially the same definition apart from the > STYPE values. > > The invoking URL has&vucv=137_11 but the postgresql log reveals that no > substitution has occurred. The final pgsql command still has '%vucv%'. > > I suspect that having more than one FILTER with the same substitution breaks > things as all other substitutions work fine. > > (I also tried putting the substitution in the DATA entry but with no better > result.) You should use a METADATA section, something like: METADATA ???"vucv_validation_pattern" '[0-9]*_[0-9]*' END instead of VALIDATION > > Cheers, > Stephen > -- No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. -----Inline Attachment Follows----- _______________________________________________ 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 dmorissette at mapgears.com Tue Aug 30 13:11:12 2011 From: dmorissette at mapgears.com (Daniel Morissette) Date: Tue, 30 Aug 2011 16:11:12 -0400 Subject: [mapserver-users] wrong tileindex path make mapserver 6 crash In-Reply-To: <4E5CBE0D.3090002@camptocamp.com> References: <4E5CBE0D.3090002@camptocamp.com> Message-ID: <4E5D43E0.70504@mapgears.com> Hi Oliver, No, a crash is not normal, so we should try to fix it. I made a few tests and was unable to reproduce the issue, can you reproduce it with the CGI or with shp2img (i.e. without FastCGI)? If you could package a small testcase to reproduce the issue with the CGI or with shp2img (with mapfile, exact request to trigger the issue, etc.) and create a ticket then we'll try to have a look. Daniel On 11-08-30 06:40 AM, Oliver Christen wrote: > hello > Im just wondering if it was normal for mapserver 6 to crash instead of > returning an error message if a tileindex path was incorrect for a > raster layer ? > > Im using 6.0.0-1 > > I have a raster layer using a tileindex (ortho/ortho.*): > > LAYER > NAME 'ortho' > TYPE RASTER > STATUS ON > TILEINDEX "ortho/ortho" > TILEITEM "LOCATION" > END > > at first the TILEINDEX was wrong set to "ortho", so effectively pointing > to the folder instead of the files, which is of course wrong, but I > would have expected an error message, not a crash. > > all I have in my error log is: > mod_fcgid: error reading data, FastCGI server closed connection > Premature end of script headers: mapserv > > I tried to turn on the debug with: > CONFIG "MS_ERRORFILE" "/tmp/ms_error.txt" > DEBUG 5 > CONFIG "CPL_DEBUG" "ON" > > but ms_error.txt is empty > > is there any way to be able to obtain some error message which may help > knowing where the error is? > would this problem be fixed in 6.0.1? > > thanks in advance > best regards > Oliver > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Daniel Morissette http://www.mapgears.com/ Provider of Professional MapServer Support since 2000 From even.rouault at mines-paris.org Tue Aug 30 13:28:22 2011 From: even.rouault at mines-paris.org (Even Rouault) Date: Tue, 30 Aug 2011 22:28:22 +0200 Subject: [mapserver-users] Re: Mapserver unnecessary slow with Spatialite In-Reply-To: <84446DEF76453C439E9E97E438E13A6301EBBD@suutari.haapa.mmm.fi> References: <84446DEF76453C439E9E97E438E13A6301E172@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301EBBD@suutari.haapa.mmm.fi> Message-ID: <201108302228.22815.even.rouault@mines-paris.org> Le mardi 30 ao?t 2011 11:07:57, Rahkonen Jukka a ?crit : > Hi, > > Even Rouault made a fix yesterday into the ogr sqlite driver. It gave 11 > times more speed when doing small BBOX selections from a smallish table > with 90000 linestrings. These queries are very typical for Mapserver and > thus when the gdal version behind Mapserver is updated people should see > much more speedy Spatialite rendering. It was also interesting that with > the same sample data selecting from Spatialite was 3 times faster than > from PostGIS. However, there is probably still one problem. Even wrote: > > " However, there is no gain to expect from the above change for a request > such as : ogrinfo OSM_Finland.sqlite -sql "select geometry, osm_id > ,highway,ref, name, tunnel from osm_line where highway is not null" > -spat 389116 6677305 389579 6677661 > > Indeed, when you specify -sql, the driver (and to my knowlegde, this is > true for all other OGR drivers) makes no attempt to merge the spatial > filter, so the spatial filter is evaluated on OGR side, which will be > rather slow. So, you have 2 possibilities, either use the "-where highway > is not null" on a layer so that OGR can merge the attribute and spatial > filters, or incorporate at hand the spatial filter inside the SQL query > specified with -sql. " > > It is very common and handy to define the DATA in Mapserver mapfile with > SQL like the one used in the example. If this is going to lead to slow > Mapserver-OGR-Spatialite queries also in the future, could it be possible > to add some kind of Mapserver processing option that would force the use > of Spatialite spatial index table? It might behave so that if user adds a > directive PROCESSING "USE_ SPATIALITE_SPATIAL_INDEX=YES" then Mapserver > would construct SQL by adding the AND ROWID IN stuff as described in the > GDAL ticket http://trac.osgeo.org/gdal/ticket/4212. xmax, xmin, ymax and > ymin would be captured from the WMS BBOX. I'm not sure how this could be improved in mapserver, but I'm thinking of an easier solution that will require no code change. Why not using sqlite/spatialite views to capture your request ? This way the view will be seen as a regular layer by OGR, and if you specify it as the data in the file, the spatial filter will be applied to it. I've just added support for spatialite views in GDAL trunk (r23011). Spatial index of the base table is used to speed up spatial queries on the view. On your example, to create the spatial view : ogrinfo berlin.sqlite -sql "create view osm_line_highway_not_null as select OGC_FID AS ROWID, GEOMETRY, osm_id ,highway,ref,name, tunnel from osm_line where highway is not null" ogrinfo berlin.sqlite -sql "INSERT INTO views_geometry_columns (view_name, view_geometry, view_rowid, f_table_name, f_geometry_column) VALUES ('osm_line_highway_not_null', 'GEOMETRY', 'ROWID', 'osm_line', 'GEOMETRY')" Note: you must call the primary key ROWID if you want QGIS to be able to display the view on the map. I'm not sure why this is necessary (the OGR driver works with other names), may be a limitation of the qgis spatialite driver. And then you can use osm_line_highway_not_null as a regular layer for mapserver. > > SELECT geometry, osm_id, highway,ref, name, tunnel > FROM osm_line > WHERE highway IS NOT NULL AND ROWID IN ( > SELECT pkid FROM idx_osm_line_GEOMETRY > WHERE xmax > 1487400 AND xmin < 1487500 > AND ymax > 6894200 AND ymin < 6894300); > > > If somebody is interested in having a try with Mapserver and Spatialite > there is a sample database at > http://188.64.1.61/tiedostot/berlin_2011_08_25.zip and corresponding > mapfiles at http://latuviitta.org/documents/osm_maps.zip Use with MS4W > should be as easy as unzipping the berlin.sqlite file into directory > \ms4w\data\ and mapfiles into directory \ms4w\osm_maps\. After that the > Berlin OpenStreetMap WMS should be ready at > http://localhost/cgi-bin/mapserv.exe?map=/ms4w/osm_maps/osm_wms.map > > Because the spatial index issue the service will be rather slow. > > -Jukka Rahkonen- > > > -----Alkuper?inen viesti----- > > L?hett?j?: Rahkonen Jukka > > L?hetetty: 28. elokuuta 2011 23:56 > > Vastaanottaja: MapServer > > Aihe: Mapserver unnecessary slow with Spatialite > > > > Hi, > > > > I have been playing a bit with Mapserver 6.0 and Spatialite > > and I was a bit surprised about how slow this combination is > > with any bigger Spatialite database. I asked for an opinion > > from Mr. Alesandro Furieri who wrote me some hints for making > > efficient queries which are utilising spatial index. > > > > This query comes basically from OGR Spatialite driver page > > http://www.gdal.org/ogr/drv_sqlite.html > > > > SELECT geometry, osm_id, highway, ref, name, tunnel > > FROM osm_line > > WHERE highway IS NOT NULL AND > > > > MBRIntersects(geometry, > > > > BuildMBR(1487400, 6894200, 1487500, 6894300)) > > > > ORDER BY z_order; > > > > OGR documentation says that query is using spatial index. > > However, Alesandro writes that it does not and suggests > > another SQL which is 20 times faster. > > > > Alesandro wrote: > > " Berlin dataset, your original SQL: I've simply adjusted > > the MBR coords. > > Execution time: 397 millis > > Please note: this layer contains very few rows (< 100k): > > so not using the Spatial Index imposes a very bland (but > > still noticeable) overhead. > > > > ================= > > > > SELECT geometry, osm_id, highway,ref, name, tunnel > > FROM osm_line > > WHERE highway IS NOT NULL AND ROWID IN ( > > > > SELECT pkid FROM idx_osm_line_GEOMETRY > > WHERE xmax > 1487400 AND xmin < 1487500 > > > > AND ymax > 6894200 AND ymin < 6894300) > > > > ORDER BY z_order; > > > > Same query: this time using the Spatial Index. > > Execution time: 17 millis ... really a lot better :-D > > and if applied to some larger dataset (> 1 million rows) > > the difference will become absolutely dramatic, as you > > are already experiencing in the Finland test case. > > > > SpatiaLite isn't PostGIS: you *must* explicitly write > > your SQL Queries in such a way to access the corresponding > > Spatial Index table as appropriate. > > > > Please note well: in SQLite/SpatiaLite the R*Tree > > Spatial Index simply is another table between many > > others. > > The SQL engine has absolutely no idea that a strict > > correlation exists between the "geometry" table and > > the corresponding R*Tree. > > So you are explicitly required to define an explicit > > sub-query in order to inquiry the R*Tree. " > > > > It seems that Mapserver, or at least the version shipped with > > MS4W, does not use Spatialite in an efficient way. With big > > Spatialite tables and small bounding boxes when spatial index > > can effectively limit the query it should be possible to make > > Mapserver to render at least 10 times faster. Is anybody > > interested in having a look on this? Or is this perhaps more > > suitable question for gdal-dev mailing list? > > > > -Jukka Rahkonen-_______________________________________________ > > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From jmckenna at gatewaygeomatics.com Tue Aug 30 14:12:19 2011 From: jmckenna at gatewaygeomatics.com (Jeff McKenna) Date: Tue, 30 Aug 2011 18:12:19 -0300 Subject: [mapserver-users] wrong tileindex path make mapserver 6 crash In-Reply-To: <4E5D43E0.70504@mapgears.com> References: <4E5CBE0D.3090002@camptocamp.com> <4E5D43E0.70504@mapgears.com> Message-ID: <4E5D5233.3000800@gatewaygeomatics.com> I know last week on the Windows benchmarking server for FOSS4G I made some mistakes with tileindex paths for rasters, with MapServer 6.1-dev and shp2img, and there was no crash (I used the -all-debug switch to get the error messages from MapServer). Maybe this is a platform-specific issue? not sure. -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 11-08-30 5:11 PM, Daniel Morissette wrote: > Hi Oliver, > > No, a crash is not normal, so we should try to fix it. I made a few > tests and was unable to reproduce the issue, can you reproduce it with > the CGI or with shp2img (i.e. without FastCGI)? > > If you could package a small testcase to reproduce the issue with the > CGI or with shp2img (with mapfile, exact request to trigger the issue, > etc.) and create a ticket then we'll try to have a look. > > Daniel > > > On 11-08-30 06:40 AM, Oliver Christen wrote: >> hello >> Im just wondering if it was normal for mapserver 6 to crash instead of >> returning an error message if a tileindex path was incorrect for a >> raster layer ? >> >> Im using 6.0.0-1 >> >> I have a raster layer using a tileindex (ortho/ortho.*): >> >> LAYER >> NAME 'ortho' >> TYPE RASTER >> STATUS ON >> TILEINDEX "ortho/ortho" >> TILEITEM "LOCATION" >> END >> >> at first the TILEINDEX was wrong set to "ortho", so effectively pointing >> to the folder instead of the files, which is of course wrong, but I >> would have expected an error message, not a crash. >> >> all I have in my error log is: >> mod_fcgid: error reading data, FastCGI server closed connection >> Premature end of script headers: mapserv >> >> I tried to turn on the debug with: >> CONFIG "MS_ERRORFILE" "/tmp/ms_error.txt" >> DEBUG 5 >> CONFIG "CPL_DEBUG" "ON" >> >> but ms_error.txt is empty >> >> is there any way to be able to obtain some error message which may help >> knowing where the error is? >> would this problem be fixed in 6.0.1? >> >> thanks in advance >> best regards >> Oliver From sdavies at sdc.com.au Tue Aug 30 18:33:21 2011 From: sdavies at sdc.com.au (Stephen Davies) Date: Wed, 31 Aug 2011 11:03:21 +0930 Subject: [mapserver-users] Issue with run-time substitution? Message-ID: <201108311103.21850.sdavies@sdc.com.au> I have further reduced a test map file and changed the sequence of statements but one substitution still fails. I have a number of other map files where substitution works as expected and the wfilter substitution in this example also works as expected but I cannot see what is different about the vucv case. The URL looks like this: http://www.agua.com.au/cgi-bin/mapserv?map=/tmp/q.map &mapext=138.4324071+-35.2807010+138.5729945+-35.1222989 &mre=-1070114.26+-4230140.65+289096.72+-2872042.86 &wfilter=id+in+%2847%29&vucv=137_11 The minimal map file is: # template map file for Agua Soil Database Water Mgt # MAP NAME watermgt PROJECTION "proj=eqc" "ellps=GRS80" "towgs84=0,0,0" "no_defs" "lon_0=138.503e" END SIZE 600 600 FONTSET "/var/www/html2/benparts/fonts.list" SYMBOLSET "/var/www/html2/benparts/symbols" UNITS METERS IMAGETYPE jpeg OUTPUTFORMAT NAME 'AGG_JPEG' DRIVER AGG/JPEG IMAGEMODE RGB FORMATOPTION "QUALITY=100" END IMAGECOLOR 255 255 255 WEB template /var/www/html2/benparts/templates/test1.html imagepath "/var/www/html2/tmp/" imageurl "/tmp/" LOG "/tmp/mapserv.log" END LEGEND KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 94 END STATUS ON END LAYER TYPE RASTER NAME "bkgrnd" STATUS ON PROJECTION "init=epsg:4283" END DATA "/var/www/html2/benparts/rasters/JB_Onka_IPOS_Ver2.jpg" PROCESSING "DITHER=YES" END LAYER CONNECTIONTYPE postgis NAME "weather" DATA "geom from weather_station" CONNECTION "user=scldad dbname=benparts" PROCESSING "CLOSE_CONNECTION=DEFER" STATUS ON TYPE POINT VALIDATION wfilter 'id in.*' END FILTER (%wfilter%) PROJECTION "init=epsg:4283" END LABELITEM "name" CLASS NAME "Weather Station" STYLE COLOR 214 0 0 SYMBOL 'circle' SIZE 7 END LABEL MINDISTANCE 150 POSITION CR SIZE TINY COLOR 9 9 9 STYLE GEOMTRANSFORM 'labelpoly' COLOR 255 255 255 END END END END LAYER CONNECTIONTYPE postgis NAME "battery" VALIDATION vucv '.*' END DATA "geom from wmd using unique id using SRID=4283" CONNECTION "user=scldad dbname=benparts" STATUS ON TYPE POINT FILTER (uc='%vucv%' and stype='B') PROJECTION "init=epsg:4283" END MAXSCALE 5000000 LABELITEM "label" CLASSITEM "state" CLASS EXPRESSION "G" STYLE COLOR 0 255 0 SYMBOL 'dot' SIZE 7 OFFSET 17 0 END LABEL POSITION CR TYPE TRUETYPE FONT arial SIZE 8 COLOR 0 255 0 OFFSET 20 0 FORCE TRUE STYLE GEOMTRANSFORM 'labelpoly' COLOR 255 255 255 END END END CLASS EXPRESSION "A" STYLE COLOR 255 215 0 SYMBOL 'dot' SIZE 7 OFFSET 17 0 END LABEL POSITION CR TYPE TRUETYPE FONT arial SIZE 8 COLOR 255 215 0 OFFSET 20 0 FORCE TRUE STYLE GEOMTRANSFORM 'labelpoly' COLOR 255 255 255 END END END CLASS EXPRESSION "R" STYLE COLOR 255 0 0 SYMBOL 'dot' SIZE 7 OFFSET 17 0 END LABEL POSITION CR TYPE TRUETYPE FONT arial SIZE 12 COLOR 255 0 0 OFFSET 20 0 FORCE TRUE STYLE GEOMTRANSFORM 'labelpoly' COLOR 255 255 255 END END END END # # Start of reference map # REFERENCE IMAGE /var/www/html2/benparts/refmaps/sa.png EXTENT -1070114.26 -4230140.65 289096.72 -2872042.86 SIZE 120 120 STATUS ON MINBOXSIZE 5 MAXBOXSIZE 100 COLOR 0 255 0 OUTLINECOLOR 0 0 0 MARKERSIZE 8 MARKER 'star' END # # Start of scalebar # SCALEBAR IMAGECOLOR 0 0 0 LABEL COLOR 255 255 255 SIZE TINY END STYLE 1 SIZE 200 2 COLOR 255 255 255 UNITS KILOMETERS INTERVALS 2 TRANSPARENT TRUE STATUS ON END END When I run this, the Postgresql log shows: LOG: duration: 0.127 ms execute : select "name",encode(ST_AsBinary(ST_Force_2D("geom"),'NDR'),'hex') as geom,"id" from weather_station where geom && GeomFromText('POLYGON((138.42349975 -35.280701,138.42349975 -35.1222989,138.58190185 -35.1222989,138.58190185 -35.280701,138.42349975 -35.280701))',find_srid('','weather_station','geom')) and (id in (47)) LOG: duration: 0.060 ms execute : select "state","label",encode(ST_AsBinary(ST_Force_2D("geom"),'NDR'),'hex') as geom,"id" from wmd where geom && GeomFromText('POLYGON((138.42349975 -35.280701,138.42349975 -35.1222989,138.58190185 -35.1222989,138.58190185 -35.280701,138.42349975 -35.280701))',4283) and (uc='%vucv%' and stype='B') This illustrates that the wfilter substitution worked but the vucv substitution did not. Cheers, Stephen -- ============================================================================= Stephen Davies Consulting P/L Voice: 08-8177 1595 Adelaide, South Australia. Fax : 08-8177 0133 Records & Collections Management. Mobile:040 304 0583 From Jukka.Rahkonen at mmmtike.fi Tue Aug 30 22:09:31 2011 From: Jukka.Rahkonen at mmmtike.fi (Rahkonen Jukka) Date: Wed, 31 Aug 2011 05:09:31 +0000 Subject: [mapserver-users] Re: Mapserver unnecessary slow with Spatialite In-Reply-To: <201108302228.22815.even.rouault@mines-paris.org> References: <84446DEF76453C439E9E97E438E13A6301E172@suutari.haapa.mmm.fi> <84446DEF76453C439E9E97E438E13A6301EBBD@suutari.haapa.mmm.fi> <201108302228.22815.even.rouault@mines-paris.org> Message-ID: <84446DEF76453C439E9E97E438E13A6301EE0B@suutari.haapa.mmm.fi> Hi, I did have the views on my mind but I thought that if they were used ogr would perhaps loose the spatial index of the Spatialite table. Good if views will work. It feels like a solid solution even it means playing both with the mapfile and on the Spatialite side when creating new layers. -Jukka Rahkonen- Even Rouault wrote: > > Le mardi 30 ao?t 2011 11:07:57, Rahkonen Jukka a ?crit : > > Hi, > > > > Even Rouault made a fix yesterday into the ogr sqlite > driver. It gave 11 > > times more speed when doing small BBOX selections from a > smallish table > > with 90000 linestrings. These queries are very typical for > Mapserver and > > thus when the gdal version behind Mapserver is updated > people should see > > much more speedy Spatialite rendering. It was also > interesting that with > > the same sample data selecting from Spatialite was 3 times > faster than > > from PostGIS. However, there is probably still one problem. > Even wrote: > > > > " However, there is no gain to expect from the above > change for a request > > such as : ogrinfo OSM_Finland.sqlite -sql "select geometry, osm_id > > ,highway,ref, name, tunnel from osm_line where highway is not null" > > -spat 389116 6677305 389579 6677661 > > > > Indeed, when you specify -sql, the driver (and to my > knowlegde, this is > > true for all other OGR drivers) makes no attempt to merge > the spatial > > filter, so the spatial filter is evaluated on OGR side, > which will be > > rather slow. So, you have 2 possibilities, either use the > "-where highway > > is not null" on a layer so that OGR can merge the attribute > and spatial > > filters, or incorporate at hand the spatial filter inside > the SQL query > > specified with -sql. " > > > > It is very common and handy to define the DATA in Mapserver > mapfile with > > SQL like the one used in the example. If this is going to > lead to slow > > Mapserver-OGR-Spatialite queries also in the future, could > it be possible > > to add some kind of Mapserver processing option that would > force the use > > of Spatialite spatial index table? It might behave so that > if user adds a > > directive PROCESSING "USE_ SPATIALITE_SPATIAL_INDEX=YES" > then Mapserver > > would construct SQL by adding the AND ROWID IN stuff as > described in the > > GDAL ticket http://trac.osgeo.org/gdal/ticket/4212. xmax, > xmin, ymax and > > ymin would be captured from the WMS BBOX. > > I'm not sure how this could be improved in mapserver, but I'm > thinking of an > easier solution that will require no code change. Why not using > sqlite/spatialite views to capture your request ? This way > the view will be > seen as a regular layer by OGR, and if you specify it as the > data in the file, > the spatial filter will be applied to it. > > I've just added support for spatialite views in GDAL trunk > (r23011). Spatial > index of the base table is used to speed up spatial queries > on the view. > > On your example, to create the spatial view : > > ogrinfo berlin.sqlite -sql "create view > osm_line_highway_not_null as select > OGC_FID AS ROWID, GEOMETRY, osm_id ,highway,ref,name, tunnel > from osm_line > where highway is not null" > > ogrinfo berlin.sqlite -sql "INSERT INTO > views_geometry_columns (view_name, > view_geometry, view_rowid, f_table_name, f_geometry_column) VALUES > ('osm_line_highway_not_null', 'GEOMETRY', 'ROWID', > 'osm_line', 'GEOMETRY')" > > Note: you must call the primary key ROWID if you want QGIS to > be able to > display the view on the map. I'm not sure why this is > necessary (the OGR > driver works with other names), may be a limitation of the > qgis spatialite > driver. > > And then you can use osm_line_highway_not_null as a regular > layer for > mapserver. > > > > > SELECT geometry, osm_id, highway,ref, name, tunnel > > FROM osm_line > > WHERE highway IS NOT NULL AND ROWID IN ( > > SELECT pkid FROM idx_osm_line_GEOMETRY > > WHERE xmax > 1487400 AND xmin < 1487500 > > AND ymax > 6894200 AND ymin < 6894300); > > > > > > If somebody is interested in having a try with Mapserver > and Spatialite > > there is a sample database at > > http://188.64.1.61/tiedostot/berlin_2011_08_25.zip and corresponding > > mapfiles at http://latuviitta.org/documents/osm_maps.zip > Use with MS4W > > should be as easy as unzipping the berlin.sqlite file into directory > > \ms4w\data\ and mapfiles into directory \ms4w\osm_maps\. > After that the > > Berlin OpenStreetMap WMS should be ready at > > http://localhost/cgi-bin/mapserv.exe?map=/ms4w/osm_maps/osm_wms.map > > > > Because the spatial index issue the service will be rather slow. > > > > -Jukka Rahkonen- > > > > > -----Alkuper?inen viesti----- > > > L?hett?j?: Rahkonen Jukka > > > L?hetetty: 28. elokuuta 2011 23:56 > > > Vastaanottaja: MapServer > > > Aihe: Mapserver unnecessary slow with Spatialite > > > > > > Hi, > > > > > > I have been playing a bit with Mapserver 6.0 and Spatialite > > > and I was a bit surprised about how slow this combination is > > > with any bigger Spatialite database. I asked for an opinion > > > from Mr. Alesandro Furieri who wrote me some hints for making > > > efficient queries which are utilising spatial index. > > > > > > This query comes basically from OGR Spatialite driver page > > > http://www.gdal.org/ogr/drv_sqlite.html > > > > > > SELECT geometry, osm_id, highway, ref, name, tunnel > > > FROM osm_line > > > WHERE highway IS NOT NULL AND > > > > > > MBRIntersects(geometry, > > > > > > BuildMBR(1487400, 6894200, 1487500, 6894300)) > > > > > > ORDER BY z_order; > > > > > > OGR documentation says that query is using spatial index. > > > However, Alesandro writes that it does not and suggests > > > another SQL which is 20 times faster. > > > > > > Alesandro wrote: > > > " Berlin dataset, your original SQL: I've simply adjusted > > > the MBR coords. > > > Execution time: 397 millis > > > Please note: this layer contains very few rows (< 100k): > > > so not using the Spatial Index imposes a very bland (but > > > still noticeable) overhead. > > > > > > ================= > > > > > > SELECT geometry, osm_id, highway,ref, name, tunnel > > > FROM osm_line > > > WHERE highway IS NOT NULL AND ROWID IN ( > > > > > > SELECT pkid FROM idx_osm_line_GEOMETRY > > > WHERE xmax > 1487400 AND xmin < 1487500 > > > > > > AND ymax > 6894200 AND ymin < 6894300) > > > > > > ORDER BY z_order; > > > > > > Same query: this time using the Spatial Index. > > > Execution time: 17 millis ... really a lot better :-D > > > and if applied to some larger dataset (> 1 million rows) > > > the difference will become absolutely dramatic, as you > > > are already experiencing in the Finland test case. > > > > > > SpatiaLite isn't PostGIS: you *must* explicitly write > > > your SQL Queries in such a way to access the corresponding > > > Spatial Index table as appropriate. > > > > > > Please note well: in SQLite/SpatiaLite the R*Tree > > > Spatial Index simply is another table between many > > > others. > > > The SQL engine has absolutely no idea that a strict > > > correlation exists between the "geometry" table and > > > the corresponding R*Tree. > > > So you are explicitly required to define an explicit > > > sub-query in order to inquiry the R*Tree. " > > > > > > It seems that Mapserver, or at least the version shipped with > > > MS4W, does not use Spatialite in an efficient way. With big > > > Spatialite tables and small bounding boxes when spatial index > > > can effectively limit the query it should be possible to make > > > Mapserver to render at least 10 times faster. Is anybody > > > interested in having a look on this? Or is this perhaps more > > > suitable question for gdal-dev mailing list? > > > > > > -Jukka Rahkonen-_______________________________________________ > > > > 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 Wed Aug 31 05:34:08 2011 From: Steve.Toutant at inspq.qc.ca (Steve.Toutant at inspq.qc.ca) Date: Wed, 31 Aug 2011 08:34:08 -0400 Subject: RE [Polluriel potentiel] Re: [mapserver-users] Issue with run-time substitution? In-Reply-To: <201108311103.21850.sdavies@sdc.com.au> Message-ID: Since you don't have a FILTERITEM I don't I don't understand why this is working FILTER (%wfilter%) Perhaps you should use the brackets and "" if the data type is a string Per example, if uc is char I would write this FILTER ("[uc]" = "%vucv%") If it is a number FILTER ([uc] = "%vucv%") Stephen Davies @lists.osgeo.org Envoy? par : mapserver-users-bounces at lists.osgeo.org 2011-08-30 21:33 Veuillez r?pondre ? sdavies at sdc.com.au A mapserver-users at lists.osgeo.org cc Objet [Polluriel potentiel] Re: [mapserver-users] Issue with run-time substitution? I have further reduced a test map file and changed the sequence of statements but one substitution still fails. I have a number of other map files where substitution works as expected and the wfilter substitution in this example also works as expected but I cannot see what is different about the vucv case. The URL looks like this: http://www.agua.com.au/cgi-bin/mapserv?map=/tmp/q.map &mapext=138.4324071+-35.2807010+138.5729945+-35.1222989 &mre=-1070114.26+-4230140.65+289096.72+-2872042.86 &wfilter=id+in+%2847%29&vucv=137_11 The minimal map file is: # template map file for Agua Soil Database Water Mgt # MAP NAME watermgt PROJECTION "proj=eqc" "ellps=GRS80" "towgs84=0,0,0" "no_defs" "lon_0=138.503e" END SIZE 600 600 FONTSET "/var/www/html2/benparts/fonts.list" SYMBOLSET "/var/www/html2/benparts/symbols" UNITS METERS IMAGETYPE jpeg OUTPUTFORMAT NAME 'AGG_JPEG' DRIVER AGG/JPEG IMAGEMODE RGB FORMATOPTION "QUALITY=100" END IMAGECOLOR 255 255 255 WEB template /var/www/html2/benparts/templates/test1.html imagepath "/var/www/html2/tmp/" imageurl "/tmp/" LOG "/tmp/mapserv.log" END LEGEND KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 94 END STATUS ON END LAYER TYPE RASTER NAME "bkgrnd" STATUS ON PROJECTION "init=epsg:4283" END DATA "/var/www/html2/benparts/rasters/JB_Onka_IPOS_Ver2.jpg" PROCESSING "DITHER=YES" END LAYER CONNECTIONTYPE postgis NAME "weather" DATA "geom from weather_station" CONNECTION "user=scldad dbname=benparts" PROCESSING "CLOSE_CONNECTION=DEFER" STATUS ON TYPE POINT VALIDATION wfilter 'id in.*' END FILTER (%wfilter%) PROJECTION "init=epsg:4283" END LABELITEM "name" CLASS NAME "Weather Station" STYLE COLOR 214 0 0 SYMBOL 'circle' SIZE 7 END LABEL MINDISTANCE 150 POSITION CR SIZE TINY COLOR 9 9 9 STYLE GEOMTRANSFORM 'labelpoly' COLOR 255 255 255 END END END END LAYER CONNECTIONTYPE postgis NAME "battery" VALIDATION vucv '.*' END DATA "geom from wmd using unique id using SRID=4283" CONNECTION "user=scldad dbname=benparts" STATUS ON TYPE POINT FILTER (uc='%vucv%' and stype='B') PROJECTION "init=epsg:4283" END MAXSCALE 5000000 LABELITEM "label" CLASSITEM "state" CLASS EXPRESSION "G" STYLE COLOR 0 255 0 SYMBOL 'dot' SIZE 7 OFFSET 17 0 END LABEL POSITION CR TYPE TRUETYPE FONT arial SIZE 8 COLOR 0 255 0 OFFSET 20 0 FORCE TRUE STYLE GEOMTRANSFORM 'labelpoly' COLOR 255 255 255 END END END CLASS EXPRESSION "A" STYLE COLOR 255 215 0 SYMBOL 'dot' SIZE 7 OFFSET 17 0 END LABEL POSITION CR TYPE TRUETYPE FONT arial SIZE 8 COLOR 255 215 0 OFFSET 20 0 FORCE TRUE STYLE GEOMTRANSFORM 'labelpoly' COLOR 255 255 255 END END END CLASS EXPRESSION "R" STYLE COLOR 255 0 0 SYMBOL 'dot' SIZE 7 OFFSET 17 0 END LABEL POSITION CR TYPE TRUETYPE FONT arial SIZE 12 COLOR 255 0 0 OFFSET 20 0 FORCE TRUE STYLE GEOMTRANSFORM 'labelpoly' COLOR 255 255 255 END END END END # # Start of reference map # REFERENCE IMAGE /var/www/html2/benparts/refmaps/sa.png EXTENT -1070114.26 -4230140.65 289096.72 -2872042.86 SIZE 120 120 STATUS ON MINBOXSIZE 5 MAXBOXSIZE 100 COLOR 0 255 0 OUTLINECOLOR 0 0 0 MARKERSIZE 8 MARKER 'star' END # # Start of scalebar # SCALEBAR IMAGECOLOR 0 0 0 LABEL COLOR 255 255 255 SIZE TINY END STYLE 1 SIZE 200 2 COLOR 255 255 255 UNITS KILOMETERS INTERVALS 2 TRANSPARENT TRUE STATUS ON END END When I run this, the Postgresql log shows: LOG: duration: 0.127 ms execute : select "name",encode(ST_AsBinary(ST_Force_2D("geom"),'NDR'),'hex') as geom,"id" from weather_station where geom && GeomFromText('POLYGON((138.42349975 -35.280701,138.42349975 -35.1222989,138.58190185 -35.1222989,138.58190185 -35.280701,138.42349975 -35.280701))',find_srid('','weather_station','geom')) and (id in (47)) LOG: duration: 0.060 ms execute : select "state","label",encode(ST_AsBinary(ST_Force_2D("geom"),'NDR'),'hex') as geom,"id" from wmd where geom && GeomFromText('POLYGON((138.42349975 -35.280701,138.42349975 -35.1222989,138.58190185 -35.1222989,138.58190185 -35.280701,138.42349975 -35.280701))',4283) and (uc='%vucv%' and stype='B') This illustrates that the wfilter substitution worked but the vucv substitution did not. Cheers, Stephen -- ============================================================================= Stephen Davies Consulting P/L Voice: 08-8177 1595 Adelaide, South Australia. Fax : 08-8177 0133 Records & Collections Management. Mobile:040 304 0583 _______________________________________________ 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 sdlime at gmail.com Wed Aug 31 06:47:28 2011 From: sdlime at gmail.com (Steve Lime) Date: Wed, 31 Aug 2011 08:47:28 -0500 Subject: [mapserver-users] Issue with run-time substitution? In-Reply-To: <201108302113.32658.sdavies@sdc.com.au> References: <201108302113.32658.sdavies@sdc.com.au> Message-ID: <04D19D47-385C-4DD7-B34A-CECB94E727DF@gmail.com> Hmm... Looks like it's setup correctly although you validation pattern isn't strong enough. As a test what happens if you try a pattern like '.'? If that works then it's a regex error. One thing that comes to mind is that maybe there's query string parsing issue and the var to substitute isn't being recognized. Spaces or other chars ahead of &var could mess things up. Something to check. Steve Sent from my iPad On Aug 30, 2011, at 6:43 AM, Stephen Davies wrote: > I am running mapserver 6.0.1 with map files migrated from 5.6.3. > > One of my map files has stopped working properly and I suspect that it may be a > bug in the 6.0.1 run-time substitution code. > > The relevant map file layer sections look like this: > > LAYER > CONNECTIONTYPE postgis > NAME "battery" > DATA "geom from wmd using unique id using SRID=4283" > CONNECTION "user=scldad dbname=benparts" > STATUS ON > TYPE POINT > VALIDATION > vucv '[0-9]*_[0-9]*' > END > FILTER (stype='B' and uc='%vucv%') > PROJECTION > "init=epsg:4283" > END > MAXSCALE 5000000 > LABELITEM "label" > CLASSITEM "state" > CLASS > EXPRESSION "G" > STYLE > COLOR 0 255 0 > SYMBOL 'dot' > SIZE 7 > OFFSET 17 0 > END > LABEL > POSITION CR > TYPE TRUETYPE > FONT arial > SIZE 8 > COLOR 0 255 0 > OFFSET 20 0 > FORCE TRUE > STYLE > GEOMTRANSFORM 'labelpoly' > COLOR 255 255 255 > END > END > END > . > . > END > > There are twelve layers with essentially the same definition apart from the > STYPE values. > > The invoking URL has &vucv=137_11 but the postgresql log reveals that no > substitution has occurred. The final pgsql command still has '%vucv%'. > > I suspect that having more than one FILTER with the same substitution breaks > things as all other substitutions work fine. > > (I also tried putting the substitution in the DATA entry but with no better > result.) > > Cheers, > Stephen > > -- > ============================================================================= > Stephen Davies Consulting P/L Voice: 08-8177 1595 > Adelaide, South Australia. Fax : 08-8177 0133 > Records & Collections Management. Mobile:040 304 0583 > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From sdlime at gmail.com Wed Aug 31 06:49:49 2011 From: sdlime at gmail.com (Steve Lime) Date: Wed, 31 Aug 2011 08:49:49 -0500 Subject: [mapserver-users] Issue with run-time substitution? In-Reply-To: <1314727795.65612.YahooMailClassic@web160708.mail.bf1.yahoo.com> References: <1314727795.65612.YahooMailClassic@web160708.mail.bf1.yahoo.com> Message-ID: <6FFD0E65-4E37-4BF8-8492-D54734C5714A@gmail.com> It's probably a wash. The filer is integrated into the data statement anyway, I'd go with DATA just because it's easier to see what's going on. Steve Sent from my iPad On Aug 30, 2011, at 1:09 PM, pcreso at pcreso.com wrote: > One question... > > From a performance perspective, I would have thought that having the fliter > FILTER (stype='B' and uc='%vucv%') > inside the DATA statement SQL would be faster, as only the relevant records would be returned to mapserver, & Postgres would be more efficient at doing this. > > Is there any advantage in using FILTER instead of an SQL WHERE clause for this? > > Brent Wood > > --- On Tue, 8/30/11, Julien Cigar wrote: > > From: Julien Cigar > Subject: Re: [mapserver-users] Issue with run-time substitution? > To: mapserver-users at lists.osgeo.org > Date: Tuesday, August 30, 2011, 11:49 PM > > On 08/30/2011 13:43, Stephen Davies wrote: > > I am running mapserver 6.0.1 with map files migrated from 5.6.3. > > > > One of my map files has stopped working properly and I suspect that it may be a > > bug in the 6.0.1 run-time substitution code. > > > > The relevant map file layer sections look like this: > > > > LAYER > > CONNECTIONTYPE postgis > > NAME "battery" > > DATA "geom from wmd using unique id using SRID=4283" > > CONNECTION "user=scldad dbname=benparts" > > STATUS ON > > TYPE POINT > > VALIDATION > > vucv '[0-9]*_[0-9]*' > > END > > FILTER (stype='B' and uc='%vucv%') > > PROJECTION > > "init=epsg:4283" > > END > > MAXSCALE 5000000 > > LABELITEM "label" > > CLASSITEM "state" > > CLASS > > EXPRESSION "G" > > STYLE > > COLOR 0 255 0 > > SYMBOL 'dot' > > SIZE 7 > > OFFSET 17 0 > > END > > LABEL > > POSITION CR > > TYPE TRUETYPE > > FONT arial > > SIZE 8 > > COLOR 0 255 0 > > OFFSET 20 0 > > FORCE TRUE > > STYLE > > GEOMTRANSFORM 'labelpoly' > > COLOR 255 255 255 > > END > > END > > END > > . > > . > > END > > > > There are twelve layers with essentially the same definition apart from the > > STYPE values. > > > > The invoking URL has&vucv=137_11 but the postgresql log reveals that no > > substitution has occurred. The final pgsql command still has '%vucv%'. > > > > I suspect that having more than one FILTER with the same substitution breaks > > things as all other substitutions work fine. > > > > (I also tried putting the substitution in the DATA entry but with no better > > result.) > > You should use a METADATA section, something like: > > METADATA > "vucv_validation_pattern" '[0-9]*_[0-9]*' > END > > instead of VALIDATION > > > > > Cheers, > > Stephen > > > > > -- > No trees were killed in the creation of this message. > However, many electrons were terribly inconvenienced. > > -----Inline Attachment Follows----- > > _______________________________________________ > 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 xander at mitre.org Wed Aug 31 09:27:53 2011 From: xander at mitre.org (xander) Date: Wed, 31 Aug 2011 09:27:53 -0700 (PDT) Subject: [mapserver-users] Import of KML Message-ID: <1314808073465-6747216.post@n2.nabble.com> I would like to use a KML file as a vector data source (points), and use the "heading" part of "IconStyle" to orient an icon at the location of the point. I can render the points, using shp2img, with a layer like this: LAYER NAME WINDS EXTENT -180 -90 180 90 TYPE POINT CONNECTIONTYPE ogr CONNECTION "C:/MapData/maps/KML/wind1.kml" DATA "wind1" CLASS NAME "windstyle" STYLE COLOR 32 32 128 SYMBOL "circle" SIZE 6 END END END Now how do I make use of the attributes in the KML file to determine which icon to use and how to orient it? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Import-of-KML-tp6747216p6747216.html Sent from the Mapserver - User mailing list archive at Nabble.com. From ian.walberg at airborne.aero Wed Aug 31 21:07:12 2011 From: ian.walberg at airborne.aero (Ian Walberg) Date: Thu, 1 Sep 2011 00:07:12 -0400 Subject: [mapserver-users] Projection question In-Reply-To: <04D19D47-385C-4DD7-B34A-CECB94E727DF@gmail.com> References: <201108302113.32658.sdavies@sdc.com.au> <04D19D47-385C-4DD7-B34A-CECB94E727DF@gmail.com> Message-ID: I thought I understood how PROJECTION worked in map files.... The map file below renders the earth/countries outline and a rectangle with the overall map projection set to init=epsg:4326 and EXTENT -180 -90 180 90. However when I change the overall map projection to "proj=ortho" and EXTENT -8000000 -8000000 8000000 8000000 I get a globe drawn the rectangle has not been projected onto the globe. I have various other layers with city names etc and all of these project ok. What have I misunderstood here? Thanks Ian LAYER NAME "box" STATUS DEFAULT TYPE polygon FEATURE WKT "POLYGON ((180.0 0.0, -180.0 0.0, -180.0 90.0, 180.0 90.0, 180.0 0.0))" END CLASS STYLE COLOR 0 0 100 END END PROJECTION "init=epsg:4326" END END LAYER NAME world TYPE polygon DATA World_Countries.shp STATUS DEFAULT CLASS STYLE COLOR 50 128 50 OUTLINECOLOR 10 10 10 WIDTH 1 END END PROJECTION "init=epsg:4326" END END PROJECTION "init=epsg:4326" # "proj=ortho" # "lat_0=0.0" # "lon_0=-90.0" END -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdlime at gmail.com Wed Aug 31 21:30:02 2011 From: sdlime at gmail.com (Steve Lime) Date: Wed, 31 Aug 2011 23:30:02 -0500 Subject: [mapserver-users] SLD ignored with mode=map .. ? In-Reply-To: <4E5D0AF0.6000403@mapgears.com> References: <4E5B7A75.8020209@ulb.ac.be> <4E5D0AF0.6000403@mapgears.com> Message-ID: This would be a nice addition to standard CGI behavior wouldn't it? Could a ticket be filed and maybe this added in 6.2? On Tue, Aug 30, 2011 at 11:08 AM, Daniel Morissette wrote: > Yes, that's the expected behavior: SLDs are supported only in WMS requests. > > > On 11-08-29 07:39 AM, Julien Cigar wrote: >> >> Hello, >> >> everything is in the title :) : I wondered if it's normal that my SLD is >> ignored when mode=map (it works perfectly with WMS)? >> >> I use an URL like: >> >> http://home.bebif.be/mapserver?map=/path/to/mapfile.map&layer=metzger&mode=map&SLD=http://some.host.be/nobanis/mysld.xml >> >> >> Thank you, >> Julien >> >> >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users at lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users > > > -- > Daniel Morissette > http://www.mapgears.com/ > Provider of Professional MapServer Support since 2000 > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > From woodbri at swoodbridge.com Wed Aug 31 21:32:37 2011 From: woodbri at swoodbridge.com (Stephen Woodbridge) Date: Thu, 01 Sep 2011 00:32:37 -0400 Subject: [mapserver-users] Projection question In-Reply-To: References: <201108302113.32658.sdavies@sdc.com.au> <04D19D47-385C-4DD7-B34A-CECB94E727DF@gmail.com> Message-ID: <4E5F0AE5.4030601@swoodbridge.com> Ian, Projections are only done on the vertices of the objects. So the 4 corners of the rectangle, which by the way should have a projection block, will get re-projected BUT then straight lines are drawn between the corners. If you want the rectangle edges to be reprojected with curvature, then you have to subdivide the edges into many points so the straight lines between the points give the appearance of curvature. PROJECTION ... END blocks need to appear in two places. in the MAP block the projection defines the output projection to use. If a LAYER does NOT have a PROJECTION block then DATA for that layer is assumed to be in the output projection. If the data for a LAYER is in some other projection then you need to have a PROJECTION block to define the LAYER's data projection. -Steve W On 9/1/2011 12:07 AM, Ian Walberg wrote: > I thought I understood how PROJECTION worked in map files.... > > The map file below renders the earth/countries outline and a rectangle > with the overall map projection set to init=epsg:4326 and EXTENT -180 > -90 180 90. > > However when I change the overall map projection to "proj=ortho" and > EXTENT -8000000 -8000000 8000000 8000000 I get a globe drawn the > rectangle has not been projected onto the globe. > > I have various other layers with city names etc and all of these project > ok. > > What have I misunderstood here? > > Thanks > > Ian > > LAYER > > NAME "box" > > STATUS DEFAULT > > TYPE polygon > > FEATURE > > WKT "POLYGON ((180.0 0.0, -180.0 0.0, -180.0 90.0, 180.0 90.0, 180.0 0.0))" > > END > > CLASS > > STYLE > > COLOR 0 0 100 > > END > > END > > PROJECTION > > "init=epsg:4326" > > END > > END > > LAYER > > NAME world > > TYPE polygon > > DATA World_Countries.shp > > STATUS DEFAULT > > CLASS > > STYLE > > COLOR 50 128 50 > > OUTLINECOLOR 10 10 10 > > WIDTH 1 > > END > > END > > PROJECTION > > "init=epsg:4326" > > END > > END > > PROJECTION > > "init=epsg:4326" > > # "proj=ortho" > > # "lat_0=0.0" > > # "lon_0=-90.0" > > END > > > > _______________________________________________ > mapserver-users mailing list > mapserver-users at lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users From ian.walberg at airborne.aero Wed Aug 31 21:47:00 2011 From: ian.walberg at airborne.aero (Ian Walberg) Date: Thu, 1 Sep 2011 00:47:00 -0400 Subject: [mapserver-users] Projection question In-Reply-To: <4E5F0AE5.4030601@swoodbridge.com> References: <201108302113.32658.sdavies@sdc.com.au><04D19D47-385C-4DD7-B34A-CECB94E727DF@gmail.com> <4E5F0AE5.4030601@swoodbridge.com> Message-ID: Steve, Thanks for these details, I think I understand what you are saying. I do need to experiment a little more to understand what we are seeing however. We do have a PROJECTION definition for each layer and the map block. Regards Ian -----Original Message----- From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Stephen Woodbridge Sent: Wednesday, August 31, 2011 9:33 PM To: mapserver-users at lists.osgeo.org Subject: Re: [mapserver-users] Projection question Ian, Projections are only done on the vertices of the objects. So the 4 corners of the rectangle, which by the way should have a projection block, will get re-projected BUT then straight lines are drawn between the corners. If you want the rectangle edges to be reprojected with curvature, then you have to subdivide the edges into many points so the straight lines between the points give the appearance of curvature. PROJECTION ... END blocks need to appear in two places. in the MAP block the projection defines the output projection to use. If a LAYER does NOT have a PROJECTION block then DATA for that layer is assumed to be in the output projection. If the data for a LAYER is in some other projection then you need to have a PROJECTION block to define the LAYER's data projection. -Steve W On 9/1/2011 12:07 AM, Ian Walberg wrote: > I thought I understood how PROJECTION worked in map files.... > > The map file below renders the earth/countries outline and a rectangle > with the overall map projection set to init=epsg:4326 and EXTENT -180 > -90 180 90. > > However when I change the overall map projection to "proj=ortho" and > EXTENT -8000000 -8000000 8000000 8000000 I get a globe drawn the > rectangle has not been projected onto the globe. > > I have various other layers with city names etc and all of these project > ok. > > What have I misunderstood here? > > Thanks > > Ian > > LAYER > > NAME "box" > > STATUS DEFAULT > > TYPE polygon > > FEATURE > > WKT "POLYGON ((180.0 0.0, -180.0 0.0, -180.0 90.0, 180.0 90.0, 180.0 0.0))" > > END > > CLASS > > STYLE > > COLOR 0 0 100 > > END > > END > > PROJECTION > > "init=epsg:4326" > > END > > END > > LAYER > > NAME world > > TYPE polygon > > DATA World_Countries.shp > > STATUS DEFAULT > > CLASS > > STYLE > > COLOR 50 128 50 > > OUTLINECOLOR 10 10 10 > > WIDTH 1 > > END > > END > > PROJECTION > > "init=epsg:4326" > > END > > END > > PROJECTION > > "init=epsg:4326" > > # "proj=ortho" > > # "lat_0=0.0" > > # "lon_0=-90.0" > > 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