Re: [MAPSERVER-USERS] WMS: layer status turned to on
Hi Alexandre, Alexandre Dube wrote: > > Using MINSCALEDENOM and MAXSCALEDENOM could resolve your problem. Set > MINSCALEDENOM to 1 to the layers you don't want to show in the dummy > layer. > Thanks for the hint, I didn't think about it out at all. Setting MAXSCALEDENOM (instead of MINSCALEDENOM ;-) ) to 1 on the dummy layers does it as Mapserver won't prepare them for display and will deliver the maps a lot faster. Although this works for me, as I will never need to display those layers, there should be a way to tell Mapserver that some layers shouldn't be loaded when acting as a WMS-Server. I tought this was the purpose of STATUS, but this obviously isn't the case, as Mapserver can change that value freely. Merci encore, Philippe -- View this message in context: http://www.nabble.com/WMS%3A-layer-status-turned-to-on-tp20952698p21011410.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[MAPSERVER-USERS] WMS: layer status turned to on
Hi list, I have a question concerning the behaviour of Mapserver when acting as a WMS server. We have a web mapping application rendering roads and landcover information for all Europe. As the dataset is pretty huge, we have to use multiple, scale-dependant mapfiles. This was necessary because most of the data had to be generalized to improve performance at small scales. The layers with the same name in different mapfiles therefore use different geometries and some of the layers aren't used in all mapfiles. For example, the biggest layer, containing the local roads, is only used in the two last mapfiles, at a very large scale. I was asked to make the data available as a (demo) web mapping service. To do this, I added, in our application, a servlet that would pass the request to MS, calling different mapfiles while the scale changes. In order to be able to answer the GetCapabilities request, a dummy mapfile had to be written, containing all the layers that were used across the other mapfiles. This forced me to also add the 'missing' layers in each mapfile. For example, the local roads layer had to be added to the smaller scale mapfiles. The status of those additional layers was put to OFF, but the MS apparently turns the status to ON when the whole mapfile is requested (WMS request --> LAYERS=mapobject_name). As a workaround, to not have the other layers displayed, I deleted the class objects in the additional layers, but MS logically has to prepare the whole layer for display anyway, resulting in horrendous drawing times at small scales. When the single layers are selected in the request (LAYERS=country,highways,...), the map will draw very fast. So my question is, is there a way not having the layer status turned to ON when the 'root' WMS layer is selected? Or maybe there is another way to tell MS to not prepare those layers? As the mapfiles and data structure are very complex, setting up dummy (empty) data for each layer would take quite a long time. I know the whole thing isn't very clean and thoroughly thought through, but it had to be completed very fast and that was the best solution I came up with. If some of you have ideas on how to improve it, I would be very glad to listen to your suggestions. Best regards, Philippe Kruschitz PS: We're using Mapserver 5.0.0 -- View this message in context: http://www.nabble.com/WMS%3A-layer-status-turned-to-on-tp20952698p20952698.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[MAPSERVER-USERS] Setting offset on a symbol within STYLE
Hi, I'm trying to move my icon, which is a small flag, to fit correctly on my map. I'm reading the geometry from a PostGIS table. Displaying the icon works, except for the offset, which doesn't work at all. MS sytematically puts the icon on the point (i.e. the point is in the "middle" of my icon). I tried all possible values for OFFSET, negative/positive, but it just won't move. I'm working on Mapserver 5.0.0. Did anyone know why this happens? Maybe I'm doing something wrong? I read the documentation and found a thread in the forum dealing with a similar problem, but it didn't help me much. http://www.nabble.com/Symbol-Origin-to18715006.html#a18734570 Here's an example taken from my mapfile (the icon is 22*31px): CLASS EXPRESSION ([idstatus] eq 2) SIZE 24 STYLE SYMBOL 'etc/icons/pos/ti_icon_tourende_pos.gif' OFFSET 11 15 END # style END #class Thanks, Philippe -- View this message in context: http://www.nabble.com/Setting-offset-on-a-symbol-within-STYLE-tp20477081p20477081.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MAPSERVER-USERS] Features not displayed if LABELITEM is null
Hi Steve, We work with a *lot* of mapfiles on this project and after going through them thoroughly, I found out that the older one still had a filter on null values set. Therefore, replacing the null values with a string seemed to do it I should have thought of this earlier, sorry. Thanks that you took some of your time replying, I'll try to be more careful and check every option next time before posting to the list... Have a nice day, Philippe -- View this message in context: http://www.nabble.com/Features-not-displayed-if-LABELITEM-is-null-tp20362894p20365705.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[MAPSERVER-USERS] Features not displayed if LABELITEM is null
Hi list, Is it normal that Mapserver won't draw features if it can't find a string in the [labelitem] attribute? I am trying to display a road network and, logically, some of the segments in it don't have any name attached to them. In this case, there is a NULL value in the 'name' column of my PostGIS table. Using this column as the LABELITEM in my layer, Mapserver just seems to skip those records and won't display them, even if they have a valid geometry. A workaround is to update all my tables and replace this NULL with an empty string. I'll probably end up doing just that, but I ain't happy about it, as my tables contain +30 millions of entries and updating the whole dataset will take forever. I was just wondering if someone else had noticed this behaviour before and if there's another solution. Tanks, Philippe -- View this message in context: http://www.nabble.com/Features-not-displayed-if-LABELITEM-is-null-tp20362894p20362894.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MAPSERVER-USERS] Mapserv problems on Fedora
It worked! Thank you list There was, indeed, a second regex library involved. The first time I tried to compile Mapserver, I relied on a 1.4.2 GDAL package from the EPEL Repository. This package used the POSIX library, 'librx', which wasn't removed when I later uninstalled the GDAL package to compile it myself. For some obscure reasons, building GDAL from source used 'librx' instead of the system regex?... It would only work after I completely removed the POSIX library. I don't need librx, but I was wondering if this was a normal behaviour? Should I post it to the GDAL list? Thanks again, Philippe Daniel Morissette-2 wrote: > > Sounds as if there might be two different copies of the regex library > involved in the build, and the wrong one would be used at runtime and > result in regex evaluations failing. This used to happen with PHP > MapScript when MapServer was compiled with the system regex and PHP was > compiled with its built-in regex. I realize that you are using mapserv > in this case and not PHP MapScript so it's not related to PHP at all, > but I would suggest that you look to make sure there is not another > dependency in your build that pulls a second copy of regex into the mix. > > Daniel > > Philippe Kruschitz wrote: >> >> Do you think overriding the default mapfile pattern ("\\.map$") by >> setting >> MS_MAPFILE_PATTERN could be a solution? >> >> (though I still don't get why the regular expression returns as false, >> the path in the URL obviously fits the default pattern...??) >> >> Philippe >> >> >> >> Philippe Kruschitz wrote: >>> >>> Hi Steven, >>> >>> Thanks for the hint. I'm glad it worked for you, although I doubt this >>> has >>> anything to do with AGG. >>> Usually, trying to access non-existent mapfiles throws a LoadMap error: >>> >>> msLoadMap(): Unable to access file. (/home/pk/gis/no.map) >>> >>> Trying with non-existent and working mapfiles (using GD rendering) >>> always >>> gets me the same error: >>> >>> [http://localhost/cgi-bin/mapserv?map=no.map] >>> msEvalRegex(): Regular expression error. String (no.map) failed >>> expression >>> test. >>> >>> [http://localhost/cgi-bin/mapserv?map=/home/pk/gis/no.map] >>> msEvalRegex(): Regular expression error. String (/home/pk/gis/no.map) >>> failed expression test. >>> >>> [http://localhost/cgi-bin/mapserv?map=/home/pk/gis/test.map] >>> msEvalRegex(): Regular expression error. String (/home/pk/gis/test.map) >>> failed expression test. >>> >>> >>> To be sure, I recompiled Mapserver without agg support, getting the same >>> result. >>> I'm slowly considering switching to an Ubuntu server, as I tried almost >>> everything I could. >>> >>> By the way, how did you find out about your bug? >>> >>> Best regards, >>> >>> Philippe >>> >>> >>> >>> >>> >>> Stephen Woodbridge wrote: >>>> Philippe, >>>> >>>> My regex crash was because of a bug in mapserver >>>> http://trac.osgeo.org/mapserver/ticket/2577#comment:8 >>>> >>>> which has been fixed now in svn. It was specifically related to a crash >>>> cause when AGG FORMATOPTION PALETTE= could not open . >>>> >>>> Hope this helps, >>>>-Steve W >>>> >>>> Philippe Kruschitz wrote: >>>>>> You --must-- compile and install the last version of >>>>>> gd, the gd version on RHEL 5 and 5.1 is broken, also >>>>>> on centos and fedora core 8. >>>>>> >>>>>> Be sure to replace the old gd version on /usr/lib, >>>>>> also check the simlinks on /usr/lib, then run ldconfig >>>>>> as root. >>>>>> >>>>>> If you use mapserver with phpmapscript install php-gd >>>>>> with yum. >>>>>> >>>>>> Hope this helps. >>>>>> >>>>>> Saludos. >>>>>> >>>>>> -- >>>>>> Nahum Castro >>>>>> Leon, Guanajuato, Mexico >>>>>> http://www.leon-linux.com >>>>>> e-mail: pedro1_72 [en] yahoo [punto] com >>>>> >>>>> I did pretty much everything you said before compiling mapserver (i >>>>> didn't &g
Re: [MAPSERVER-USERS] Mapserv problems on Fedora
Do you think overriding the default mapfile pattern ("\\.map$") by setting MS_MAPFILE_PATTERN could be a solution? (though I still don't get why the regular expression returns as false, the path in the URL obviously fits the default pattern...??) Philippe Philippe Kruschitz wrote: > > > Hi Steven, > > Thanks for the hint. I'm glad it worked for you, although I doubt this has > anything to do with AGG. > Usually, trying to access non-existent mapfiles throws a LoadMap error: > > msLoadMap(): Unable to access file. (/home/pk/gis/no.map) > > Trying with non-existent and working mapfiles (using GD rendering) always > gets me the same error: > > [http://localhost/cgi-bin/mapserv?map=no.map] > msEvalRegex(): Regular expression error. String (no.map) failed expression > test. > > [http://localhost/cgi-bin/mapserv?map=/home/pk/gis/no.map] > msEvalRegex(): Regular expression error. String (/home/pk/gis/no.map) > failed expression test. > > [http://localhost/cgi-bin/mapserv?map=/home/pk/gis/test.map] > msEvalRegex(): Regular expression error. String (/home/pk/gis/test.map) > failed expression test. > > > To be sure, I recompiled Mapserver without agg support, getting the same > result. > I'm slowly considering switching to an Ubuntu server, as I tried almost > everything I could. > > By the way, how did you find out about your bug? > > Best regards, > > Philippe > > > > > > Stephen Woodbridge wrote: >> >> Philippe, >> >> My regex crash was because of a bug in mapserver >> http://trac.osgeo.org/mapserver/ticket/2577#comment:8 >> >> which has been fixed now in svn. It was specifically related to a crash >> cause when AGG FORMATOPTION PALETTE= could not open . >> >> Hope this helps, >>-Steve W >> >> Philippe Kruschitz wrote: >>> >>>> You --must-- compile and install the last version of >>>> gd, the gd version on RHEL 5 and 5.1 is broken, also >>>> on centos and fedora core 8. >>>> >>>> Be sure to replace the old gd version on /usr/lib, >>>> also check the simlinks on /usr/lib, then run ldconfig >>>> as root. >>>> >>>> If you use mapserver with phpmapscript install php-gd >>>> with yum. >>>> >>>> Hope this helps. >>>> >>>> Saludos. >>>> >>>> -- >>>> Nahum Castro >>>> Leon, Guanajuato, Mexico >>>> http://www.leon-linux.com >>>> e-mail: pedro1_72 [en] yahoo [punto] com >>> >>> >>> I did pretty much everything you said before compiling mapserver (i >>> didn't >>> have mapscript, though). >>> >>> I tried to to change the malloc value, as frank warmerdam suggested, >>> with >>> exactly the same result as stephen woodbridge: the crash is fixed, but >>> the >>> regular expression systematically fails. >>> >>> Anyone has an idea? Did Stephen fixed it? >>> >>> Regards, >>> >>> Phil >>> >>> >>> >>> Quote S. Woodbridge: >>> >>> Hi Frank, >>> >>> Adding more to to the malloc fixed the crash, but the regex is failing >>> :( and should be ok: >>> >>> Breakpoint 1, msEvalRegex (e=0x4e9873 "\\.map$", >>> s=0x7232a0 "/u/data/maps/google-agg.map") at mapfile.c:79 >>> >>> ... >>> >>> 89if(ms_regexec(&re, s, 0, NULL, 0) != 0) { /* no match */ >>> (gdb) p ms_regexec(&re, s, 0, 0, 0) >>> $1 = 1 >>> (gdb) c >>> Continuing. >>> Content-type: text/html >>> >>> >>> MapServer Message >>> >>> >>> msEvalRegex(): Regular expression error. String >>> (/u/data/maps/google-agg.map) failed expression test. >>> >>> Program exited normally. >>> >>> >>> This should NOT be happening. Arrrgh! >>> Anyone else using fc8 on a x86_84 box? >>> >>> -Steve >>> >> >> ___ >> mapserver-users mailing list >> mapserver-users@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users >> >> > > -- View this message in context: http://www.nabble.com/Mapserv--problems-on-Fedora-tp16688820p16959938.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MAPSERVER-USERS] Mapserv problems on Fedora
Hi Steven, Thanks for the hint. I'm glad it worked for you, although I doubt this has anything to do with AGG. Usually, trying to access non-existent mapfiles throws a LoadMap error: msLoadMap(): Unable to access file. (/home/pk/gis/no.map) Trying with non-existent and working mapfiles (using GD rendering) always gets me the same error: [http://localhost/cgi-bin/mapserv?map=no.map] msEvalRegex(): Regular expression error. String (no.map) failed expression test. [http://localhost/cgi-bin/mapserv?map=/home/pk/gis/no.map] msEvalRegex(): Regular expression error. String (/home/pk/gis/no.map) failed expression test. [http://localhost/cgi-bin/mapserv?map=/home/pk/gis/test.map] msEvalRegex(): Regular expression error. String (/home/pk/gis/test.map) failed expression test. To be sure, I recompiled Mapserver without agg support, getting the same result. I'm slowly considering switching to an Ubuntu server, as I tried almost everything I could. By the way, how did you find out about your bug? Best regards, Philippe Stephen Woodbridge wrote: > > Philippe, > > My regex crash was because of a bug in mapserver > http://trac.osgeo.org/mapserver/ticket/2577#comment:8 > > which has been fixed now in svn. It was specifically related to a crash > cause when AGG FORMATOPTION PALETTE= could not open . > > Hope this helps, >-Steve W > > Philippe Kruschitz wrote: >> >>> You --must-- compile and install the last version of >>> gd, the gd version on RHEL 5 and 5.1 is broken, also >>> on centos and fedora core 8. >>> >>> Be sure to replace the old gd version on /usr/lib, >>> also check the simlinks on /usr/lib, then run ldconfig >>> as root. >>> >>> If you use mapserver with phpmapscript install php-gd >>> with yum. >>> >>> Hope this helps. >>> >>> Saludos. >>> >>> -- >>> Nahum Castro >>> Leon, Guanajuato, Mexico >>> http://www.leon-linux.com >>> e-mail: pedro1_72 [en] yahoo [punto] com >> >> >> I did pretty much everything you said before compiling mapserver (i >> didn't >> have mapscript, though). >> >> I tried to to change the malloc value, as frank warmerdam suggested, with >> exactly the same result as stephen woodbridge: the crash is fixed, but >> the >> regular expression systematically fails. >> >> Anyone has an idea? Did Stephen fixed it? >> >> Regards, >> >> Phil >> >> >> >> Quote S. Woodbridge: >> >> Hi Frank, >> >> Adding more to to the malloc fixed the crash, but the regex is failing >> :( and should be ok: >> >> Breakpoint 1, msEvalRegex (e=0x4e9873 "\\.map$", >> s=0x7232a0 "/u/data/maps/google-agg.map") at mapfile.c:79 >> >> ... >> >> 89if(ms_regexec(&re, s, 0, NULL, 0) != 0) { /* no match */ >> (gdb) p ms_regexec(&re, s, 0, 0, 0) >> $1 = 1 >> (gdb) c >> Continuing. >> Content-type: text/html >> >> >> MapServer Message >> >> >> msEvalRegex(): Regular expression error. String >> (/u/data/maps/google-agg.map) failed expression test. >> >> Program exited normally. >> >> >> This should NOT be happening. Arrrgh! >> Anyone else using fc8 on a x86_84 box? >> >> -Steve >> > > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users > > -- View this message in context: http://www.nabble.com/Mapserv--problems-on-Fedora-tp16688820p16957618.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MAPSERVER-USERS] Mapserv problems on Fedora
> >You --must-- compile and install the last version of >gd, the gd version on RHEL 5 and 5.1 is broken, also >on centos and fedora core 8. > >Be sure to replace the old gd version on /usr/lib, >also check the simlinks on /usr/lib, then run ldconfig >as root. > >If you use mapserver with phpmapscript install php-gd >with yum. > >Hope this helps. > >Saludos. > >-- >Nahum Castro >Leon, Guanajuato, Mexico >http://www.leon-linux.com >e-mail: pedro1_72 [en] yahoo [punto] com I did pretty much everything you said before compiling mapserver (i didn't have mapscript, though). I tried to to change the malloc value, as frank warmerdam suggested, with exactly the same result as stephen woodbridge: the crash is fixed, but the regular expression systematically fails. Anyone has an idea? Did Stephen fixed it? Regards, Phil Quote S. Woodbridge: Hi Frank, Adding more to to the malloc fixed the crash, but the regex is failing :( and should be ok: Breakpoint 1, msEvalRegex (e=0x4e9873 "\\.map$", s=0x7232a0 "/u/data/maps/google-agg.map") at mapfile.c:79 ... 89if(ms_regexec(&re, s, 0, NULL, 0) != 0) { /* no match */ (gdb) p ms_regexec(&re, s, 0, 0, 0) $1 = 1 (gdb) c Continuing. Content-type: text/html MapServer Message msEvalRegex(): Regular expression error. String (/u/data/maps/google-agg.map) failed expression test. Program exited normally. This should NOT be happening. Arrrgh! Anyone else using fc8 on a x86_84 box? -Steve -- View this message in context: http://www.nabble.com/Mapserv--problems-on-Fedora-tp16688820p16937360.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [MAPSERVER-USERS] Mapserv problems on Fedora
Hi, I posted to the list before with a "shared libraries" problem causing mapserv to crash. Daniel Morissette got it right, as I was working on a RHEL5 server. The excellent link sent by Doug Newcomb was pretty helpful too, but unfortunately, I had to get MS running as soon as possible, so I disabled SELinux completely (I'll get back to configuring it correctly, though...) After rebooting, trying to access mapserv without any parameters showed the following (correctly?): 'No query information to decode. QUERY_STRING is set, but empty.' But as soon as I try to display a map file, the same blank page that showed before returned. In the error_log, I found an ugly stack, apparently caused by a glibc problem: [Fri Apr 25 05:09:00 2008] [error] [client 127.0.0.1] *** glibc detected *** /var/www/cgi-bin/mapserv: free(): invalid next size (fast): 0x10137900 *** Searching on the forum, I found this thread where you obviously dealt with a similar problem. Unfortunately, I didn't really understand how or if you solved the problem. I would be grateful if one of you could explain to me what is exactly happening and how I could possibly solve my problem Regards, Philippe PS: I'm running on a 64-bit RHEL5 server with Mapserver compiled from source... ./mapserv -v MapServer version 5.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -- View this message in context: http://www.nabble.com/Mapserv--problems-on-Fedora-tp16688820p16894650.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Postgres library
Hi, I just compiled Mapserver 5.0.2 from source with all needed libraries (and postgres+postgis). Everything worked fine, I copied the mapserv file into my cgi-bin directory, but mapserver only returns a blank page in the browser. I checked the Apache error-log, which showed following output: [Thu Apr 24 06:09:15 2008] [error] [client 127.0.0.1] /var/www/cgi-bin/mapserv: error while loading shared libraries: libpq.so.5: failed to map segment from shared object: Permission denied [Thu Apr 24 06:09:15 2008] [error] [client 127.0.0.1] Premature end of script headers: mapserv /etc/ld.so.conf was properly set-up before building: include ld.so.conf.d/*.conf /usr/local/lib /usr/local/pgsql/lib and running '/sbin/ldconfig -v | more' returned: /usr/local/lib: libcharset.so.1 -> libcharset.so.1.0.0 libpng.so.3 -> libpng.so.3.26.0 libiconv.so.2 -> libiconv.so.2.4.0 libgd.so.2 -> libgd.so.2.0.0 /usr/local/pgsql/lib: libecpg_compat.so.3 -> libecpg_compat.so.3.0 libpq.so.5 -> libpq.so.5.1 libpgtypes.so.3 -> libpgtypes.so.3.0 libecpg.so.6 -> libecpg.so.6.0 liblwgeom.so.1 -> liblwgeom.so.1.3 and 'ls -la /usr/pqsql/lib' gets me something like this: lrwxrwxrwx 1 root root 12 23. Apr 08:29 libpq.so -> libpq.so.5.1 lrwxrwxrwx 1 root root 12 23. Apr 08:29 libpq.so.5 -> libpq.so.5.1 -rwxr-xr-x 1 root root 153626 23. Apr 08:29 libpq.so.5.1 Am I missing something here? If anybody has a clue, I would very thankful. Regards, Philippe _ Trouvez vos infos rapidement et précisément avec Windows Live Instant Search ! Essayez-le maintenant! http://g.msn.ca/ca55/220___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users