Re: [mapserver-users] Internal Server Error / proxy.cgi Fixed
I've installed Python 2.7 and I've changed the first row of Proxy.cgi file with #! C:/Python27/python.exe -u Simone Simone Lella Istituto per il Rilevamento Elettromagnetico dell'Ambiente IREA - CNR (http://www.irea.cnr.it) Via Bassini, 15 Tel. +39 02-23699299 Milano Il 23/09/2010 11:13, Simone Lella ha scritto: Hi, I'm using MS4W with Windows 7. When I call http://localhost:8081/cgi-bin/proxy.cgi;, the response is: /Internal Server Error / /The server encountered an internal error or misconfiguration and was unable to complete your request./ /Please contact the server administrator, ad...@local.domain 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. / The error.log file contains: /[Thu Sep 23 09:49:43 2010] [warn] PassEnv variable PYTHONPATH was undefined [Thu Sep 23 09:49:43 2010] [notice] Apache/2.2.10 (Win32) configured -- resuming normal operations [Thu Sep 23 09:49:43 2010] [notice] Server built: Oct 10 2008 12:39:04 [Thu Sep 23 09:49:43 2010] [notice] Parent: Created child process 2932 [Thu Sep 23 09:49:43 2010] [warn] PassEnv variable PYTHONPATH was undefined [Thu Sep 23 09:49:44 2010] [warn] PassEnv variable PYTHONPATH was undefined [Thu Sep 23 09:49:44 2010] [notice] Child 2932: Child process is running [Thu Sep 23 09:49:44 2010] [notice] Child 2932: Acquired the start mutex. [Thu Sep 23 09:49:44 2010] [notice] Child 2932: Starting 64 worker threads. [Thu Sep 23 09:49:44 2010] [notice] Child 2932: Starting thread to listen on port 8081. [Thu Sep 23 09:50:13 2010] [error] [client 127.0.0.1] (OS 2)Impossibile trovare il file specificato. : couldn't create child process: 720002: proxy.cgi [Thu Sep 23 09:50:13 2010] [error] [client 127.0.0.1] (OS 2)Impossibile trovare il file specificato. : couldn't spawn child process: C:/ms4w/Apache/cgi-bin/proxy.cgi/ The proxy.cgi file was created in C:/ms4w/Apache/cgi-bin/proxy.cgi and I've copied into the following text: /#!/usr/bin/env python This is a blind proxy that we use to get around browser restrictions that prevent the Javascript from loading pages not on the same server as the Javascript. This has several problems: it's less efficient, it might break some sites, and it's a security risk because people can use this proxy to browse the web and possibly do bad stuff with it. It only loads pages via http and https, but it can load any content type. It supports GET and POST requests. import urllib2 import cgi import sys, os # Designed to prevent Open Proxy type stuff. allowedHosts = ['www.openlayers.org', 'openlayers.org', 'labs.metacarta.com', 'world.freemap.in', 'prototype.openmnnd.org', 'geo.openplans.org', 'sigma.openplans.org', 'demo.opengeo.org', 'www.openstreetmap.org', 'sample.azavea.com', 'v-swe.uni-muenster.de:8080', 'vmap0.tiles.osgeo.org','localhost:8081'] method = os.environ[REQUEST_METHOD] if method == POST: qs = os.environ[QUERY_STRING] d = cgi.parse_qs(qs) if d.has_key(url): url = d[url][0] else: url = http://www.openlayers.org; else: fs = cgi.FieldStorage() url = fs.getvalue('url', http://www.openlayers.org;) try: host = url.split(/)[2] if allowedHosts and not host in allowedHosts: print Status: 502 Bad Gateway print Content-Type: text/plain print print This proxy does not allow you to access that location (%s). % (host,) print print os.environ elif url.startswith(http://;) or url.startswith(https://;): if method == POST: length = int(os.environ[CONTENT_LENGTH]) headers = {Content-Type: os.environ[CONTENT_TYPE]} body = sys.stdin.read(length) r = urllib2.Request(url, body, headers) y = urllib2.urlopen(r) else: y = urllib2.urlopen(url) # print content type header i = y.info() if i.has_key(Content-Type): print Content-Type: %s % (i[Content-Type]) else: print Content-Type: text/plain print print y.read() y.close() else: print Content-Type: text/plain print print Illegal request. except Exception, E: print Status: 500 Unexpected Error print Content-Type: text/plain print print Some unexpected error occurred. Error text was:, E/ I've modified proxy.cgi file at allowedHosts by adding localhost:8081. I must modify the first row of proxy.cgi file? Can this issue related to the Windows 7 OS? Thanks Simone *_ _* -- Simone Lella Istituto per il Rilevamento Elettromagnetico dell'Ambiente IREA - CNR (http://www.irea.cnr.it) Via Bassini, 15 Tel. +39 02-23699299 Milano ___ mapserver-users
[mapserver-users] wfs filter request
Hi again! We are still having issues with using mapserver 5.6.5 as a wfs server together. When we submit a wfs getfeature filter request mapserver doesn't use the filter in the sql statement. It just searches all the objects in the database and applies the filter on the result. Thus, we are getting a timeout. Here is our filter request: Filter=FilterPropertyIsLike wildCard=% singleChar=? escape=ESCPropertyNameFS_FSZ/PropertyNameLiteral111/ Literal/PropertyIsLike/Filter As you can see the filter for the attribute FS_FSZ is set to 111. The debug log shows that this isn't used in the sql at all: Using this Sql to retrieve the data : SELECT fs_id, FS_GKNR, FS_FLNR, FS_FSZ, FS_FSN, FS_FSSTATUS, FS_ID, FS_FSRWERT_ABS, FS_FSHWERT_ABS, fs_koordinate FROM os_flst I expected to see a where clause like the following: where fs_fsz like 111 When we switch back to mapserver 5.0.0 we see the correct where clause in the debug log. So what are we doing wrong or is this a bug? Thanks for your help. Regards, Holger This is how our layer definition looks like: LAYER NAME test_flst METADATA wfs_extent 341 547 3666000 5726000 wfs_title test_flst gml_featureid fs_id gml_include_items all # optional END # of METADATA TYPE POINT STATUS ON CONNECTIONTYPE oraclespatial CONNECTION user/p...@service DATAfs_koordinate from os_flst USING UNIQUE fs_id NONE PROJECTION init=epsg:31467 END # of PROJECTION DUMP TRUE END # of LAYER ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Problems labelling using Halo option
Hi list, I'm developing a program that generates some images from a WMS with a dynamic generated SLD. The problem is that I'm telling MapServer to generate some labels with Halo, to make them easy to read, using the following code: NamedLayer Namevinedos/Name UserStyleName/NameTitle/TitleAbstract/Abstract FeatureTypeStyle Rule Filter And PropertyIsEqualToPropertyNameprovincia/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamemunicipio/PropertyNameLiteral43/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamepoligono/PropertyNameLiteral4/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNameparcela/PropertyNameLiteral880/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamerecinto/PropertyNameLiteral1/Literal/PropertyIsEqualTo /And /Filter PolygonSymbolizer Stroke CssParameter name=stroke#00/CssParameter CssParameter name=stroke-width2/CssParameter CssParameter name=stroke-dasharray5 5 5 5/CssParameter /Stroke /PolygonSymbolizer TextSymbolizer Label PropertyNamepoligono/PropertyName-PropertyNameparcela/PropertyName-PropertyNamerecinto/PropertyName /Label Font CssParameter name=font-familytimes/CssParameter CssParameter name=font-size18/CssParameter CssParameter name=font-weightbold/CssParameter /Font LabelPlacement PointPlacement AnchorPointAnchorPointX0.5/AnchorPointXAnchorPointY0.5/AnchorPointY /AnchorPoint /PointPlacement /LabelPlacement Halo Radius Literal2/Literal /Radius Fill CssParameter name=fill#FF/CssParameter CssParameter name=fill-opacity0.85/CssParameter /Fill /Halo Fill CssParameter name=fill#00/CssParameter CssParameter name=fill-opacity0.65/CssParameter /Fill /TextSymbolizer /Rule /FeatureTypeStyle /UserStyle /NamedLayer But when I receive the image the Halo is not applied (see attached file). My mapfile is as follows: NAME WMSSERVER STATUS ON EXTENT 46 471 61 482 # Euskadi SHAPEPATH extra/shapes/ FONTSET extra/fonts/fonts.txt SYMBOLSET extra/symbols/symbols.sym IMAGETYPE image/png; mode=24bit OUTPUTFORMAT NAME png DRIVER AGG/PNG MIMETYPE image/png IMAGEMODE RGBA EXTENSION png FORMATOPTION TRANSPARENT=ON FORMATOPTION INTERLACE=OFF END OUTPUTFORMAT NAME jpeg DRIVER GD/JPEG MIMETYPE image/jpeg IMAGEMODE RGB EXTENSION jpg END IMAGECOLOR 255 255 255 UNITS METERS DEBUG ON CONFIG MS_ERRORFILE C:/ms4w/Apache/htdocs/ogcservices/logs/wms_impresiones_lotes_log.log DEBUG 5 WEB IMAGEPATH C:/ms4w/Apache/htdocs/ogcservices/tmp/ IMAGEURL tmp/ METADATA wms_name IKT WMS Server wms_title Servidor WMS IKT - Impresiones Lotes wms_onlineresource http://192.168.1.161/cgi-bin/mapserv.exe?map=../htdocs/ogcservices/impresiones_lotes_wms.map; wms_srs EPSG:23030 EPSG:4326 wms_transparent true wms_abstract Servicio de mapas WMS de IKT Nekazal Teknologia. Powered by Apache and UMN MapServer. Servicio WMS para las impresiones por lotes. wms_keywordlist IKT,Euskadi,Mapas Euskadi wms_feature_info_mime_type application/vnd.ogc.gml labelcache_map_edge_buffer -10 END END PROJECTION init=epsg:23030 END LAYER STATUS ON CONNECTIONTYPE postgis CONNECTION user=postgres password= dbname=VITICOLA_IMPRESIONES host=192.168.1.161 port=5432 NAME vinedos PROJECTION init=epsg:23030 END DUMP TRUE TYPE POLYGON METADATA wms_title vinedos wms_srs EPSG:23030 wms_namevinedos wms_server_version 1.1.1 wms_format image/gif wms_transparent true wms_extent 47 470 61 482 gml_include_items all END #Sentencia SQL para obtener los datos DATA the_geom FROM vinedos using unique gid using SRID=23030 CLASS
Re: [mapserver-users] lighttpd, TNS:could not resolve...
yes. g...@mapserver:~$ ls -la /home/gis/conf/tnsnames.ora -rw-r--r-- 1 gis gis 184 2010-09-29 16:19 /home/gis/conf/tnsnames.ora g...@mapserver:~$ sudo su www-data -c 'cat /home/gis/conf/tnsnames.ora' MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) On Wed, Sep 29, 2010 at 7:58 PM, Dan Little danlit...@yahoo.com wrote: Is tnsnames.ora accessible by the web-server user? (Check the permissions.) Is t *From:* Sebastian E. Ovide sebastian.ov...@gmail.com *To:* mapserver-users@lists.osgeo.org *Sent:* Wed, September 29, 2010 11:10:09 AM *Subject:* [mapserver-users] lighttpd, TNS:could not resolve... Hi All, I have installed MapServer on lighttpd + fastcgi. fastcgi.server = ( /mapserver = ( localhost = ( socket = /tmp/mapserver-fastcgi.socket, bin-path = /home/gis/bin/mapserv, bin-environment = ( TNS_ADMIN = /home/gis/conf/ ), max-procs = 2, check-local = disable ) ) ) g...@mapserver:~$ cat /home/gis/conf/tnsnames.ora MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) and I'm getting: msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed from the logs: [Wed Sep 29 17:00:13 2010].649965 CGI Request 1 on process 1513 [Wed Sep 29 17:00:13 2010].717290 msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed [Wed Sep 29 17:00:13 2010].717319 msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. [Wed Sep 29 17:00:13 2010].717454 msFreeMap(): freeing map at 0xa00f298. [Wed Sep 29 17:00:13 2010].717579 freeLayer(): freeing layer at 0xa0237a0. [Wed Sep 29 17:00:13 2010].717591 freeLayer(): freeing layer at 0xa024718. in mapserver: LAYER NAME TESTII TYPE POLYGON STATUS ON CONNECTION OCI:GEO_US_DATA/geo_us_d...@mfuatdb CONNECTIONTYPE OGR DATA CA_WILDFIRE PROJECTION init=epsg:3857 END CLASS # NAME local_shape COLOR 0 0 255 OUTLINECOLOR 0 0 255 END END The connection string is right as I'm using it from gdal: g...@mapserver:~$ ogrinfo OCI:GEO_US_DATA/geo_us_d...@mfuatdb:CA_WILDFIRE INFO: Open of `OCI:GEO_US_DATA/geo_us_d...@mfuatdb:CA_WILDFIRE' using driver `OCI' successful. 1: CA_WILDFIRE any ideas ? -- Sebastian E. Ovide -- Sebastian E. Ovide ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] lighttpd, TNS:could not resolve...
Hi, For me, sometimes with some Oracle user name from some computers SQL*Plus does not understand if I am using the SERVICE_NAME. It you happen to have the same situation you should be able to connect with the connection name, which seems to be MFUATDB for you. Actually, the error message TNS:could not resolve the connect identifier specified may mean that you should not use service name but the connect identifier. Have a try and tell how it went. -Jukka Rahkonen- Lähettäjä: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Sebastian E. Ovide Lähetetty: 30. syyskuuta 2010 11:15 Vastaanottaja: Dan Little Kopio: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] lighttpd, TNS:could not resolve... yes. g...@mapserver:~$ ls -la /home/gis/conf/tnsnames.ora -rw-r--r-- 1 gis gis 184 2010-09-29 16:19 /home/gis/conf/tnsnames.ora g...@mapserver:~$ sudo su www-data -c 'cat /home/gis/conf/tnsnames.ora' MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) On Wed, Sep 29, 2010 at 7:58 PM, Dan Little danlit...@yahoo.com wrote: Is tnsnames.ora accessible by the web-server user? (Check the permissions.) Is t From: Sebastian E. Ovide sebastian.ov...@gmail.com To: mapserver-users@lists.osgeo.org Sent: Wed, September 29, 2010 11:10:09 AM Subject: [mapserver-users] lighttpd, TNS:could not resolve... Hi All, I have installed MapServer on lighttpd + fastcgi. fastcgi.server = ( /mapserver = ( localhost = ( socket = /tmp/mapserver-fastcgi.socket, bin-path = /home/gis/bin/mapserv, bin-environment = ( TNS_ADMIN = /home/gis/conf/ ), max-procs = 2, check-local = disable ) ) ) g...@mapserver:~$ cat /home/gis/conf/tnsnames.ora MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) and I'm getting: msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed from the logs: [Wed Sep 29 17:00:13 2010].649965 CGI Request 1 on process 1513 [Wed Sep 29 17:00:13 2010].717290 msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed [Wed Sep 29 17:00:13 2010].717319 msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. [Wed Sep 29 17:00:13 2010].717454 msFreeMap(): freeing map at 0xa00f298. [Wed Sep 29 17:00:13 2010].717579 freeLayer(): freeing layer at 0xa0237a0. [Wed Sep 29 17:00:13 2010].717591 freeLayer(): freeing layer at 0xa024718. in mapserver: LAYER NAME TESTII TYPE POLYGON STATUS ON CONNECTION OCI:GEO_US_DATA/geo_us_d...@mfuatdb CONNECTIONTYPE OGR DATA CA_WILDFIRE PROJECTION init=epsg:3857 END CLASS # NAME local_shape
Re: [mapserver-users] lighttpd, TNS:could not resolve...
no luck... renamed servicename to capital.. so now connection name==service name... same problem... ogrinfo works, mapserver doesn't On Thu, Sep 30, 2010 at 9:37 AM, Rahkonen Jukka jukka.rahko...@mmmtike.fiwrote: Hi, For me, sometimes with some Oracle user name from some computers SQL*Plus does not understand if I am using the SERVICE_NAME. It you happen to have the same situation you should be able to connect with the connection name, which seems to be MFUATDB for you. Actually, the error message TNS:could not resolve the connect identifier specified may mean that you should not use service name but the connect identifier. Have a try and tell how it went. -Jukka Rahkonen- -- *Lähettäjä:* mapserver-users-boun...@lists.osgeo.org [mailto: mapserver-users-boun...@lists.osgeo.org] *Puolesta *Sebastian E. Ovide *Lähetetty:* 30. syyskuuta 2010 11:15 *Vastaanottaja:* Dan Little *Kopio:* mapserver-users@lists.osgeo.org *Aihe:* Re: [mapserver-users] lighttpd, TNS:could not resolve... yes. g...@mapserver:~$ ls -la /home/gis/conf/tnsnames.ora -rw-r--r-- 1 gis gis 184 2010-09-29 16:19 /home/gis/conf/tnsnames.ora g...@mapserver:~$ sudo su www-data -c 'cat /home/gis/conf/tnsnames.ora' MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) On Wed, Sep 29, 2010 at 7:58 PM, Dan Little danlit...@yahoo.com wrote: Is tnsnames.ora accessible by the web-server user? (Check the permissions.) Is t *From:* Sebastian E. Ovide sebastian.ov...@gmail.com *To:* mapserver-users@lists.osgeo.org *Sent:* Wed, September 29, 2010 11:10:09 AM *Subject:* [mapserver-users] lighttpd, TNS:could not resolve... Hi All, I have installed MapServer on lighttpd + fastcgi. fastcgi.server = ( /mapserver = ( localhost = ( socket = /tmp/mapserver-fastcgi.socket, bin-path = /home/gis/bin/mapserv, bin-environment = ( TNS_ADMIN = /home/gis/conf/ ), max-procs = 2, check-local = disable ) ) ) g...@mapserver:~$ cat /home/gis/conf/tnsnames.ora MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) and I'm getting: msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed from the logs: [Wed Sep 29 17:00:13 2010].649965 CGI Request 1 on process 1513 [Wed Sep 29 17:00:13 2010].717290 msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed [Wed Sep 29 17:00:13 2010].717319 msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. [Wed Sep 29 17:00:13 2010].717454 msFreeMap(): freeing map at 0xa00f298. [Wed Sep 29 17:00:13 2010].717579 freeLayer(): freeing layer at 0xa0237a0. [Wed Sep 29 17:00:13 2010].717591 freeLayer(): freeing layer at 0xa024718. in mapserver: LAYER NAME TESTII TYPE POLYGON STATUS ON CONNECTION OCI:GEO_US_DATA/geo_us_d...@mfuatdb CONNECTIONTYPE OGR DATA CA_WILDFIRE PROJECTION init=epsg:3857 END CLASS # NAME local_shape COLOR 0 0 255 OUTLINECOLOR 0 0 255 END END The connection string is right as I'm using it from gdal: g...@mapserver:~$ ogrinfo OCI:GEO_US_DATA/geo_us_d...@mfuatdb:CA_WILDFIRE INFO: Open of `OCI:GEO_US_DATA/geo_us_d...@mfuatdb:CA_WILDFIRE' using driver `OCI' successful. 1: CA_WILDFIRE any ideas ? -- Sebastian E. Ovide -- Sebastian E. Ovide -- Sebastian E. Ovide ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] lighttpd, TNS:could not resolve...
Does shp2img work with your Mapfile? From: Sebastian E. Ovide sebastian.ov...@gmail.com To: Rahkonen Jukka jukka.rahko...@mmmtike.fi Cc: mapserver-users@lists.osgeo.org Sent: Thu, September 30, 2010 4:47:30 AM Subject: Re: [mapserver-users] lighttpd, TNS:could not resolve... the message says: ORA-12154: TNS:could not resolve the connect identifier specified in unnamed so... does unnamed mean that gdal didn't get any name for the connection ? On Thu, Sep 30, 2010 at 9:54 AM, Sebastian E. Ovide sebastian.ov...@gmail.com wrote: no luck... renamed servicename to capital.. so now connection name==service name... same problem... ogrinfo works, mapserver doesn't On Thu, Sep 30, 2010 at 9:37 AM, Rahkonen Jukka jukka.rahko...@mmmtike.fi wrote: Hi, For me, sometimes with some Oracle user name from some computers SQL*Plus does not understand if I am using the SERVICE_NAME. It you happen to have the same situation you should be able to connect with the connection name, which seems to be MFUATDB for you. Actually, the error message TNS:could not resolve the connect identifier specified may mean that you should not use service name but the connect identifier. Have a try and tell how it went. -Jukka Rahkonen- Lähettäjä: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Sebastian E.Ovide Lähetetty: 30. syyskuuta 2010 11:15 Vastaanottaja: Dan Little Kopio: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] lighttpd, TNS:could not resolve... yes. g...@mapserver:~$ ls -la /home/gis/conf/tnsnames.ora -rw-r--r-- 1 gis gis 184 2010-09-29 16:19/home/gis/conf/tnsnames.ora g...@mapserver:~$ sudo su www-data -c 'cat/home/gis/conf/tnsnames.ora' MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT= 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) On Wed, Sep 29, 2010 at 7:58 PM, Dan Little danlit...@yahoo.com wrote: Is tnsnames.ora accessible by the web-server user? (Check the permissions.) Ist From: Sebastian E. Ovide sebastian.ov...@gmail.com To: mapserver-users@lists.osgeo.org Sent: Wed, September 29, 201011:10:09 AM Subject: [mapserver-users] lighttpd, TNS:could not resolve... Hi All, I have installed MapServer on lighttpd + fastcgi. fastcgi.server = ( /mapserver = ( localhost = ( socket = /tmp/mapserver-fastcgi.socket, bin-path = /home/gis/bin/mapserv, bin-environment = ( TNS_ADMIN = /home/gis/conf/ ), max-procs = 2, check-local = disable ) ) ) g...@mapserver:~$ cat /home/gis/conf/tnsnames.ora MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) and I'm getting: msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed from the logs: [Wed Sep 29 17:00:13 2010].649965 CGI Request 1 on process 1513 [Wed Sep 29 17:00:13 2010].717290 msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifierspecified in unnamed [Wed Sep 29 17:00:13 2010].717319 msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. [Wed Sep 29 17:00:13 2010].717454 msFreeMap(): freeing map at 0xa00f298. [Wed Sep 29 17:00:13 2010].717579 freeLayer(): freeing layer at 0xa0237a0. [Wed Sep 29 17:00:13 2010].717591 freeLayer(): freeing layer at 0xa024718. in mapserver: LAYER NAME TESTII TYPE POLYGON STATUS ON CONNECTIONOCI:GEO_US_DATA/geo_us_d...@mfuatdb CONNECTIONTYPE OGR DATA CA_WILDFIRE PROJECTION init=epsg:3857 END CLASS # NAME local_shape COLOR 0 0 255 OUTLINECOLOR 0 0 255 END END The connection string is right as I'm using it from gdal: g...@mapserver:~$ ogrinfo OCI:GEO_US_DATA/geo_us_d...@mfuatdb:CA_WILDFIRE INFO: Open of `OCI:GEO_US_DATA/geo_us_d...@mfuatdb:CA_WILDFIRE' using driver `OCI' successful. 1: CA_WILDFIRE any ideas ? -- Sebastian E.Ovide -- Sebastian E. Ovide -- Sebastian E. Ovide -- Sebastian E. Ovide ___ mapserver-users mailing list mapserver-users@lists.osgeo.org
Re: [mapserver-users] Problems labelling using Halo option
Hi there, Is the sld xml you are using valid? Grabbing it from this e-mail, It seems to not validate (several PropertyName tags). It might just a copy paste but make sure of that. You can aslo set your map in debug mode ( DEBUG 5 for example) and check your logs to see if the xml was parsed properly and if that is the case you should also be able a tmp file of your map file after SLD was applied regards, On 30/09/2010 3:34 AM, David Alda Fernandez de Lezea wrote: Hi list, I'm developing a program that generates some images from a WMS with a dynamic generated SLD. The problem is that I'm telling MapServer to generate some labels with Halo, to make them easy to read, using the following code: NamedLayer Namevinedos/Name UserStyleName/NameTitle/TitleAbstract/Abstract FeatureTypeStyle Rule Filter And PropertyIsEqualToPropertyNameprovincia/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamemunicipio/PropertyNameLiteral43/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamepoligono/PropertyNameLiteral4/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNameparcela/PropertyNameLiteral880/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamerecinto/PropertyNameLiteral1/Literal/PropertyIsEqualTo /And /Filter PolygonSymbolizer Stroke CssParameter name=stroke#00/CssParameter CssParameter name=stroke-width2/CssParameter CssParameter name=stroke-dasharray5 5 5 5/CssParameter /Stroke /PolygonSymbolizer TextSymbolizer Label PropertyNamepoligono/PropertyName-PropertyNameparcela/PropertyName-PropertyNamerecinto/PropertyName /Label Font CssParameter name=font-familytimes/CssParameter CssParameter name=font-size18/CssParameter CssParameter name=font-weightbold/CssParameter /Font LabelPlacement PointPlacement AnchorPointAnchorPointX0.5/AnchorPointXAnchorPointY0.5/AnchorPointY /AnchorPoint /PointPlacement /LabelPlacement Halo Radius Literal2/Literal /Radius Fill CssParameter name=fill#FF/CssParameter CssParameter name=fill-opacity0.85/CssParameter /Fill /Halo Fill CssParameter name=fill#00/CssParameter CssParameter name=fill-opacity0.65/CssParameter /Fill /TextSymbolizer /Rule /FeatureTypeStyle /UserStyle /NamedLayer But when I receive the image the Halo is not applied (see attached file). My mapfile is as follows: NAME WMSSERVER STATUS ON EXTENT 46 471 61 482 # Euskadi SHAPEPATH extra/shapes/ FONTSET extra/fonts/fonts.txt SYMBOLSET extra/symbols/symbols.sym IMAGETYPE image/png; mode=24bit OUTPUTFORMAT NAME png DRIVER AGG/PNG MIMETYPE image/png IMAGEMODE RGBA EXTENSION png FORMATOPTION TRANSPARENT=ON FORMATOPTION INTERLACE=OFF END OUTPUTFORMAT NAME jpeg DRIVER GD/JPEG MIMETYPE image/jpeg IMAGEMODE RGB EXTENSION jpg END IMAGECOLOR 255 255 255 UNITS METERS DEBUG ON CONFIG MS_ERRORFILE C:/ms4w/Apache/htdocs/ogcservices/logs/wms_impresiones_lotes_log.log DEBUG 5 WEB IMAGEPATH C:/ms4w/Apache/htdocs/ogcservices/tmp/ IMAGEURL tmp/ METADATA wms_nameIKT WMS Server wms_title Servidor WMS IKT - Impresiones Lotes wms_onlineresource http://192.168.1.161/cgi-bin/mapserv.exe?map=../htdocs/ogcservices/impresiones_lotes_wms.map; wms_srs EPSG:23030 EPSG:4326 wms_transparent true wms_abstractServicio de mapas WMS de IKT Nekazal Teknologia. Powered by Apache and UMN MapServer. Servicio WMS para las impresiones por lotes. wms_keywordlist IKT,Euskadi,Mapas Euskadi wms_feature_info_mime_type application/vnd.ogc.gml labelcache_map_edge_buffer -10 END END PROJECTION init=epsg:23030 END LAYER STATUS ON CONNECTIONTYPE postgis CONNECTION user=postgres password= dbname=VITICOLA_IMPRESIONES host=192.168.1.161 port=5432 NAME vinedos PROJECTION init=epsg:23030 END DUMP TRUE TYPE POLYGON METADATA wms_title vinedos wms_srs EPSG:23030
RE: [mapserver-users] Problems labelling using Halo option
Assefa, Yes, it's valid. It works, but not with desired behaviour. It draws the polygons with the labels but without the Halo effect. I forgot to put xml headers in the previous email. ?xml version=1.0 encoding=UTF-8? StyledLayerDescriptor version=1.0.0 xsi:schemaLocation=http://www.opengis.net/sld StyledLayerDescriptor.xsd xmlns=http://www.opengis.net/sld; xmlns:ogc=http://www.opengis.net/ogc; xmlns:xlink=http://www.w3.org/1999/xlink; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; I also forgot to mention that if I put CssParameter name=font-familyVerdana/CssParameter for example, and Verdana does not exist in my fontset, it does the labelling properly (including Halo), but it's like if mapserver gets some default values, because the size has changed and even though I change it in th e SLD, the size keeps the same. WMS Log [Thu Sep 30 13:39:53 2010].513000 CGI Request 1 on process 256 [Thu Sep 30 13:39:53 2010].685000 msApplySLD(): Map file after SLD was applied C:/ms4w/Apache/htdocs/ogcservices/tmp/4ca47709_100_1._sld.map[Thu Sep 30 13:39:53 2010].826000 msDrawRasterLayerLow(orto0): entering. [Thu Sep 30 13:40:02 2010].216000 msDrawMap(): Layer 4 (orto0), 8.390s [Thu Sep 30 13:40:03 2010].606000 msDrawMap(): Layer 0 (vinedos_sigpac), 1.390s [Thu Sep 30 13:40:04 2010].122000 msDrawMap(): Layer 3 (vinedos_disolve_bn), 0.516s [Thu Sep 30 13:40:04 2010].513000 msDrawMap(): Layer 2 (vinedos_disolve), 0.391s [Thu Sep 30 13:40:05 2010].919000 msDrawMap(): Layer 1 (vinedos), 1.406s [Thu Sep 30 13:40:07 2010].106000 msDrawMap(): Layer 7 (vinedos_parcelas), 1.187s [Thu Sep 30 13:40:07 2010].106000 msDrawLabelCache(): labelcache_map_edge_buffer = -10 [Thu Sep 30 13:40:07 2010].106000 msDrawMap(): Drawing Label Cache, 0.000s [Thu Sep 30 13:40:07 2010].106000 msDrawMap() total time: 13.343s [Thu Sep 30 13:40:08 2010].606000 msSaveImage() total time: 1.500s [Thu Sep 30 13:40:08 2010].606000 mapserv request processing time (msLoadMap not incl.): 15.093s [Thu Sep 30 13:40:08 2010].637000 msFreeMap(): freeing map at 015C6820. Thanks. De: Yewondwossen Assefa [mailto:yass...@dmsolutions.ca] Enviado el: jueves, 30 de septiembre de 2010 13:24 Para: David Alda Fernandez de Lezea CC: mapserver-users@lists.osgeo.org Asunto: Re: [mapserver-users] Problems labelling using Halo option Hi there, Is the sld xml you are using valid? Grabbing it from this e-mail, It seems to not validate (several PropertyName tags). It might just a copy paste but make sure of that. You can aslo set your map in debug mode ( DEBUG 5 for example) and check your logs to see if the xml was parsed properly and if that is the case you should also be able a tmp file of your map file after SLD was applied regards, On 30/09/2010 3:34 AM, David Alda Fernandez de Lezea wrote: Hi list, I'm developing a program that generates some images from a WMS with a dynamic generated SLD. The problem is that I'm telling MapServer to generate some labels with Halo, to make them easy to read, using the following code: NamedLayer Namevinedos/Name UserStyleName/NameTitle/TitleAbstract/Abstract FeatureTypeStyle Rule Filter And PropertyIsEqualToPropertyNameprovincia/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamemunicipio/PropertyNameLiteral43/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamepoligono/PropertyNameLiteral4/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNameparcela/PropertyNameLiteral880/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamerecinto/PropertyNameLiteral1/Literal/PropertyIsEqualTo /And /Filter PolygonSymbolizer Stroke CssParameter name=stroke#00/CssParameter CssParameter name=stroke-width2/CssParameter CssParameter name=stroke-dasharray5 5 5 5/CssParameter /Stroke /PolygonSymbolizer TextSymbolizer Label PropertyNamepoligono/PropertyName-PropertyNameparcela/PropertyName-PropertyNamerecinto/PropertyName /Label Font CssParameter name=font-familytimes/CssParameter CssParameter name=font-size18/CssParameter CssParameter name=font-weightbold/CssParameter /Font LabelPlacement PointPlacement AnchorPointAnchorPointX0.5/AnchorPointXAnchorPointY0.5/AnchorPointY /AnchorPoint /PointPlacement /LabelPlacement Halo Radius Literal2/Literal /Radius Fill CssParameter name=fill#FF/CssParameter CssParameter name=fill-opacity0.85/CssParameter /Fill /Halo Fill CssParameter name=fill#00/CssParameter CssParameter name=fill-opacity0.65/CssParameter
RE: [mapserver-users] Expressions
I changed the format to and using another field ('GEO_TIME' - still numeric) param type=today offset=-14 name=LASTTWOWEEKS format=%2Y%2M%2D / Instead of: param type=today offset=-14 name=LASTTWOWEEKS format=%4Y%2M%2D / This worked EXPRESSION ([GEO_TIME] 100916)THIS DRAWS THE CORRECT 5 POINTS ONLY EXPRESSION ([GEO_TIME] 090110)THIS DRAWS ALL THE POINTS, WHICH IS CORRECT... all are than this date I then tried WITH NO SUCCESS EXPRESSION ([GEO_TIME] '%LASTTWOWEEKS%') nothing EXPRESSION ([GEO_TIME] %LASTTWOWEEKS%)nothing EXPRESSION ([GEO_TIME] LASTTWOWEEKS) nothing EXPRESSION ('[GEO_TIME]' '%LASTTWOWEEKS%')THIS DRAWS ALL THE POINTS EXPRESSION ('[GEO_TIME]' %LASTTWOWEEKS%) nothing EXPRESSION ('[GEO_TIME]' LASTTWOWEEKS)nothing The crazy thing is that I have this working on GEOMOOSE v1.6 on an XP 32 bit boxSAME CODE, SAME DATASET..SOMETHING WITH GEOMOOSE 2? With something like this EXPRESSION ('[GEO_SIMPLE]' = 'BURGLARY' AND '[GEO_TIME]' '%LASTWEEK%') -Original Message- From: Stephen Woodbridge [mailto:wood...@swoodbridge.com] Sent: Wednesday, September 29, 2010 12:51 PM To: Jay Kapalczynski Cc: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Expressions First lets get rid of the parameter substitution to make sure we have a syntax correct. So in your mapfile try: EXPRESSION ([IncidentDa] 20100816) I set this to Aug 16th to see if you can pull any records. Also because this is numeric, I removed the quotes. You can also try it with quotes to see what works. If this works then try: EXPRESSION ([IncidentDa] %LASTTWOWEEKS%) Again without the quotes or with depending on what worked. -Steve W On 9/29/2010 11:49 AM, Jay Kapalczynski wrote: I thank you for your responsegreatly appreciated as I cannot figure this out I know that I have 4 features in the dataset that have a value of 20100916 that's 13 days agoso with the expression below those 4 or 5 features should show upbut nothing shows up IncidentDa is the field (long integer) Param type is specifying MMDD my data has values of 20100916 (13 days) I have no idea what could be wrong...Thank you all for your help *.XML file* map-source name=Burglaries type=mapserver file./maple_grove_datasets/police/Burglaries.map/file param type=today offset=-90 name=LASTNINTY format=%4Y%2M%2D / param type=today offset=-30 name=LASTTHIRTY format=%4Y%2M%2D / * param type=today offset=-14 name=LASTTWOWEEKS format=%4Y%2M%2D /* * param type=today offset=-7 name=LASTWEEK format=%4Y%2M%2D /* param type=today offset=0 name=TODAY format=%4Y%2M%2D / layer name=Burglaries/ /map-source *.MAP file* CLASS NAME 'Last Weeks' EXPRESSION ('[IncidentDa]' '%LASTTWOWEEKS%' '[IncidentDa]' '%LASTWEEK%') STYLE COLOR 0 100 50 SYMBOL bike SIZE 12 END END === BUT if I simply place this in there I get all the points...so something is weird here because most of the dates are older than 7 days. CLASS NAME 'Last Weeks' EXPRESSION ('[IncidentDa]' '%LASTWEEK%') STYLE COLOR 0 0 0 SYMBOL tent SIZE 12 END #END -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge Sent: Wednesday, September 29, 2010 8:19 AM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Expressions In EXPRESSIONS you can evaluate any of the following: 1. Regular expressions treating the value as a string 2. numeric expressions using booleans like ==,,,=,= 3. string expressions like ==, !=, and I think strlen() So if you converted you dates into a format like MMDD then it would be easy to use a numeric expression like: EXPRESSION ('[dateValues]' '%STARTDATE%' '[dateValues]' '%ENDDATE%') or EXPRESSION ('[dateValues]' '%STARTDATE%') where STARTDATE is the MMDD value of two weeks ago and ENDDATE would be in the same format and allow you to extract record betwee any two start and end dates. Or you might be able to figure out a complex regular expression the represents the last two weeks like: EXPRESSION ('[dateValues]' =~ '/%LASTTWOWEEKS%/') I'm not sure what you would need for the regular expression. -Steve W On 9/28/2010 4:23 PM, Jay Kapalczynski wrote: Anyone have anymore ideas about this I have a string field with values And the code below. The expression does not seem to be running...if I only use LASTTWOWEEKS it still draws all the pointsand I know there are values in there from 2008 Thanks *From:*
Re: [mapserver-users] Problems labelling using Halo option
Hi, Check the file C:/ms4w/Apache/htdocs/ogcservices/tmp/4ca47709_100_1._sld.map and the layer where the sld is applied, the label object should have the outlinecolor set if it worked properly. Is that the case? I am not sure I understand the font issue, but you can also see what font was set fir that label object. regards, On 30/09/2010 7:43 AM, David Alda Fernandez de Lezea wrote: Assefa, Yes, it's valid. It works, but not with desired behaviour. It draws the polygons with the labels but without the Halo effect. I forgot to put xml headers in the previous email. ?xml version=1.0 encoding=UTF-8? StyledLayerDescriptor version=1.0.0 xsi:schemaLocation=http://www.opengis.net/sld StyledLayerDescriptor.xsd xmlns=http://www.opengis.net/sld; xmlns:ogc=http://www.opengis.net/ogc; xmlns:xlink=http://www.w3.org/1999/xlink; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; I also forgot to mention that if I putCssParameter name=font-familyVerdana/CssParameter for example, and Verdana does not exist in my fontset, it does the labelling properly (including Halo), but it's like if mapserver gets some default values, because the size has changed and even though I change it in th e SLD, the size keeps the same. WMS Log [Thu Sep 30 13:39:53 2010].513000 CGI Request 1 on process 256 [Thu Sep 30 13:39:53 2010].685000 msApplySLD(): Map file after SLD was applied C:/ms4w/Apache/htdocs/ogcservices/tmp/4ca47709_100_1._sld.map[Thu Sep 30 13:39:53 2010].826000 msDrawRasterLayerLow(orto0): entering. [Thu Sep 30 13:40:02 2010].216000 msDrawMap(): Layer 4 (orto0), 8.390s [Thu Sep 30 13:40:03 2010].606000 msDrawMap(): Layer 0 (vinedos_sigpac), 1.390s [Thu Sep 30 13:40:04 2010].122000 msDrawMap(): Layer 3 (vinedos_disolve_bn), 0.516s [Thu Sep 30 13:40:04 2010].513000 msDrawMap(): Layer 2 (vinedos_disolve), 0.391s [Thu Sep 30 13:40:05 2010].919000 msDrawMap(): Layer 1 (vinedos), 1.406s [Thu Sep 30 13:40:07 2010].106000 msDrawMap(): Layer 7 (vinedos_parcelas), 1.187s [Thu Sep 30 13:40:07 2010].106000 msDrawLabelCache(): labelcache_map_edge_buffer = -10 [Thu Sep 30 13:40:07 2010].106000 msDrawMap(): Drawing Label Cache, 0.000s [Thu Sep 30 13:40:07 2010].106000 msDrawMap() total time: 13.343s [Thu Sep 30 13:40:08 2010].606000 msSaveImage() total time: 1.500s [Thu Sep 30 13:40:08 2010].606000 mapserv request processing time (msLoadMap not incl.): 15.093s [Thu Sep 30 13:40:08 2010].637000 msFreeMap(): freeing map at 015C6820. Thanks. De: Yewondwossen Assefa [mailto:yass...@dmsolutions.ca] Enviado el: jueves, 30 de septiembre de 2010 13:24 Para: David Alda Fernandez de Lezea CC: mapserver-users@lists.osgeo.org Asunto: Re: [mapserver-users] Problems labelling using Halo option Hi there, Is the sld xml you are using valid? Grabbing it from this e-mail, It seems to not validate (severalPropertyName tags). It might just a copy paste but make sure of that. You can aslo set your map in debug mode ( DEBUG 5 for example) and check your logs to see if the xml was parsed properly and if that is the case you should also be able a tmp file of your map file after SLD was applied regards, On 30/09/2010 3:34 AM, David Alda Fernandez de Lezea wrote: Hi list, I'm developing a program that generates some images from a WMS with a dynamic generated SLD. The problem is that I'm telling MapServer to generate some labels with Halo, to make them easy to read, using the following code: NamedLayer Namevinedos/Name UserStyleName/NameTitle/TitleAbstract/Abstract FeatureTypeStyle Rule Filter And PropertyIsEqualToPropertyNameprovincia/PropertyNameLiteral1/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamemunicipio/PropertyNameLiteral43/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamepoligono/PropertyNameLiteral4/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNameparcela/PropertyNameLiteral880/Literal/PropertyIsEqualTo PropertyIsEqualToPropertyNamerecinto/PropertyNameLiteral1/Literal/PropertyIsEqualTo /And /Filter PolygonSymbolizer Stroke CssParameter name=stroke#00/CssParameter CssParameter name=stroke-width2/CssParameter CssParameter name=stroke-dasharray5 5 5 5/CssParameter /Stroke /PolygonSymbolizer TextSymbolizer Label PropertyNamepoligono/PropertyName-PropertyNameparcela/PropertyName-PropertyNamerecinto/PropertyName /Label Font CssParameter name=font-familytimes/CssParameter CssParameter name=font-size18/CssParameter CssParameter name=font-weightbold/CssParameter /Font LabelPlacement PointPlacement AnchorPointAnchorPointX0.5/AnchorPointXAnchorPointY0.5/AnchorPointY
[mapserver-users] How to get some part extents in polygon within complete polygon
Dear All, How can I get certain part boundary extents from polygon.I am using below code to get full extents of the polygon. Code to get bounds extents :- shapeObj shape = layer.getFeature(shapeInd, -1); lab.Text = Min X : + shape.bounds.minx +,+Max X : + shape.bounds.maxx +, + Min Y : + shape.bounds.maxy +,+ Max Y : + shape.bounds.maxy; Please anyone can guide me.I am waiting for your great response. Thanks and Regards, Ven ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] lighttpd, TNS:could not resolve...
on the same machine, with the same data and same tns file it works fine with APACHE the problems is only with LIGHTTPD... it looks like TNS_ADMIN = /home/gis/conf/ is ignored (in apache I've used SetEnv and PassEnv ??? On Thu, Sep 30, 2010 at 12:22 PM, Dan Little danlit...@yahoo.com wrote: Does shp2img work with your Mapfile? *From:* Sebastian E. Ovide sebastian.ov...@gmail.com *To:* Rahkonen Jukka jukka.rahko...@mmmtike.fi *Cc:* mapserver-users@lists.osgeo.org *Sent:* Thu, September 30, 2010 4:47:30 AM *Subject:* Re: [mapserver-users] lighttpd, TNS:could not resolve... the message says: ORA-12154: TNS:could not resolve the connect identifier specified in unnamed so... does unnamed mean that gdal didn't get any name for the connection ? On Thu, Sep 30, 2010 at 9:54 AM, Sebastian E. Ovide sebastian.ov...@gmail.com wrote: no luck... renamed servicename to capital.. so now connection name==service name... same problem... ogrinfo works, mapserver doesn't On Thu, Sep 30, 2010 at 9:37 AM, Rahkonen Jukka jukka.rahko...@mmmtike.fi wrote: Hi, For me, sometimes with some Oracle user name from some computers SQL*Plus does not understand if I am using the SERVICE_NAME. It you happen to have the same situation you should be able to connect with the connection name, which seems to be MFUATDB for you. Actually, the error message TNS:could not resolve the connect identifier specified may mean that you should not use service name but the connect identifier. Have a try and tell how it went. -Jukka Rahkonen- -- *Lähettäjä:* mapserver-users-boun...@lists.osgeo.org [mailto: mapserver-users-boun...@lists.osgeo.org] *Puolesta *Sebastian E. Ovide *Lähetetty:* 30. syyskuuta 2010 11:15 *Vastaanottaja:* Dan Little *Kopio:* mapserver-users@lists.osgeo.org *Aihe:* Re: [mapserver-users] lighttpd, TNS:could not resolve... yes. g...@mapserver:~$ ls -la /home/gis/conf/tnsnames.ora -rw-r--r-- 1 gis gis 184 2010-09-29 16:19 /home/gis/conf/tnsnames.ora g...@mapserver:~$ sudo su www-data -c 'cat /home/gis/conf/tnsnames.ora' MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) On Wed, Sep 29, 2010 at 7:58 PM, Dan Little danlit...@yahoo.com wrote: Is tnsnames.ora accessible by the web-server user? (Check the permissions.) Is t *From:* Sebastian E. Ovide sebastian.ov...@gmail.com *To:* mapserver-users@lists.osgeo.org *Sent:* Wed, September 29, 2010 11:10:09 AM *Subject:* [mapserver-users] lighttpd, TNS:could not resolve... Hi All, I have installed MapServer on lighttpd + fastcgi. fastcgi.server = ( /mapserver = ( localhost = ( socket = /tmp/mapserver-fastcgi.socket, bin-path = /home/gis/bin/mapserv, bin-environment = ( TNS_ADMIN = /home/gis/conf/ ), max-procs = 2, check-local = disable ) ) ) g...@mapserver:~$ cat /home/gis/conf/tnsnames.ora MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) and I'm getting: msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed from the logs: [Wed Sep 29 17:00:13 2010].649965 CGI Request 1 on process 1513 [Wed Sep 29 17:00:13 2010].717290 msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed [Wed Sep 29 17:00:13 2010].717319 msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. [Wed Sep 29 17:00:13 2010].717454 msFreeMap(): freeing map at 0xa00f298. [Wed Sep 29 17:00:13 2010].717579 freeLayer(): freeing layer at 0xa0237a0. [Wed Sep 29 17:00:13 2010].717591 freeLayer(): freeing layer at 0xa024718. in mapserver: LAYER NAME TESTII TYPE POLYGON STATUS ON CONNECTION OCI:GEO_US_DATA/geo_us_d...@mfuatdb CONNECTIONTYPE OGR DATA CA_WILDFIRE PROJECTION init=epsg:3857 END CLASS # NAME local_shape COLOR 0 0 255 OUTLINECOLOR 0 0 255 END END The connection string is right as I'm using it from gdal: g...@mapserver:~$ ogrinfo OCI:GEO_US_DATA/geo_us_d...@mfuatdb :CA_WILDFIRE INFO: Open of `OCI:GEO_US_DATA/geo_us_d...@mfuatdb:CA_WILDFIRE' using driver `OCI' successful. 1: CA_WILDFIRE any ideas ? -- Sebastian E. Ovide -- Sebastian E.
Re: [mapserver-users] lighttpd, TNS:could not resolve...
I was starting to suspect MapServer is just no seeing the environment variables... Try this... write a wrapper script mapserv.sh #!/bin/bash TNS_ADMIN=/home/gis/conf /home/gis/bin/mapserv Then update your script to point to mapserv.sh. From: Sebastian E. Ovide sebastian.ov...@gmail.com To: Dan Little danlit...@yahoo.com Cc: Rahkonen Jukka jukka.rahko...@mmmtike.fi; mapserver-users@lists.osgeo.org Sent: Thu, September 30, 2010 8:01:22 AM Subject: Re: [mapserver-users] lighttpd, TNS:could not resolve... on the same machine, with the same data and same tns file it works fine with APACHE the problems is only with LIGHTTPD... it looks like TNS_ADMIN = /home/gis/conf/ is ignored (in apache I've used SetEnv and PassEnv ??? On Thu, Sep 30, 2010 at 12:22 PM, Dan Little danlit...@yahoo.com wrote: Does shp2img work with your Mapfile? From: Sebastian E. Ovide sebastian.ov...@gmail.com To: Rahkonen Jukka jukka.rahko...@mmmtike.fi Cc: mapserver-users@lists.osgeo.org Sent: Thu, September 30, 2010 4:47:30 AM Subject: Re: [mapserver-users] lighttpd, TNS:could not resolve... the message says: ORA-12154: TNS:could not resolve the connect identifier specified in unnamed so... does unnamed mean that gdal didn't get any name for the connection ? On Thu, Sep 30, 2010 at 9:54 AM, Sebastian E. Ovide sebastian.ov...@gmail.com wrote: no luck... renamed servicename to capital.. so now connection name==service name... same problem... ogrinfo works, mapserver doesn't On Thu, Sep 30, 2010 at 9:37 AM, Rahkonen Jukka jukka.rahko...@mmmtike.fi wrote: Hi, For me, sometimes with some Oracle user name from some computers SQL*Plus does not understand if I am using the SERVICE_NAME. It you happen to have the same situation you should be able to connect with the connection name, which seems to be MFUATDB for you. Actually, the error message TNS:could not resolve the connect identifier specified may mean that you should not use service name but the connect identifier. Have a try and tell how it went. -Jukka Rahkonen- Lähettäjä: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Sebastian E.Ovide Lähetetty: 30. syyskuuta 2010 11:15 Vastaanottaja: Dan Little Kopio: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] lighttpd, TNS:could not resolve... yes. g...@mapserver:~$ ls -la /home/gis/conf/tnsnames.ora -rw-r--r-- 1 gis gis 184 2010-09-29 16:19/home/gis/conf/tnsnames.ora g...@mapserver:~$ sudo su www-data -c 'cat/home/gis/conf/tnsnames.ora' MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT= 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) On Wed, Sep 29, 2010 at 7:58 PM, Dan Little danlit...@yahoo.com wrote: Is tnsnames.ora accessible by the web-server user? (Check the permissions.) Ist From: Sebastian E. Ovide sebastian.ov...@gmail.com To: mapserver-users@lists.osgeo.org Sent: Wed, September 29, 201011:10:09 AM Subject: [mapserver-users] lighttpd, TNS:could not resolve... Hi All, I have installed MapServer on lighttpd + fastcgi. fastcgi.server = ( /mapserver = ( localhost = ( socket = /tmp/mapserver-fastcgi.socket, bin-path = /home/gis/bin/mapserv, bin-environment = ( TNS_ADMIN = /home/gis/conf/ ), max-procs = 2, check-local = disable ) ) ) g...@mapserver:~$ cat /home/gis/conf/tnsnames.ora MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) and I'm getting: msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed from the logs: [Wed Sep 29 17:00:13 2010].649965 CGI Request 1 on process 1513 [Wed Sep 29 17:00:13 2010].717290 msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifierspecified in unnamed [Wed Sep 29 17:00:13 2010].717319 msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. [Wed Sep 29 17:00:13 2010].717454 msFreeMap(): freeing map at 0xa00f298. [Wed Sep 29 17:00:13 2010].717579 freeLayer(): freeing layer at 0xa0237a0. [Wed Sep 29 17:00:13 2010].717591 freeLayer(): freeing layer at 0xa024718. in mapserver:
Re: [mapserver-users] lighttpd, TNS:could not resolve...
updates. even if it works with APACHE + CGI, it does NOT work with APACHE+FASTCGI (AppClass /home/gis/bin/mapserv -initial-env TNS_ADMIN=/home/gis/conf/) On Thu, Sep 30, 2010 at 2:01 PM, Sebastian E. Ovide sebastian.ov...@gmail.com wrote: on the same machine, with the same data and same tns file it works fine with APACHE the problems is only with LIGHTTPD... it looks like TNS_ADMIN = /home/gis/conf/ is ignored (in apache I've used SetEnv and PassEnv ??? On Thu, Sep 30, 2010 at 12:22 PM, Dan Little danlit...@yahoo.com wrote: Does shp2img work with your Mapfile? *From:* Sebastian E. Ovide sebastian.ov...@gmail.com *To:* Rahkonen Jukka jukka.rahko...@mmmtike.fi *Cc:* mapserver-users@lists.osgeo.org *Sent:* Thu, September 30, 2010 4:47:30 AM *Subject:* Re: [mapserver-users] lighttpd, TNS:could not resolve... the message says: ORA-12154: TNS:could not resolve the connect identifier specified in unnamed so... does unnamed mean that gdal didn't get any name for the connection ? On Thu, Sep 30, 2010 at 9:54 AM, Sebastian E. Ovide sebastian.ov...@gmail.com wrote: no luck... renamed servicename to capital.. so now connection name==service name... same problem... ogrinfo works, mapserver doesn't On Thu, Sep 30, 2010 at 9:37 AM, Rahkonen Jukka jukka.rahko...@mmmtike.fi wrote: Hi, For me, sometimes with some Oracle user name from some computers SQL*Plus does not understand if I am using the SERVICE_NAME. It you happen to have the same situation you should be able to connect with the connection name, which seems to be MFUATDB for you. Actually, the error message TNS:could not resolve the connect identifier specified may mean that you should not use service name but the connect identifier. Have a try and tell how it went. -Jukka Rahkonen- -- *Lähettäjä:* mapserver-users-boun...@lists.osgeo.org [mailto: mapserver-users-boun...@lists.osgeo.org] *Puolesta *Sebastian E. Ovide *Lähetetty:* 30. syyskuuta 2010 11:15 *Vastaanottaja:* Dan Little *Kopio:* mapserver-users@lists.osgeo.org *Aihe:* Re: [mapserver-users] lighttpd, TNS:could not resolve... yes. g...@mapserver:~$ ls -la /home/gis/conf/tnsnames.ora -rw-r--r-- 1 gis gis 184 2010-09-29 16:19 /home/gis/conf/tnsnames.ora g...@mapserver:~$ sudo su www-data -c 'cat /home/gis/conf/tnsnames.ora' MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) On Wed, Sep 29, 2010 at 7:58 PM, Dan Little danlit...@yahoo.comwrote: Is tnsnames.ora accessible by the web-server user? (Check the permissions.) Is t *From:* Sebastian E. Ovide sebastian.ov...@gmail.com *To:* mapserver-users@lists.osgeo.org *Sent:* Wed, September 29, 2010 11:10:09 AM *Subject:* [mapserver-users] lighttpd, TNS:could not resolve... Hi All, I have installed MapServer on lighttpd + fastcgi. fastcgi.server = ( /mapserver = ( localhost = ( socket = /tmp/mapserver-fastcgi.socket, bin-path = /home/gis/bin/mapserv, bin-environment = ( TNS_ADMIN = /home/gis/conf/ ), max-procs = 2, check-local = disable ) ) ) g...@mapserver:~$ cat /home/gis/conf/tnsnames.ora MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) and I'm getting: msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed from the logs: [Wed Sep 29 17:00:13 2010].649965 CGI Request 1 on process 1513 [Wed Sep 29 17:00:13 2010].717290 msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed [Wed Sep 29 17:00:13 2010].717319 msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. [Wed Sep 29 17:00:13 2010].717454 msFreeMap(): freeing map at 0xa00f298. [Wed Sep 29 17:00:13 2010].717579 freeLayer(): freeing layer at 0xa0237a0. [Wed Sep 29 17:00:13 2010].717591 freeLayer(): freeing layer at 0xa024718. in mapserver: LAYER NAME TESTII TYPE POLYGON STATUS ON CONNECTION OCI:GEO_US_DATA/geo_us_d...@mfuatdb CONNECTIONTYPE OGR DATA CA_WILDFIRE PROJECTION init=epsg:3857 END CLASS # NAME local_shape COLOR 0 0 255 OUTLINECOLOR 0 0 255 END END The connection string is right as I'm using it from gdal:
Re: [mapserver-users] wfs filter request
Hi There, I have loged this in http://trac.osgeo.org/mapserver/ticket/3557. Fix is committed for the 5.6 branch. Please give it a try and update the bug. regards, On 30/09/2010 3:43 AM, Holger Porath wrote: Hi again! We are still having issues with using mapserver 5.6.5 as a wfs server together. When we submit a wfs getfeature filter request mapserver doesn't use the filter in the sql statement. It just searches all the objects in the database and applies the filter on the result. Thus, we are getting a timeout. Here is our filter request: Filter=FilterPropertyIsLike wildCard=% singleChar=? escape=ESCPropertyNameFS_FSZ/PropertyNameLiteral111/Literal/PropertyIsLike/Filter As you can see the filter for the attribute FS_FSZ is set to 111. The debug log shows that this isn't used in the sql at all: Using this Sql to retrieve the data : SELECT fs_id, FS_GKNR, FS_FLNR, FS_FSZ, FS_FSN, FS_FSSTATUS, FS_ID, FS_FSRWERT_ABS, FS_FSHWERT_ABS, fs_koordinate FROM os_flst I expected to see a where clause like the following: where fs_fsz like 111 When we switch back to mapserver 5.0.0 we see the correct where clause in the debug log. So what are we doing wrong or is this a bug? Thanks for your help. Regards, Holger This is how our layer definition looks like: LAYER NAME test_flst METADATA wfs_extent 341 547 3666000 5726000 wfs_title test_flst gml_featureid fs_id gml_include_items all # optional END # of METADATA TYPE POINT STATUS ON CONNECTIONTYPE oraclespatial CONNECTION user/p...@service DATA fs_koordinate from os_flst USING UNIQUE fs_id NONE PROJECTION init=epsg:31467 END # of PROJECTION DUMP TRUE END # of LAYER ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Assefa Yewondwossen Software Analyst Email: yass...@dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] lighttpd, TNS:could not resolve...
done. (restarted server etc...) exactly the same problem... On Thu, Sep 30, 2010 at 2:51 PM, Dan Little danlit...@yahoo.com wrote: I was starting to suspect MapServer is just no seeing the environment variables... Try this... write a wrapper script mapserv.sh #!/bin/bash TNS_ADMIN=/home/gis/conf /home/gis/bin/mapserv Then update your script to point to mapserv.sh. *From:* Sebastian E. Ovide sebastian.ov...@gmail.com *To:* Dan Little danlit...@yahoo.com *Cc:* Rahkonen Jukka jukka.rahko...@mmmtike.fi; mapserver-users@lists.osgeo.org *Sent:* Thu, September 30, 2010 8:01:22 AM *Subject:* Re: [mapserver-users] lighttpd, TNS:could not resolve... on the same machine, with the same data and same tns file it works fine with APACHE the problems is only with LIGHTTPD... it looks like TNS_ADMIN = /home/gis/conf/ is ignored (in apache I've used SetEnv and PassEnv ??? On Thu, Sep 30, 2010 at 12:22 PM, Dan Little danlit...@yahoo.com wrote: Does shp2img work with your Mapfile? *From:* Sebastian E. Ovide sebastian.ov...@gmail.com *To:* Rahkonen Jukka jukka.rahko...@mmmtike.fi *Cc:* mapserver-users@lists.osgeo.org *Sent:* Thu, September 30, 2010 4:47:30 AM *Subject:* Re: [mapserver-users] lighttpd, TNS:could not resolve... the message says: ORA-12154: TNS:could not resolve the connect identifier specified in unnamed so... does unnamed mean that gdal didn't get any name for the connection ? On Thu, Sep 30, 2010 at 9:54 AM, Sebastian E. Ovide sebastian.ov...@gmail.com wrote: no luck... renamed servicename to capital.. so now connection name==service name... same problem... ogrinfo works, mapserver doesn't On Thu, Sep 30, 2010 at 9:37 AM, Rahkonen Jukka jukka.rahko...@mmmtike.fi wrote: Hi, For me, sometimes with some Oracle user name from some computers SQL*Plus does not understand if I am using the SERVICE_NAME. It you happen to have the same situation you should be able to connect with the connection name, which seems to be MFUATDB for you. Actually, the error message TNS:could not resolve the connect identifier specified may mean that you should not use service name but the connect identifier. Have a try and tell how it went. -Jukka Rahkonen- -- *Lähettäjä:* mapserver-users-boun...@lists.osgeo.org [mailto: mapserver-users-boun...@lists.osgeo.org] *Puolesta *Sebastian E. Ovide *Lähetetty:* 30. syyskuuta 2010 11:15 *Vastaanottaja:* Dan Little *Kopio:* mapserver-users@lists.osgeo.org *Aihe:* Re: [mapserver-users] lighttpd, TNS:could not resolve... yes. g...@mapserver:~$ ls -la /home/gis/conf/tnsnames.ora -rw-r--r-- 1 gis gis 184 2010-09-29 16:19 /home/gis/conf/tnsnames.ora g...@mapserver:~$ sudo su www-data -c 'cat /home/gis/conf/tnsnames.ora' MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) On Wed, Sep 29, 2010 at 7:58 PM, Dan Little danlit...@yahoo.comwrote: Is tnsnames.ora accessible by the web-server user? (Check the permissions.) Is t *From:* Sebastian E. Ovide sebastian.ov...@gmail.com *To:* mapserver-users@lists.osgeo.org *Sent:* Wed, September 29, 2010 11:10:09 AM *Subject:* [mapserver-users] lighttpd, TNS:could not resolve... Hi All, I have installed MapServer on lighttpd + fastcgi. fastcgi.server = ( /mapserver = ( localhost = ( socket = /tmp/mapserver-fastcgi.socket, bin-path = /home/gis/bin/mapserv, bin-environment = ( TNS_ADMIN = /home/gis/conf/ ), max-procs = 2, check-local = disable ) ) ) g...@mapserver:~$ cat /home/gis/conf/tnsnames.ora MFUATDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.60.70)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mfuatdb) ) ) and I'm getting: msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed from the logs: [Wed Sep 29 17:00:13 2010].649965 CGI Request 1 on process 1513 [Wed Sep 29 17:00:13 2010].717290 msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `TESTII'. ORA-12154: TNS:could not resolve the connect identifier specified in unnamed [Wed Sep 29 17:00:13 2010].717319 msDrawMap(): Image handling error. Failed to draw layer named 'TESTII'. [Wed Sep 29 17:00:13 2010].717454 msFreeMap(): freeing map at 0xa00f298. [Wed Sep 29 17:00:13 2010].717579 freeLayer(): freeing layer at 0xa0237a0. [Wed Sep 29 17:00:13 2010].717591
[mapserver-users] substitute DATA parameter via URL?
Dear list members, I would like to change the following DATA parameter via URL DATA the_geom from (SELECT the_geom, oid, acar as qf FROM geotable) as foo USING UNIQUE oid USING SRID=4326 ..where acar is the variable (a table field name) that should change on request. How would the DATAPATTERN look like? I have tried without success: DATAPATTERN ^the_geom from (SELECT the_geom, oid, [a-z]{4} as qf FROM geotable) as foo USING UNIQUE oid USING SRID=4326 ..which throws a parsing error near (DATAPATTERN) And I suppose the corresponding extension to the base URL would look like this? ..map.layer[myLayer].data=the_geom from (SELECT the_geom, oid, emci as qf FROM geotable) as foo USING UNIQUE oid USING SRID=4326 ..worked fine on MapServer 4.6 (before validation war requiered) I wonder if it was easier to retrieve the entire table and substitute the field name. But I have 6 classes with expressions like this: EXPRESSION ([qf] 20 AND [qf]= 40) ..which would make the URL-extension even longer. Anyway, I haven’t figured out how to set up the corresponding validation string of the either the classitem or the logical expression or both. I’m (still) working with MapServer v. 5.2.1 Any examples for DATAPATTERN would be highly appreciated. Best regards ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] substitute DATA parameter via URL?
Hi, I believe that with your Mapserver version you can do it by having DATA the_geom from (SELECT the_geom, oid, %acar% as qf FROM geotable) as foo USING UNIQUE oid USING SRID=4326 and then making the requests with an extra acar parameter acar=the_column_you_want A live example http://188.64.1.61/cgi-bin/mapserv?map=/usr/map/osm-mapserver_i.mapREQUEST=GetMapSERVICE=WMSVERSION=1.1.1WIDTH=1059HEIGHT=687LAYERS=sea,borders,POI_free_queryTRANSPARENT=TRUEFORMAT=image%2FpngBBOX=-574187,6558020,1615375,7978444SRS=EPSG:3067STYLES=tag=shopvalue=convenience Change the request to contain value=supermarket or value=hardware and you will see slightly different maps. The DATA behind this is DATA way from (select (way),osm_id,tags from osm_point where (tags @'%tag%=%value%')) as foo using unique osm_id using srid=3067 I have never really understood how the DATAPATTERN should be used and I have not found any examples from the documents yet. -Jukka Rahkonen- Stefanie Weykam wrote: [mapserver-users] substitute DATA parameter via URL? Dear list members, I would like to change the following DATA parameter via URL DATA the_geom from (SELECT the_geom, oid, acar as qf FROM geotable) as foo USING UNIQUE oid USING SRID=4326 ..where acar is the variable (a table field name) that should change on request. How would the DATAPATTERN look like? I have tried without success: DATAPATTERN ^the_geom from (SELECT the_geom, oid, [a-z]{4} as qf FROM geotable) as foo USING UNIQUE oid USING SRID=4326 ..which throws a parsing error near (DATAPATTERN) And I suppose the corresponding extension to the base URL would look like this? ..map.layer[myLayer].data=the_geom from (SELECT the_geom, oid, emci as qf FROM geotable) as foo USING UNIQUE oid USING SRID=4326 ..worked fine on MapServer 4.6 (before validation war requiered) I wonder if it was easier to retrieve the entire table and substitute the field name. But I have 6 classes with expressions like this: EXPRESSION ([qf] 20 AND [qf]= 40) ..which would make the URL-extension even longer. Anyway, I haven't figured out how to set up the corresponding validation string of the either the classitem or the logical expression or both. I'm (still) working with MapServer v. 5.2.1 Any examples for DATAPATTERN would be highly appreciated. Best regards ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users