[mapserver-users] How can i get an attribute value of a specific shape in the mapfile?

2011-09-20 Thread jjwang
Is there any way to get an attribute value of a specific shape in the
mapfile?
For example:
I want to know the value of the attribute 'AREA' of a shape whose 'NAME' is
'REDFERN'.
So that I can use it in the EXPRESSION like this:
CLASS
 EXPRESSION ([AREA] > [the area value of shape whose name is 'redfern'])
 ...
END

JJ

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/How-can-i-get-an-attribute-value-of-a-specific-shape-in-the-mapfile-tp6815042p6815042.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

2011-09-20 Thread jjwang
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

2011-09-20 Thread jjwang
Thank you so much.
I'm just looking into it.
It says 'You can use runtime substitutions to change values within a FILTER
as you go'.
Can do it within a EXPRESSION?
Cause I was trying to do the substitution within a EXPRESSION.
But it seems not work. (no error)
What I did is:
EXPRESSION ([AREA] > %grade%)
then ...&grade=1000&...

Or I can only substitute the whole expression statement?
I tried:
EXPRESSION %expression%
then &expression=([AREA]>1000)&...
But I got an error message 'getSymbol(): Symbol definition error. Parsing
error near (%):(line 27)'



--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6814960.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] efficiently displaying daily changing vector data

2011-09-20 Thread Mr. Puneet Kishor
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


Re: [mapserver-users] passing values to mapfile

2011-09-20 Thread Stephen Woodbridge

On 9/21/2011 12:36 AM, jjwang wrote:

Is there any way to pass values to mapfile from the query string without
using mapscript.
What I want is:
In my mapfile, I defined some classes, the expression is comparing an
attribute with a value. But the value is not predefined. It's defined at the
client side. So I want to know is there any way to pass a value from client
side into the mapfile.
for example:
CLASS
  EXPRESSION ([Area]>  X)
END

I want this X to be a value comes from client side (JS-Openlayers).

Is this possible?


Yes!

http://mapserver.org/cgi/runsub.html
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] passing values to mapfile

2011-09-20 Thread jjwang
Is there any way to pass values to mapfile from the query string without
using mapscript.
What I want is:
In my mapfile, I defined some classes, the expression is comparing an
attribute with a value. But the value is not predefined. It's defined at the
client side. So I want to know is there any way to pass a value from client
side into the mapfile.
for example:
CLASS
 EXPRESSION ([Area] > X)
END

I want this X to be a value comes from client side (JS-Openlayers).

Is this possible?

JJ

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/passing-values-to-mapfile-tp6814838p6814838.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] Limits on CLASS EXPRESSIONS for regular expressions

2011-09-20 Thread Stephen Woodbridge
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] MapServer Map Files and GeoTools

2011-09-20 Thread Tim Heuer
Hi All,
Was great to see some of you at Foss4G. As you might know, I'm a committer on 
the MapFish print module and am really interested in excelling the development 
of that. Hopefully I can get some time to do so. To get to the point:
We use MapServer as our main WMS to build our caches and for printing maps. 
Currently an SVG is downloaded by the print module and then rendered onto a 
Graphics2D object inside the module and then rendered onto a PDF document with 
iTextPDF. We would like to make this process a bit slicker and render from 
PostGIS directly with the help of the style defined inside the map files. An 
idea inspired by Jesse Eichar was that we use GeoTools and include it as a 
dependency to do the heavy work for us. But does this mean we would need to 
implement parsing the map files somehow or is there already functionality for 
that inside GeoTools?
I found this on the MapServer docs (sorry for the HTML email, but I thought 
it's more readable... http://mapserver.org/ogc/sld.html):
PHP/MapScript Example that Generates an SLD from a Mapfile
The following is a small script that calls the generateSLD() function to create 
an SLD for a specific layer in a mapfile:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

getLayerByName("parcel");

// force visibilty of the layer
$oLayer->set('status', MS_ON);

// generate the sld for that layer
$SLD = $oLayer->generateSLD();

// save sld to a file
$fp = fopen("parcel-sld.xml", "a");
fputs( $fp, $SLD );
fclose($fp);

?>

Is there a way to use this functionality with GeoTools or another Java library?
Thoughts are appreciated.

Cheers,
Tim


Please consider the environment before printing this email
Warning: This electronic message together with any attachments is confidential. 
If you receive it in error: (i) you must not read, use, disclose, copy or 
retain it; (ii) please contact the sender immediately by reply email and then 
delete the emails.
The views expressed in this email may not be those of Landcare Research New 
Zealand Limited. http://www.landcareresearch.co.nz
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Looking for information on SHPXY, specifically an example of a LINE IMAGEMAP template.

2011-09-20 Thread Bob Basques

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 
___
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

2011-09-20 Thread Bistrais, Bob
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, Bob
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


RE: [mapserver-users] RE: Image Pyramid with gdal_retile and two UTM zones

2011-09-20 Thread Fawcett, David (MPCA)
For performance, you will want the imagery pre-warped into one spatial 
reference system.  (The same SRS as your output SRS.)

I don't know if you will want the output SRS to be one of the two UTM Zones, or 
if you want to choose a different SRS.

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of aphunter
Sent: Tuesday, September 20, 2011 11:41 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] RE: Image Pyramid with gdal_retile and two UTM zones

