Re: [mapserver-users] mapserver POSITION question
Thank you for advice! I will try this as soon as possible.. Raivo On Mon, Jun 15, 2009 at 5:31 PM, Daniel Morissettedmorisse...@mapgears.com wrote: Raivo Alla wrote: As it could be seen on the picture (http://picasaweb.google.com/snaperski/Ort#5347526051315751666), street labels are strangely positioned in different ways. I want labels only when they have enough space to fit in (MINFEATURESIZE AUTO) and I want them centered. As it appears, sometimes they are aligned left, sometimes right, only lucky ones at the center. Those red boxes are to visualize vertex points. You are using ANGLE AUTO in your label definition. In this case, MapServer places the label at the center of the longest segment of the polyline that define the street, and follows the angle of that segment. If you use ANGLE FOLLOW then the label will be placed at the center of the polyline itself (i.e. at total_length/2)... that should give the results that you expect. Daniel -- Daniel Morissette http://www.mapgears.com/ ___ 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
Re: [mapserver-users] mapserver POSITION question
Hi, still having some problems. I added some lines in mapfile to draw polyline vertices as blue boxes and starting points as red boxes. And changed to ANGLE FOLLOW, the result could be seen here: http://picasaweb.google.com/snaperski/Ort#5347810688430058082 Many labels wont show up (I checked shapefile also, and label attribute was filled in those places), tried to go MINDISTANCE 5, but no change, even FORCE TRUE did'nt changed the output. :( Just a little sad, Raivo On Tue, Jun 16, 2009 at 9:22 AM, Raivo Allasnaper...@gmail.com wrote: Thank you for advice! I will try this as soon as possible.. Raivo On Mon, Jun 15, 2009 at 5:31 PM, Daniel Morissettedmorisse...@mapgears.com wrote: Raivo Alla wrote: As it could be seen on the picture (http://picasaweb.google.com/snaperski/Ort#5347526051315751666), street labels are strangely positioned in different ways. I want labels only when they have enough space to fit in (MINFEATURESIZE AUTO) and I want them centered. As it appears, sometimes they are aligned left, sometimes right, only lucky ones at the center. Those red boxes are to visualize vertex points. You are using ANGLE AUTO in your label definition. In this case, MapServer places the label at the center of the longest segment of the polyline that define the street, and follows the angle of that segment. If you use ANGLE FOLLOW then the label will be placed at the center of the polyline itself (i.e. at total_length/2)... that should give the results that you expect. Daniel -- Daniel Morissette http://www.mapgears.com/ ___ 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
Re: [mapserver-users] AGG vs GD rendering shows no difference
Adrian Popa wrote: The original mapfile had rendering set up like this: IMAGETYPE PNG while the new mapfile has rendering set up like this: IMAGETYPE PNG OUTPUTFORMAT NAME 'AGG' DRIVER AGG/PNG IMAGEMODE RGB END Adrian, you'll most likely need to write IMAGETYPE 'AGG' instead of IMAGETYPE PNG to make sure your new outputformat is used. Best regards, -- Andreas Albarello Analysis SW Development Territorium Online srl/GmbH Via Buozzi Str. 12 I 39100 Bolzano/Bozen Phone: +39 0471 068611 Fax:+39 0471 068619 email: andreas.albare...@territoriumonline.com web: http://www.territoriumonline.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] AGG vs GD rendering shows no difference
Thank you for your suggestion. I have corrected the mapfile ( added IMAGETYPE 'AGG'), however, when I try to load the map, I get a 500 web server error: [Tue Jun 16 13:43:25 2009] [error] [client 80.97.196.77] Premature end of script headers: mapserv, referer: http://terra/msmap/testmap.pl It seems to me that mapserv dies and doesn't output any headers back. How could I find out the error message? I already have a log statement in my WEB section: LOG /var/www/html/map.log (the file is writable by apache) Unfortunately I don't get anything in this log. My mapserver supports: [r...@terra html]# /var/www/cgi-bin/mapserv -v MapServer version 5.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=MYGIS INPUT=SHAPEFILE Any ideas how to debug this? Thanks Andreas Albarello wrote: Adrian Popa wrote: The original mapfile had rendering set up like this: IMAGETYPE PNG while the new mapfile has rendering set up like this: IMAGETYPE PNG OUTPUTFORMAT NAME 'AGG' DRIVER AGG/PNG IMAGEMODE RGB END Adrian, you'll most likely need to write IMAGETYPE 'AGG' instead of IMAGETYPE PNG to make sure your new outputformat is used. Best regards, ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] AGG vs GD rendering shows no difference
On Tue, 16 Jun 2009 20:58:22 +1000, Adrian Popa adrian_gh.p...@romtelecom.ro wrote: Thank you for your suggestion. I have corrected the mapfile ( added IMAGETYPE 'AGG'), however, when I try to load the map, I get a 500 web server error: [Tue Jun 16 13:43:25 2009] [error] [client 80.97.196.77] Premature end of script headers: mapserv, referer: http://terra/msmap/testmap.pl It seems to me that mapserv dies and doesn't output any headers back. How could I find out the error message? The first place to check is the web server log. HTTP errors (and 500 is one) are usually visible there. I'm guessing that mapserver has a problem parsing the map file and you can usually discover the line it is having a problem with in the web server's log. The second level of logging is: CONFIG MS_ERRORFILE path_to_mapserver.log which provides more detail, but you usually have to configure DEBUG ON (or DEBUG 1-5) as well for this to be useful. Regards, David ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] AGG vs GD rendering shows no difference
On 16 Jun 2009, at 14:25, Adrian Popa wrote: Hello David, I got the 500 errors from the http error log file. Unfortunately no additional information is provided. I added the MS_ERRORFILE and DEBUG statements to my map file and although the errorfile is created, I don't get any other information (neither when the map loads perfectly, nor when it dies with premature end of script headers. I read RFC 28 (http://mapserver.org/development/rfc/ms-rfc-28.html) and they specified that the server should be compiled with - DENABLE_STDERR_DEBUG, so I recompiled mapserver: CFLAGS=-DENABLE_STDERR_DEBUG ./configure --with-freetype --with-png --with-agg=../agg-2.5 --with-proj --with-ogr --with-gdal --with-xml2 --with-wfs --with-wcs --with-wmsclient --with-wfsclient --with- postgis --with-threads --with-sos --with-mygis --with-geos --with-tiff I used the new binary and unfortunately nothing changed :( My (relevant part of the) mapfile looks like this: MAP CONFIG MS_ERRORFILE /tmp/mapserver.log CONFIG MS_DEBUGLEVEL 5 DEBUG 5... END What else can I try? Try to bypass the webserver/CGI stuff and launch shp2img directly from the shell, that should hopefully yield some better output: shp2img -o test.png -m mapfile.map If you haven't already done so in your mapfile, you might need to add an image size (-s 500 500) and/or an extent (-e minx miny maxx maxy) to the above command line options. Best regards, -- Andreas Albarello Analysis SW Development Territorium Online srl/GmbH Via Buozzi/Buozzistraße 12 - I 39100 Bolzano/Bozen email: andreas.albare...@territoriumonline.com web: www.territoriumonline.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] AGG vs GD rendering shows no difference
Thank you for your suggestion Andreas, I have run shp2img and unfortunately: [r...@terra tmp]# shp2img -o /tmp/out.png -m /var/www/html/msmap/dynamicmaps/fibUaBrx.map -e 20.258 43.16 29.703 49.2016 -s 1250 800 -l GranitaJudete Judete Urban Rural RuralSate buildings fibra fiber-common fiber-STM64 fiber-STM16 fiber-STM4 fiber-STM1 fiber-problems-main fiber-problems-related fibraProblems *Segmentation fault* Running the command through strace, it ends up like this: read(4, h\376\237\224O\320;@p\225\4\25\'x...@\264d\270^\320;@\26..., 45056) = 45056 read(4, \303\362oU\36\206;@by\237\354...@\34\271\214\333\37\206..., 4096) = 4096 _llseek(9, 12288, [12288], SEEK_SET)= 0 read(9, ..., 4096) = 148 _llseek(4, 1458176, [1458176], SEEK_SET) = 0 read(4, \25\327\377\332\27\...@\30\256\23v9|;@\233M%\235\372\22..., 24576) = 24576 read(4, a\1$\203\...@.\245\211px ;@\314\353\330\355\242\...@\367..., 4096) = 1784 close(8)= 0 munmap(0xb7f36000, 4096)= 0 close(4)= 0 munmap(0xb7f38000, 4096)= 0 close(9)= 0 munmap(0xb7f35000, 4096)= 0 gettimeofday({1245157506, 462482}, NULL) = 0 gettimeofday({1245157506, 462600}, NULL) = 0 open(/etc/localtime, O_RDONLY)= 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=798, ...}) = 0 fstat64(4, {st_mode=S_IFREG|0644, st_size=798, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f38000 read(4, TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0..., 4096) = 798 close(4)= 0 munmap(0xb7f38000, 4096)= 0 gettimeofday({1245157506, 463468}, NULL) = 0 gettimeofday({1245157506, 463535}, NULL) = 0 gettimeofday({1245157506, 463599}, NULL) = 0 gettimeofday({1245157506, 463664}, NULL) = 0 gettimeofday({1245157506, 463734}, NULL) = 0 gettimeofday({1245157506, 463802}, NULL) = 0 gettimeofday({1245157506, 463866}, NULL) = 0 gettimeofday({1245157506, 463934}, NULL) = 0 gettimeofday({1245157506, 464028}, NULL) = 0 *open(/var/www/html/msmap/dynamicmaps/../data/Judete.shp, O_RDONLY|O_LARGEFILE) = 4* open(/var/www/html/msmap/dynamicmaps/../data/Judete.shx, O_RDONLY|O_LARGEFILE) = 8 fstat64(4, {st_mode=S_IFREG|0555, st_size=1484536, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f38000 *read(4*, \0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\vS|..., 4096) = 4096 fstat64(8, {st_mode=S_IFREG|0555, st_size=436, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f36000 read(8, \0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 4096) = 436 open(/var/www/html/msmap/dynamicmaps/../data/Judete.dbf, O_RDONLY|O_LARGEFILE) = 9 fstat64(9, {st_mode=S_IFREG|0555, st_size=12436, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f35000 read(9, \3k\6\24*\0\0\0\201\0%\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 4096) = 4096 _llseek(9, 0, [0], SEEK_SET)= 0 read(9, \3k\6\24*\0\0\0\201\0%\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 4096) = 4096 _llseek(8, 0, [0], SEEK_SET)= 0 read(8, \0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0..., 4096) = 436 read(8, , 4096) = 0 _llseek(4, 0, [0], SEEK_SET)= 0 *read(4*, \0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\vS|..., 4096) = 4096 *read(4,* \...@by\233\300\226bg@\342\376\n\341\34...@\266mo\267\241..., 49152) = 49152 *read(4,* ]\3...@\34\21\376\224 +...@g\245\\8\247\3356@6\277\213.\f..., 4096) = 4096 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ Process 20970 detached I'm not sure if it faults because it can't read from file handler 4 (Judete.shp), or if it's something else... I also tried by not specifying Judete in the layer list, but it still dies (while reading Judete.shp!). I will look further into problems with AGG (because it renders fine with PNG) Thank you for your help - now I know where to look. Regards, Adrian P.S. Ideas are welcome! Andreas Albarello wrote: On 16 Jun 2009, at 14:25, Adrian Popa wrote: Hello David, I got the 500 errors from the http error log file. Unfortunately no additional information is provided. I added the MS_ERRORFILE and DEBUG statements to my map file and although the errorfile is created, I don't get any other information (neither when the map loads perfectly, nor when it dies with premature end of script headers. I read RFC 28 (http://mapserver.org/development/rfc/ms-rfc-28.html) and they specified that the server should be compiled with -DENABLE_STDERR_DEBUG, so I recompiled mapserver: CFLAGS=-DENABLE_STDERR_DEBUG ./configure --with-freetype --with-png --with-agg=../agg-2.5 --with-proj --with-ogr --with-gdal --with-xml2 --with-wfs --with-wcs --with-wmsclient --with-wfsclient
[mapserver-users] LABEL problem using CGI...
Hello guys... My layer: LAYER NAME SouthAmerica GROUP limit TYPE POLYGON STATUS default CONNECTIONTYPE POSTGIS CONNECTION x DATA x LABELITEM name CLASS COLOR 242 239 213 STYLE OUTLINECOLOR 190 190 190 WIDTH 1 END LABEL COLOR 72 72 72 TYPE TRUETYPE FONT Arial SIZE 10 ANTIALIAS TRUE POSITION AUTO PARTIALS FALSE MINDISTANCE 0 BUFFER 3 PRIORITY 1 END END END How we can see in picture (attached) the coutry´s name are repeated... Using mapscript it is not happen... I´m using Mapserver 5.4 with fastcgi... []´s attachment: map.GIF___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Problems in MS4W
Dear Friends, I have installed MS4W in XP- OS (C:\ms4w) as administrator in my machine. And Mapserver is replying No query information to decode. QUERY_STRING is set, but empty form 'http://localhost/cgi-bin/mapserv.exe?'. But when I tried to access a map file (C:\mapdata\cities.map), the mapserver gave error like msLoadMap(): Unable to access file. (C:\mapdata\cities.map) . The same file is korking in anothe machine with XP. Any suggestion is welcome. -- Phalguni Pal ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE [mapserver-users] Problems in MS4W
You should post the url you are using to access the mapfile. What do you mean by The same file is korking in anothe machine with XP? Do You mean another mapserver or just the same mapfile host on another machine? Steve Toutant, M. Sc. Analyste en géomatique Secteur environnement Direction des risques biologiques, environnementaux et occupationnels Institut national de santé publique du Québec 945, avenue Wolfe Québec, Qc G1V 5B3 Tél.: (418) 650-5115 #5281 Fax.: (418) 654-3144 steve.tout...@inspq.qc.ca http://www.inspq.qc.ca Phalguni Pal phalguni@gmail.com@lists.osgeo.org Envoyé par : mapserver-users-boun...@lists.osgeo.org 16/06/2009 11:11 AM A mapserver-users@lists.osgeo.org cc Objet [mapserver-users] Problems in MS4W Dear Friends, I have installed MS4W in XP- OS (C:\ms4w) as administrator in my machine. And Mapserver is replying No query information to decode. QUERY_STRING is set, but empty form 'http://localhost/cgi-bin/mapserv.exe?'. But when I tried to access a map file (C:\mapdata\cities.map), the mapserver gave error like msLoadMap(): Unable to access file. (C:\mapdata\cities.map) . The same file is korking in anothe machine with XP. Any suggestion is welcome. -- Phalguni Pal ___ 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
Re: [mapserver-users] LABEL problem using CGI...
And this is the result of a single call to the CGI with mode=map? MapServer doesn't just invent label placements like this and there should be no difference between a single image with mode=map or a single call to a mapObj's draw() method. Looks to me as if you sample image is the result of merging tiled images created from multiple calls to the CGI. Steve On 6/16/2009 at 9:06 AM, in message 33fad6880906160706k5725608dh98ea6887aa82b...@mail.gmail.com, Paul james paulj...@gmail.com wrote: Hello guys... My layer: LAYER NAME SouthAmerica GROUP limit TYPE POLYGON STATUS default CONNECTIONTYPE POSTGIS CONNECTION x DATA x LABELITEM name CLASS COLOR 242 239 213 STYLE OUTLINECOLOR 190 190 190 WIDTH 1 END LABEL COLOR 72 72 72 TYPE TRUETYPE FONT Arial SIZE 10 ANTIALIAS TRUE POSITION AUTO PARTIALS FALSE MINDISTANCE 0 BUFFER 3 PRIORITY 1 END END END How we can see in picture (attached) the coutrýs name are repeated... Using mapscript it is not happen... Ím using Mapserver 5.4 with fastcgi... []́s ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] MS 5.4.1 Build problems on Windows
Hi all, This is my first time trying to build mapserver under Windows and it is dying in the regex-0.12 source with the the errors below. Any thoughts on how to resolved this? Thanks, -Steve W. cl /nologo /Ox /MD /W3 /EHsc -Ic:\projects\mapserver\..\gdwin32 -Ic :\projects\mapserver\..\proj-4.6.1/src -Ic:\projects\mapserver\..\regex-0.12 -Ic:\projects\mapserver\..\postgresql-8.3.7/src/interfaces/libpq -Ic:\project s\mapserver\..\postgresql-8.3.7/src/include -Ic:\projects\mapserver\..\z lib-1.2.3-Ic:\projects\mapserver\..\libpng-1.2.8 -DHAVE_STRING_H -DREGEX_MA LLOC -DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRLCAT -DNEED_STRRSTR -DNEED_S TRCASESTR -DUSE_POSTGIS -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_GD_PNG -DUSE_GD_JP EG -DUSE_GD_WBMP -DUSE_GD_GIF -DGD_HAS_GDIMAGEGIFPTR -DUSE_GD_FT -DGD_HAS_GETBIT MAPFONT -DGD_HAS_FTEX_XSHOW -DUSE_THREAD-DIGNORE_MISSING_DATA -DUSE_GD_ANTIALIAS -DWIN32 -D_WIN32 /c c:\projects\mapserver\..\r egex-0.12\regex.c /Foc:\projects\mapserver\..\regex-0.12\regex.obj regex.c [snip lots of warnings] c:\projects\mapserver\..\regex-0.12\regex.c(4877) : warning C4996: 'errcode': Th is name was supported during some Whidbey pre-releases. Instead, use the standar d name errno_t. C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\crtdefs.h(548) : see declaration of 'errcode' c:\projects\mapserver\..\regex-0.12\regex.c(4877) : error C2081: 'preg' : name i n formal parameter list illegal c:\projects\mapserver\..\regex-0.12\regex.c(4877) : error C2081: 'errbuf' : name in formal parameter list illegal c:\projects\mapserver\..\regex-0.12\regex.c(4877) : error C2081: 'errbuf_size' : name in formal parameter list illegal c:\projects\mapserver\..\regex-0.12\regex.c(4878) : error C2055: expected formal parameter list, not a type list c:\projects\mapserver\..\regex-0.12\regex.c(4878) : error C2082: redefinition of formal parameter 'errcode' c:\projects\mapserver\..\regex-0.12\regex.c(4886) : warning C4996: 'errcode': Th is name was supported during some Whidbey pre-releases. Instead, use the standar d name errno_t. C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\crtdefs.h(548) : see declaration of 'errcode' c:\projects\mapserver\..\regex-0.12\regex.c(4886) : error C2059: syntax error : 'type' c:\projects\mapserver\..\regex-0.12\regex.c(4894) : error C2275: 'errcode' : ill egal use of this type as an expression C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\crtdefs.h(548) : see declaration of 'errcode' c:\projects\mapserver\..\regex-0.12\regex.c(4911) : warning C4996: 'strcpy': Thi s function or variable may be unsafe. Consider using strcpy_s instead. To disabl e deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. NMAKE : fatal error U1077: 'C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN \cl.EXE' : return code '0x2' Stop. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users