[mapserver-users] Re: passing values to mapfile
Any one have any idea about this? I tried the simplest example, and it didn't work as well. CLASS CLASSITEM 'SUBURB' EXPRESSION '%expression%' # it will work if I just write 'REDFERN' ... END then ...expression=REDFERN... Help me. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6815018.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] Re: passing values to mapfile
I think I found out the problem. It seems not see the value in the url at all. Because if I give it a default value. The default value will work. But I still don't know why and how to solve it. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6815106.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] Re: Mapserver 6 WMS / PostGIS Problem
Hi I have the same problem. Did you find any solution? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS-Problem-tp6387007p6815163.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] problem with mercator projection
Hello ! I am trying to serve an image in Mercator projection (EPSG:3395) with an extent larger than 360° in longitude but I get a truncated and reversed in longitude image. Do I make a mistake somewhere? Thanks for your help The mapfile content and the gdalinfo output on the original image are given below. Mapserver version: 6.0.1 Call to mapserver: /path/to/mapserv -nh QUERY_STRING=map=/tmp/world. mapservice=wmsLAYERS=countriesFORMAT=image/pngSERVICE=WMSVERSION=1.3.0REQUEST=GetMapSTYLES=SRS=epsg:3395BBOX=-26080550.098232,-1500,26080550.098232,1500WIDTH=885HEIGHT=509 foo.png Content of the mapfile: MAP EXTENT -180 -90 180 90 IMAGECOLOR 255 255 255 IMAGETYPE agg STATUS ON OUTPUTFORMAT NAME agg MIMETYPE image/png DRIVER AGG/PNG EXTENSION png IMAGEMODE RGBA TRANSPARENT TRUE FORMATOPTION INTERLACE=false END PROJECTION init=epsg:4326 END WEB METADATA wms_srsepsg:4326 epsg:3395 epsg:900913 epsg:3995 OWS_ENABLE_REQUEST* END END LAYER DATA /tmp/world.tif NAME countries PROJECTION init=epsg:4326 END STATUS ON TYPE RASTER END END Output of gdalinfo command: $ gdalinfo /tmp/world.tif Driver: GTiff/GeoTIFF Files: /tmp/world.tif Size is 1000, 500 Coordinate System is: GEOGCS[WGS 84, DATUM[WGS_1984, SPHEROID[WGS 84,6378137,298.257223563, AUTHORITY[EPSG,7030]], AUTHORITY[EPSG,6326]], PRIMEM[Greenwich,0], UNIT[degree,0.0174532925199433], AUTHORITY[EPSG,4326]] Origin = (-180.000,90.000) Pixel Size = (0.360,-0.360) Metadata: TIFFTAG_DOCUMENTNAME=/tmp/world.tif TIFFTAG_XRESOLUTION=72 TIFFTAG_YRESOLUTION=72 TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left (-180.000, 90.000) (180d 0'0.00W, 90d 0'0.00N) Lower Left (-180.000, -90.000) (180d 0'0.00W, 90d 0'0.00S) Upper Right ( 180.000, 90.000) (180d 0'0.00E, 90d 0'0.00N) Lower Right ( 180.000, -90.000) (180d 0'0.00E, 90d 0'0.00S) Center ( 0.000, 0.000) ( 0d 0'0.01E, 0d 0'0.01N) Band 1 Block=1000x8 Type=Byte, ColorInterp=Gray ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Re: passing values to mapfile
http://mapserver.org/mapfile/class.html?highlight=validation You need to set up a validation block with an expression that will match the value of the variable that you are passing through the GET request. David. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of jjwang Sent: Wednesday, September 21, 2011 2:17 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Re: passing values to mapfile I think I found out the problem. It seems not see the value in the url at all. Because if I give it a default value. The default value will work. But I still don't know why and how to solve it. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6815106.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 mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem
Unfortunately not. I tried using the debugging tools available, but because the cgi just hangs, there are no errors reported. I tried a fresh install, with the same problem. Beyond that, I haven't had time to look into it any further. I'm still running 5.6 as a result. Rob -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of anddreas2 Sent: September-21-11 1:39 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem Hi I have the same problem. Did you find any solution? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS-Problem-tp6387007p6815163.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 mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Looking for information on SHPXY, specifically an example of a LINE IMAGEMAP template.
All, Some more info on the topic, I see now that my first question was phrased wrongly, I actaully need more information about how SHPXY works against (POLY)LINE features (vs POLYGONS): Using this slightly modified version of the SHPXY call (removed the px from the end of the buffer coords=[shpxy cs= xf=, proj=image buffer=20] The output looks like: coords=0,950 0,0 879,0 879,950 (coincidentally mapsize=880 952 for the call) Much smaller list than below (but it now includes almost the complete image). I also think that an imagemaop needs to have the first and last coordinate pairs be the same in order to close the same (which is correct below) coords=[shpxy cs= xf=, proj=image buffer=20px] coords=442,455 441,455 440,455 439,455 438,455 437,456 436,456 435,456 434,457 433,457 432,458 431,458 430,459 429,460 428,460 428,461 427,462 426,463 426,463 425,464 425,465 424,466 424,467 423,468 423,469 423,470 422,471 422,472 422,473 422,474 422,475 422,476 422,477 422,478 422,479 423,480 423,481 423,482 424,483 424,484 425,485 425,486 426,487 427,488 427,489 428,489 429,490 430,491 430,491 431,492 432,492 433,493 434,493 435,494 436,494 437,494 438,495 439,495 440,495 441,495 442,495 879,490 880,490 881,490 882,490 883,490 884,489 885,489 886,489 887,488 888,488 889,487 890,487 891,486 892,485 893,485 893,484 894,483 895,482 895,482 896,481 896,480 897,479 897,478 898,477 898,476 898,475 899,474 899,473 899,472 899,471 899,470 899,469 899,468 899,467 899,466 898,465 898,464 898,463 897,462 897,461 896,460 896,459 895,458 894,457 894,456 893,456 892,455 891,454 891,454 890,453 889,453 888,452 887,452 886,451 885,451 884,451 883,450 882,450 881,450 880,450 879,450 442,455 See attached for image from above examples. I couldn't find any documentation anywhere about these unit options like px. So what's the deal with this unit inclusion changing the output, and why are so many numbers required to imagemap a straight line? Is this related to incrementally going around a corner or curved object or ??? Still working it . . . bobb Bob Basques bob.basq...@ci.stpaul.mn.us wrote: All, Should I be using POLY as the type for LINE imagemaps? This works most of the time: class=Sewers shape=poly coords=[shpxy cs= xf=, proj=image buffer=20px] Also, related to precision, is there a weeding option of some sort? A typical output from above looks like (really a LINE feature), notice the same points being written out: class=Sewers shape=poly coords=816,525 816,514 815,504 814,494 812,483 810,473 807,463 803,453 799,443 795,434 790,425 785,416 779,407 773,399 766,391 759,383 751,376 743,369 735,362 727,356 718,351 708,346 699,341 689,337 680,333 670,330 659,328 649,326 639,324 628,323 618,323 607,323 597,324 587,325 576,327 566,329 556,332 546,336 536,340 527,344 518,349 509,354 500,360 492,366 484,373 476,380 469,388 462,396 455,404 449,412 444,421 439,431 434,440 430,450 426,459 423,469 421,480 419,490 417,500 416,511 416,521 415,627 415,638 416,648 417,658 419,669 421,679 424,689 428,699 432,709 436,718 441,727 446,736 452,745 458,753 465,761 472,769 480,776 488,783 496,790 504,796 513,801 523,806 532,811 542,815 551,819 561,822 572,824 582,826 592,828 603,829 613,829 624,829 634,828 644,827 655,825 665,823 675,820 685,816 695,812 704,808 713,803 722,798 731,792 739,786 747,779 755,772 762,764 769,756 776,748 782,740 787,731 792,721 797,712 801,702 805,693 808,683 810,672 812,662 814,652 815,641 815,631 816,525 . . . but not all of the time, seems to get confused from time to time in how the imagemap is drawn. The above imagemap is for a two point line feature for example. bobb attachment: SANITARY.map.png___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] efficiently displaying daily changing vector data
Puneet, 1. If the incoming CSV format and content is consistent then using OGR would likely be OK. If you need to modify the values to make it acceptable to Mapserver (e.g. change your angles from Heading (clockwise, north is 0) to standard angles (counter-clockwise, + x axis is 0), the PostGIS would be a better solution. Note that RFC 64 may solve the heading angle problem by allowing you to do the math in the mapfile, but I haven't tried it. Also you may want to test both CSV/OGR and PostGIS solutions for performance reasons. 2. There are a couple of vector( Type vector, not TrueType) arrow symbols described at the bottom of http://mapserver.org/mapfile/symbology/construction.html Best Regards, Brent Fraser On 9/20/2011 10:57 PM, Mr. Puneet Kishor wrote: I have just finished reading the following thread Mapserver - User - How to display vector symbols (direction and magnitude) in MapServer? http://osgeo-org.1803224.n2.nabble.com/How-to-display-vector-symbols-direction-and-magnitude-in-MapServer-td1971531.html Two questions -- 1. What is the most efficient way to display vector data that comes to me on a daily basis as text files. I have x,y, length and angle information in these text files (along with some other info). I guess, I will have to massage the files to convert them to clean CSV with only the first line containing the column names. Then I can access the file as an OGRVRTDataSource. Or, should I insert the data in a Pg table and then use that? The files will be refreshed daily, so the processing needs to be done only once a day. 2. The thread above makes a mention of a Mapfile CLASS definition like so CLASS SYMBOL 'arrow' ANGLE [Rate] SIZE [Az] COLOR 0 0 0 END Is there an arrow symbol definition that I can use, or is that only possible with truetype fonts?___ 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
[mapserver-users] python mapscript error
Hi everybody, I'm starting to use python mapscript to create web services, but I have a problem when I try to create a new layer. I saw this [0] thread, and I try to apply the patch but it didn't work. I'm running svn version of branches 6 on a Ubuntu OS lucadelu@giswks001:~/compilati/mapserver6-0/mapserver/mapscript/python$ python Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] on linux2 Type help, copyright, credits or license for more information. import mapscript map = mapscript.mapObj( ) map.name = Orthophoto Merano map.setSize(250, 250) 1 map.setExtent(11.134999, 46.617079, 11.212800, 46.692624) 0 map.imagecolor.setRGB(255, 255, 255) 0 map.units = mapscript.MS_DD layer = mapscript.layerObj() Traceback (most recent call last): File stdin, line 1, in module File mapscript.py, line 807, in __init__ if args and len(args)!=0: NameError: global name 'args' is not defined layer = mapscript.layerObj(map) Traceback (most recent call last): File stdin, line 1, in module File mapscript.py, line 807, in __init__ if args and len(args)!=0: NameError: global name 'args' is not defined [0] http://gis.stackexchange.com/questions/8735/using-mapscript-to-create-a-mapfile-from-scratch -- thanks Luca http://gis.cri.fmach.it/delucchi/ www.lucadelu.org ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem
Does avoiding the WMS/OWS side and doing a CGI request using 'mode=map' produce a different result? P. On Wed, Sep 21, 2011 at 7:27 AM, Rob McCulley rmccul...@county24.com wrote: Unfortunately not. I tried using the debugging tools available, but because the cgi just hangs, there are no errors reported. I tried a fresh install, with the same problem. Beyond that, I haven't had time to look into it any further. I'm still running 5.6 as a result. Rob -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of anddreas2 Sent: September-21-11 1:39 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem Hi I have the same problem. Did you find any solution? -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS-Problem-tp6387007p6815163.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 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
[mapserver-users] Re: passing values to mapfile
Exactly right. Thank you so much. I thought it's not compulsory. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6818235.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] Limits on CLASS EXPRESSIONS for regular expressions
If I'm not mistaken, mapserver uses regex, which has a smaller featureset than perl's regular expressions. Using pcre instead of regex inside mapserver might solve your problem. -- thomas On Wed, Sep 21, 2011 at 06:29, Stephen Woodbridge wood...@swoodbridge.com wrote: Does anyone know if/what restrictions we have on regular expressions within mapserver. I have a perl regular expression that matches 44 of 120 counties in Kentucky: EXPRESSION /(?-xism:(?i:(?=[abcfghjlmnorstw])(?:b(?:o(?:y(?:d|le)|urbon)|u(?:llitt|tler)|(?:arr|rack)en)|c(?:a(?:rter|sey)|(?:hristia|rittende)n|lark)|f(?:ayette|leming|ulton)|h(?:a(?:ncock|rt)|enderson)|l(?:e(?:tcher|wis)|(?:incol|oga|yo)n)|m(?:a(?:di)?son|e(?:rcer|tcalfe)|o(?:ntgomery|rgan)|ccracken|uhlenberg)|s(?:helby|impson|pencer)|t(?:aylor|odd)|w(?:ayne|oodford)|adair|grant|johnson|nicholas|oldham|russell)))/ This has been optimized and uses some embedded modifiers. This works fine in Perl but does not match anything in mapserver. Any thoughts on how to modify this to work with mapserver. While this looks very convoluted, it is generated from a list of words and is high efficient when matching. Thoughts? -Steve W PS: Using 5.6.x at the moment. ___ 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] Limits on CLASS EXPRESSIONS for regular expressions
Thanks Thomas, That would explain it. I thought that we had converted to pcre in mapserver, but I must have been mistaken. I solved it by changing the expressions to /word1|word2|.../ style of list. Perl has a very cool module Regexp::List that lets you take a list of words and creates an optimized regexp that will recognize any word in the list and reject anything not in the list. I use it for other stuff and thought I had used it with mapserver but that was probably not the case, now that you point this out. Back to the salt mines ... -Steve On 9/21/2011 8:46 PM, thomas bonfort wrote: If I'm not mistaken, mapserver uses regex, which has a smaller featureset than perl's regular expressions. Using pcre instead of regex inside mapserver might solve your problem. -- thomas On Wed, Sep 21, 2011 at 06:29, Stephen Woodbridge wood...@swoodbridge.com wrote: Does anyone know if/what restrictions we have on regular expressions within mapserver. I have a perl regular expression that matches 44 of 120 counties in Kentucky: EXPRESSION /(?-xism:(?i:(?=[abcfghjlmnorstw])(?:b(?:o(?:y(?:d|le)|urbon)|u(?:llitt|tler)|(?:arr|rack)en)|c(?:a(?:rter|sey)|(?:hristia|rittende)n|lark)|f(?:ayette|leming|ulton)|h(?:a(?:ncock|rt)|enderson)|l(?:e(?:tcher|wis)|(?:incol|oga|yo)n)|m(?:a(?:di)?son|e(?:rcer|tcalfe)|o(?:ntgomery|rgan)|ccracken|uhlenberg)|s(?:helby|impson|pencer)|t(?:aylor|odd)|w(?:ayne|oodford)|adair|grant|johnson|nicholas|oldham|russell)))/ This has been optimized and uses some embedded modifiers. This works fine in Perl but does not match anything in mapserver. Any thoughts on how to modify this to work with mapserver. While this looks very convoluted, it is generated from a list of words and is high efficient when matching. Thoughts? -Steve W PS: Using 5.6.x at the moment. ___ 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] Text outline not working on line features
The GD driver does not support the OUTLINEWIDTH keyword on labels, but you should see a hard 1-pixel outline be applied to the text. -- thomas On Tue, Sep 20, 2011 at 22:56, Bistrais, Bob bob.bistr...@maine.gov wrote: This is an older version of MapServer, MS4W 2.3.1, MapServer 5.2.1. Using a global file with the outputformat params: OUTPUTFORMAT NAME 'agg/png' DRIVER AGG/PNG IMAGEMODE RGBA FORMATOPTION TRANSPARENT=TRUE END OUTPUTFORMAT NAME 'print' DRIVER GD/GIF MIMETYPE image/gif IMAGEMODE PC256 EXTENSION gif TRANSPARENT ON END -So we're going to gif on the printout. Not sure what you meant by label output. But here's what I see- on the web application, the labels are as they should be- they have the background halo. On the printed map, the label text itself appears, but no background halo. Yes, I'm absolutely sure that's the code being used in the .map file. -Original Message- From: Stephen Woodbridge [mailto:wood...@swoodbridge.com] Sent: Tuesday, September 20, 2011 1:49 PM To: mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] Text outline not working on line features Bob, Also, what are you getting for label output in you case? More info would help diagnose this. Thanks, -Steve W On 9/20/2011 1:47 PM, thomas bonfort wrote: what mapserver version, what outputformat? regardless, it should work with any version, are you sure that this is the actual mapfile snippet that is being used ? -- thomas On Tue, Sep 20, 2011 at 18:45, Bistrais, Bobbob.bistr...@maine.gov wrote: I'm trying to draw and label road features from a shapefile. I'd like to include an outline of the road name text as a halo. This works fine on polygon and point features, but is not working for me with the line features. Here is the code block: LABEL ANGLE auto PARTIALS false FORCE false MINDISTANCE 250 POSITION uc COLOR 200 0 0 OUTLINECOLOR 255 255 255 OUTLINEWIDTH 5 FONT verdana SIZE 12 TYPE truetype END TEXT ([RDNAME]) ___ 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 ___ 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
[mapserver-users] little whiskers on my arrows
I have a simple arrowhead defined like soSTYLE SYMBOL 'horiz-line' ANGLE [Az] SIZE [Rate] COLOR 255 255 255 WIDTH 1ENDSTYLE ANGLE [Az] GEOMTRANSFORM "end" SYMBOL "to" COLOR 255 255 255 WIDTH 8ENDSYMBOL NAME "horiz-line" TYPE vector POINTS0 01 0 ENDENDSYMBOL NAME "to" TYPE vector POINTS0 01 0.50 1 ENDENDI have attached two images: arr.png and arr_zoom.png. They show the problem. My arrows have little whiskers coming out from behind the arrowhead. How can I get a clean symbol?Puneet.___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: Mapserver 6 WMS / PostGIS Problem
I found the solution: Just set THE wms_extent METADATA in the layer section and it works. Without Layers wms_extent it crashes. (Jesus, I spent three days of my life for this stupid thing. I tested with all versions of postgis (1.5, 1.4) postgresql (8.4,9.0,9.1). I am think it is ms4w problem). -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Mapserver-6-WMS-PostGIS-Problem-tp6387007p6819004.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