Thanks for the reply. Would it make more sense to create two pyramids and
then show two layers at the same time in mapserver?

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6812947.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] WFS Typename behavior

2011-09-20 Thread Hawk AA
Hi,

It seems for me that by entering multiple layers in Typename, I am not
getting the same results. For instance would using Typename=Traseer give me
all of the geometries in the BBOX, but Typename=Traseer, Punkter will give
me all in Punkter, but only some geometries from Traseer. Is it supposed to
be that way? Any other way I can query a BBOX on multiple layers without
running a WFS request per layer?

 

Thanks in advance!

Hawk

___
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

2011-09-20 Thread Stephen Woodbridge

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, Bob  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


Re: [mapserver-users] Text outline not working on line features

2011-09-20 Thread thomas bonfort
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, Bob  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] Text outline not working on line features

2011-09-20 Thread Bistrais, Bob
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] RE: Image Pyramid with gdal_retile and two UTM zones

2011-09-20 Thread aphunter
Thanks for the reply. Would it make more sense to create two pyramids and
then show two layers at the same time in mapserver?

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6812947.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] Image Pyramid with gdal_retile and two UTM zones

2011-09-20 Thread Fawcett, David (MPCA)
The problem is that both images are showing up in the same UTM Zone. A quick 
glance at the gdal_retile.py doc page indicates that all of the input tiles 
need to be in the same spatial reference system.

http://www.gdal.org/gdal_retile.html

I assume that you could reproject one of your tiles into the adjacent UTM Zone 
and then run gdal_retile, but I don't know if that would cause any distortion.  

David.

-Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of aphunter
Sent: Tuesday, September 20, 2011 11:11 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Image Pyramid with gdal_retile and two UTM zones

Hello. I have a large raster mosaic and it is currently split into two zones.
UTM 10N and UTM 11N (Northern and Southern California). Currently, when I
use gdal_retile, the two zones sit next to each other. Is there some way I
can tile things so that the zones are on top of each other, and the state
looks complete?



http://osgeo-org.1803224.n2.nabble.com/file/n6812832/noalpha_m_3211401_ne_11_1_20090525_1_1.png
 

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6812832.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] Image Pyramid with gdal_retile and two UTM zones

2011-09-20 Thread aphunter
Hello. I have a large raster mosaic and it is currently split into two zones.
UTM 10N and UTM 11N (Northern and Southern California). Currently, when I
use gdal_retile, the two zones sit next to each other. Is there some way I
can tile things so that the zones are on top of each other, and the state
looks complete?



http://osgeo-org.1803224.n2.nabble.com/file/n6812832/noalpha_m_3211401_ne_11_1_20090525_1_1.png
 

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Image-Pyramid-with-gdal-retile-and-two-UTM-zones-tp6812832p6812832.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] mapfile config options - scan directory

2011-09-20 Thread Travis Kirstine
Hi All,

I saw Frank's GDAL performance tips presentation at FOSS4G and he
mentioned that a config option in a MS mapfile could be set to stop
GDAL from scanning for auxiliary files when using external tiling.  I
have looked around in the MS documentation and GDAL and cannot find
the option.  If this option was set would it stop GDAL from using
external worldfiles / overviews?

Regards
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users