RE: [mapserver-users] Re: Coments about the Tickedt 3541
Alan, We've tried to test the situation using OGR connection, but unfotunately, we can't make it work. I mean, I configure the layer with OGR support: MAP NAME WMSSERVER STATUS ON EXTENT 46 469 61 482 # Euskadi SYMBOLSET ../misc/symbols/symbols.sym SHAPEPATH ../shapes/ FONTSET ../misc/fonts/fonts.txt UNITS METERS DEBUG ON CONFIG MS_ERRORFILE C:/ms4w/Apache/htdocs/ogcservices/wms/log/ms_wms_enterprise.log DEBUG 5 OUTPUTFORMAT NAME png DRIVER AGG/PNG MIMETYPE image/png IMAGEMODE RGBA EXTENSION png FORMATOPTION TRANSPARENT=ON FORMATOPTION INTERLACE=OFF END OUTPUTFORMAT NAME png24bit DRIVER AGG/PNG MIMETYPE image/png; mode=24bit IMAGEMODE RGBA EXTENSION png FORMATOPTION TRANSPARENT=ON FORMATOPTION INTERLACE=OFF END OUTPUTFORMAT NAME gif DRIVER GD/GIF MIMETYPE image/gif IMAGEMODE PC256 EXTENSION gif END OUTPUTFORMAT NAME jpeg DRIVER GD/JPEG MIMETYPE image/jpeg IMAGEMODE RGBA EXTENSION jpg FORMATOPTION TRANSPARENT=ON FORMATOPTION INTERLACE=OFF END WEB IMAGEPATH C:/ms4w/Apache/htdocs/ogcservices/tmp/ IMAGEURL tmp/ METADATA wms_name IKT WMS Server wms_server_version 1.1.1 wms_titleServidor WMS IKT wms_onlineresource http://192.168.1.38/cgi-bin/mapserv.exe?map=../htdocs/ogcservices/wms/w ms_enterprise.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 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 CONNECTION OCI:user/p...@db CONNECTIONTYPE OGR DATA GT_MUNICIPIOS_PRUEBA NAME municipios_ogr PROJECTION init=epsg:23030 END DUMP TRUE TYPE POLYGON METADATA wms_title Municipios wms_srs EPSG:23030 wms_namemunicipios_ogr wms_server_version 1.1.1 wms_format image/png wms_transparent true wms_extent46 469 61 482 gml_include_items all wms_include_items all END TEMPLATE ms_template.html CLASS GROUP Predeterminado NAME municipios STYLE OUTLINECOLOR 255 0 0 END END END END And the returned data for a GetFeatureInfo Request is: ?xml version=1.0 encoding=ISO-8859-1? msGMLOutput xmlns:gml=http://www.opengis.net/gml; xmlns:xlink=http://www.w3.org/1999/xlink; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; /msGMLOutput And in wms.log I get the following message: [Wed Sep 29 08:42:35 2010].512000 msQueryByPoint(): Search returned no results. No matching record(s) found. [Wed Sep 29 08:42:35 2010].512000 mapserv request processing time (msLoadMap not incl.): 0.235s [Wed Sep 29 08:42:35 2010].512000 msFreeMap(): freeing map at 0199BB40. Maybe I'm configuring something wrong?? De: Alan Boudreault [mailto:aboudrea...@mapgears.com] Enviado el: martes, 28 de septiembre de 2010 15:30 Para: Jorge Bellido Diez CC: mapserver-users@lists.osgeo.org; Sumit Sharma Asunto: Re: [mapserver-users] Re: Coments about the Tickedt 3541 Those steps are only needed when you want to use the Oracle support of OGR. ( http://mapserver.org/input/vector/oracle.html#two-options-for-using-orac le-spatial-with-mapserver ) By setting CONNECTIONTYPE ORACLESPATIAL, you use the native oracle through mapserver. The DLL you were talking about is not used. So, with MapServer 5.6.1, you can reproduce the problem.. but not with 5.2.1. Thanks for the info, Alan On September 28, 2010 03:31:54 am Jorge Bellido Diez wrote: We're using 'oraclespatial', I mean CONNECTIONTYPE oraclespatial CONNECTION user/p...@database We've just done what is explained in ms4w manual to get Oracle support (http://www.maptools.org/ms4w/index.phtml?page=README_INSTALL.html#oracl e-10g http://www.maptools.org/ms4w/index.phtml?page=README_INSTALL.html ) Does this tell something to you?? Thanks De: Alan Boudreault [mailto:aboudrea...@mapgears.com] Enviado el: lunes, 27 de septiembre de 2010 15:04 Para: mapserver-users@lists.osgeo.org CC: Jorge Bellido Diez; Sumit Sharma Asunto: Re: [mapserver-users] Re: Coments about the Tickedt 3541 It depends on how you define your layer. In the bug, they are using the native oracle support in MapServer and not the oracle support from OGR. So, the ogr_OCI.dll is not used. What OCI support are you using? (The CONNECTIONTYPE in your layer) Alan On September 27, 2010 06:16:59 am Jorge Bellido Diez wrote: Hi, More comments about this ticket. We're using ms4w 3.0 beta 11 (DEVELOPMENT) as commented previously, which includes MapServer 5.6.1
RE: [mapserver-users] Expressions
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: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Jay Kapalczynski Sent: Tuesday, September 21, 2010 9:51 AM To: 'Bob Basques'; mapserver-users@lists.osgeo.org Subject: RE: [mapserver-users] Expressions My major question is can I do this with a String/text field? Its the only way I can see keeping things in a %2Y%2M%2D format ex. 092110 (Sept 21st 2010), otherwise the 0 will get removed in a numeric field Can I use the format Year, Month, Day? Or do I have to use Month, Day, Year? In this example I eliminated two expressions and focused on one Expression to see if it is working. I kept this map-source name=Burglaries type=mapserver file./maple_grove_datasets/police/Burglaries.map/file param type=today offset=-7 name=LASTWEEK format=%2Y%2M%2D / param type=today offset=-14 name=LASTTWOWEEKS format=%2Y%2M%2D / param type=today offset=-30 name=LASTTHIRTY format=%2Y%2M%2D / param type=today offset=-90 name=LASTNINTY format=%2Y%2M%2D / layer name=Burglaries/ /map-source In my map file I used ONLY this CLASS NAME 'Last Weeks' EXPRESSION ('[dateValues]' '%LASTTWOWEEKS%') STYLE COLOR 0 100 50 SYMBOL bike SIZE 12 END END Now in my data I have these values (below), although every symbol was displayed in the map NOTE THIS IS A TEXT FIELD 081204, 081225,090118 These values (above) for the Year, Month, Day format specified in the map source are clearly less than the last two weeks, Where as they are older than the last 14 daysso none of them should show up, but they do Any thoughts From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Bob Basques Sent: Friday, September 17, 2010 9:25 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Expressions A first stab at seeing more than one class, might be to try and switch them around order wise, one filter may be overwriting the other for example. bobb On 9/17/2010 8:20 AM, Jay Kapalczynski wrote: I am using GeoMoose but feel this is more a question for Map Server. I am trying to sort my points by dates using the code belowI think that I can do this but not sure Is this a viable format 2Y%2M%2D ? As for the field in the shapefile...If I use an integer it removes the 0 from the 092110, (sept 21st 2010) If I use a date then there are / ... 9/21/10 The only way I can see this happening is using a text field with retains the 0 in 092110 When I use the textfield dateValues as seen below I can get the stars to draw but only the LASTWEEK...for some reason the LASTTWOWEEKS does not show and I know that I have a few records with dates in the last 14 days... Thoughts? THANKSall your help is very appreciated Main .xml file map-source name=Burglaries type=mapserver file./maple_grove_datasets/police/Burglaries.map/file param type=today offset=-7 name=LASTWEEK format=%2Y%2M%2D / param type=today offset=-14 name=LASTTWOWEEKS format=%2Y%2M%2D / param type=today offset=-30 name=LASTTHIRTY format=%2Y%2M%2D / param type=today offset=-90 name=LASTNINTY format=%2Y%2M%2D / layer name=Burglaries/ /map-source .map file CLASS NAME 'Last Weeks' EXPRESSION ('[dateValues]' '%LASTWEEK%') STYLE COLOR 0 0 0 SYMBOL star SIZE 12 END END CLASS NAME 'Last Two Weeks' EXPRESSION ('[dateValues]' '%LASTTWOWEEKS%') STYLE COLOR 0 100 50 SYMBOL star SIZE 12 END END ___ mapserver-users mailing list mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] 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 points….and I know there are values in there from 2008 Thanks *From:* mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Jay Kapalczynski *Sent:* Tuesday, September 21, 2010 9:51 AM *To:* 'Bob Basques'; mapserver-users@lists.osgeo.org *Subject:* RE: [mapserver-users] Expressions My major question is can I do this with a String/text field? Its the only way I can see keeping things in a %2Y%2M%2D format ex. 092110 (Sept 21^st 2010), otherwise the 0 will get removed in a numeric field Can I use the format Year, Month, Day? Or do I have to use Month, Day, Year? In this example I eliminated two expressions and focused on one Expression to see if it is working. *_I kept this_* map-source name=Burglaries type=mapserver file./maple_grove_datasets/police/Burglaries.map/file param type=today offset=-7 name=LASTWEEK format=%2Y%2M%2D / param type=today offset=-14 name=LASTTWOWEEKS format=%2Y%2M%2D / param type=today offset=-30 name=LASTTHIRTY format=%2Y%2M%2D / param type=today offset=-90 name=LASTNINTY format=%2Y%2M%2D / layer name=Burglaries/ /map-source *_In my map file I used _**_ONLY_**_ this_* CLASS NAME 'Last Weeks' EXPRESSION ('[dateValues]' '%LASTTWOWEEKS%') STYLE COLOR 0 100 50 SYMBOL bike SIZE 12 END END Now in my data I have these values (below), although every symbol was displayed in the map NOTE THIS IS A TEXT FIELD 081204, 081225,090118 These values (above) for the Year, Month, Day format specified in the map source are clearly less than the “last two weeks”, Where as they are older than the last 14 days….so none of them should show up, but they do Any thoughts *From:* mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Bob Basques *Sent:* Friday, September 17, 2010 9:25 PM *To:* mapserver-users@lists.osgeo.org *Subject:* Re: [mapserver-users] Expressions A first stab at seeing more than one class, might be to try and switch them around order wise, one filter may be overwriting the other for example. bobb On 9/17/2010 8:20 AM, Jay Kapalczynski wrote: I am using GeoMoose but feel this is more a question for Map Server. I am trying to sort my points by dates using the code below….I think that I can do this but not sure Is this a viable format “2Y%2M%2D” ? As for the field in the shapefile…If I use an integer it removes the 0 from the 092110, (sept 21^st 2010) If I use a date then there are “/” … 9/21/10 The only way I can see this happening is using a text field with retains the 0 in 092110 When I use the textfield “dateValues” as seen below I can get the stars to draw but only the LASTWEEK…for some reason the LASTTWOWEEKS does not show and I know that I have a few records with dates in the last 14 days… Thoughts? THANKS….all your help is very appreciated…. Main .xml file map-source name=Burglaries type=mapserver file./maple_grove_datasets/police/Burglaries.map/file param type=today offset=-7 name=LASTWEEK format=%2Y%2M%2D / param type=today offset=-14 name=LASTTWOWEEKS format=%2Y%2M%2D / param type=today offset=-30 name=LASTTHIRTY format=%2Y%2M%2D / param type=today offset=-90 name=LASTNINTY format=%2Y%2M%2D / layer name=Burglaries/ /map-source .map file CLASS NAME 'Last Weeks' EXPRESSION ('[dateValues]' '%LASTWEEK%') STYLE COLOR 0 0 0 SYMBOL star SIZE 12 END END CLASS NAME 'Last Two Weeks' EXPRESSION ('[dateValues]' '%LASTTWOWEEKS%') STYLE COLOR 0 100 50 SYMBOL star SIZE 12 END END ___ mapserver-users mailing list mapserver-users@lists.osgeo.org mailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Expressions
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:* mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Jay Kapalczynski *Sent:* Tuesday, September 21, 2010 9:51 AM *To:* 'Bob Basques'; mapserver-users@lists.osgeo.org *Subject:* RE: [mapserver-users] Expressions My major question is can I do this with a String/text field? Its the only way I can see keeping things in a %2Y%2M%2D format ex. 092110 (Sept 21^st 2010), otherwise the 0 will get removed in a numeric field Can I use the format Year, Month, Day? Or do I have to use Month, Day, Year? In this example I eliminated two expressions and focused on one Expression to see if it is working. *_I kept this_* map-source name=Burglaries type=mapserver file./maple_grove_datasets/police/Burglaries.map/file param type=today offset=-7 name=LASTWEEK format=%2Y%2M%2D / param type=today offset=-14 name=LASTTWOWEEKS format=%2Y%2M%2D / param type=today offset=-30 name=LASTTHIRTY format=%2Y%2M%2D / param type=today offset=-90 name=LASTNINTY format=%2Y%2M%2D / layer name=Burglaries/ /map-source *_In my map file I used _**_ONLY_**_ this_* CLASS NAME 'Last Weeks' EXPRESSION ('[dateValues]' '%LASTTWOWEEKS%') STYLE COLOR 0 100 50 SYMBOL bike SIZE 12 END END Now in my data I have these values (below), although every symbol was displayed in the map NOTE THIS IS A TEXT FIELD 081204, 081225,090118 These values (above) for the Year, Month, Day format specified in the map source are clearly less than the last two weeks, Where as they are older than the last 14 daysso none of them should show up, but they do Any thoughts *From:* mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Bob Basques *Sent:* Friday, September 17, 2010 9:25 PM *To:* mapserver-users@lists.osgeo.org *Subject:* Re:
Re: [mapserver-users] Expressions
Jay, I am not exactly sure how the params work in GeoMoose. One tip in general to be able to isolate the problem to either GeoMoose or MapServer is to look at the actual requests that are being made to MapServer. One of the easiest ways to do this is to either use the FireBug extension in FireFox or the Javascript Console in Chrome. With this take a look at the URL that is being sent to MapServer and see what is in the parameter LASTWEEK=. David On Wed, Sep 29, 2010 at 10:49 AM, Jay Kapalczynski jkapalczyn...@ci.maple-grove.mn.us 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 points….and I know there are values in there from 2008 Thanks *From:* mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Jay Kapalczynski *Sent:* Tuesday, September 21, 2010 9:51 AM *To:* 'Bob Basques'; mapserver-users@lists.osgeo.org *Subject:* RE: [mapserver-users] Expressions My major question is can I do this with a String/text field? Its the only way I can see keeping things in a %2Y%2M%2D format ex. 092110 (Sept 21^st 2010), otherwise the 0 will get removed in a numeric field Can I use the format Year, Month, Day? Or do I have to use Month, Day, Year? In this example I eliminated two expressions and focused on one Expression to see if it is working. *_I kept this_* map-source name=Burglaries type=mapserver file./maple_grove_datasets/police/Burglaries.map/file param type=today offset=-7 name=LASTWEEK format=%2Y%2M%2D / param type=today offset=-14 name=LASTTWOWEEKS format=%2Y%2M%2D / param type=today offset=-30 name=LASTTHIRTY format=%2Y%2M%2D / param type=today offset=-90 name=LASTNINTY format=%2Y%2M%2D / layer name=Burglaries/ /map-source *_In my map file I used _**_ONLY_**_ this_* CLASS NAME 'Last Weeks' EXPRESSION ('[dateValues]' '%LASTTWOWEEKS%') STYLE COLOR 0 100 50
[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 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Expressions
Yea I have firebugbut while in the console nothing appears when you turn on a layer or turn one off And the response tab simply displays the .xml file I cant see where to go to see the effect the expression is having I really appreciate this all Can any of my issues be related to Windows 7 64 bit computer? From: david.bit...@gmail.com [mailto:david.bit...@gmail.com] On Behalf Of David William Bitner Sent: Wednesday, September 29, 2010 11:03 AM To: Jay Kapalczynski Cc: Stephen Woodbridge; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Expressions Jay, I am not exactly sure how the params work in GeoMoose. One tip in general to be able to isolate the problem to either GeoMoose or MapServer is to look at the actual requests that are being made to MapServer. One of the easiest ways to do this is to either use the FireBug extension in FireFox or the Javascript Console in Chrome. With this take a look at the URL that is being sent to MapServer and see what is in the parameter LASTWEEK=. David On Wed, Sep 29, 2010 at 10:49 AM, Jay Kapalczynski jkapalczyn...@ci.maple-grove.mn.usmailto:jkapalczyn...@ci.maple-grove.mn.us 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.orgmailto:mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Stephen Woodbridge Sent: Wednesday, September 29, 2010 8:19 AM To: mapserver-users@lists.osgeo.orgmailto: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:* mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.orgmailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Jay Kapalczynski *Sent:* Tuesday, September 21, 2010 9:51 AM *To:* 'Bob Basques'; mapserver-users@lists.osgeo.orgmailto:mapserver-users@lists.osgeo.org *Subject:* RE: [mapserver-users] Expressions My major question is can I do this with a String/text field? Its the only way I can see keeping things in a %2Y%2M%2D format ex. 092110 (Sept 21^st 2010), otherwise the 0 will get removed in a numeric field
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 points….and I know there are values in there from 2008 Thanks *From:* mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Jay Kapalczynski *Sent:* Tuesday, September 21, 2010 9:51 AM *To:* 'Bob Basques'; mapserver-users@lists.osgeo.org *Subject:* RE: [mapserver-users] Expressions My major question is can I do this with a String/text field? Its the only way I can see keeping things in a %2Y%2M%2D format ex. 092110 (Sept 21^st 2010), otherwise the 0 will get removed in a numeric field Can I use the format Year, Month, Day? Or do I have to use Month, Day, Year? In this example I eliminated two expressions and focused on one Expression to see if it is working. *_I kept this_* map-source name=Burglaries type=mapserver file./maple_grove_datasets/police/Burglaries.map/file param type=today offset=-7 name=LASTWEEK format=%2Y%2M%2D / param type=today offset=-14 name=LASTTWOWEEKS format=%2Y%2M%2D / param type=today offset=-30 name=LASTTHIRTY format=%2Y%2M%2D / param type=today offset=-90 name=LASTNINTY format=%2Y%2M%2D / layer name=Burglaries/ /map-source *_In my map file I used _**_ONLY_**_ this_* CLASS NAME 'Last Weeks' EXPRESSION ('[dateValues]' '%LASTTWOWEEKS%') STYLE COLOR 0 100 50 SYMBOL bike SIZE 12 END END Now in my data I have these values (below), although every symbol was displayed in the map NOTE THIS IS A TEXT FIELD 081204, 081225,090118 These values (above) for the Year, Month, Day format specified in the map source are clearly less than the
Re: [mapserver-users] lighttpd, TNS:could not resolve...
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 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Expressions
How are you calling mapserver directly? You need to do something like: http://host/cgi-bin/mapserv?.LASTTWOWEEKS=100916 -Steve On 9/29/2010 3:12 PM, Jay Kapalczynski wrote: 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 box….SAME 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