Re: [mapserver-users] arrow head doesn't draw at the end

2011-09-28 Thread luis peinado
Hi, just trying to help.
I used some trick with arrows than maybe can help you with some variation.
I use mapserver-5.X and the way it worked for me was a LINE type layer using
a normal class (continous line) with an OVERLAYSYMBOL, using  a ">"
character.
Maybe changin some parameters like GAP may be useful to you.

This is my class on a TYPE LINE layer
CLASS
NAME "capa_tub"
 SYMBOL "continous"
SIZE 2
COLOR 6 79 167
 OVERLAYSYMBOL "arrow"
OVERLAYSIZE 30
OVERLAYCOLOR 6 79 167
END

And my continous and arrow are

SYMBOL
  NAME "arrow"
  TYPE TRUETYPE
  FONT arial
  CHARACTER '>'
  FILLED true
  ANTIALIAS true
  GAP -100
END

SYMBOL
NAME "continous"
TYPE ELLIPSE
POINTS 1 1 END
END

Hope it helps.
Lluís

2011/9/27 Puneet Kishor 

>
> On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote:
>
> > Have you seen:
> >
> >
> http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol
>
>
> Yup, seen and read it from end to end until my eyes glazed. Perhaps it is
> clear as crystal to the rest of the world, but I can't fathom anything there
> applicable to me. I am facing four problems --
>
> 1. As I mentioned below, per the docs, I am supposed to be able to declare
> "ANGLE AUTO" in my STYLE definition. That simply does not work for me. I
> *have* to declare the angle the same as the angle of the stem of the arrow
> "ANGLE [az]" in order to get arrow heads headed in the same direction as the
> arrow stems.
>
> 2. From the docs on GEOMTRANSFORM, "end: produces the last point of the
> geometry. When used with ANGLE AUTO, it can for instance be used to render
> an arrowhead." Well, no... it is *not* producing the *last point of the
> geometry* as I understand it. Instead, it is producing the middle point of
> the geometry. And it sure as as I can see is not working with ANGLE AUTO
> (see #1 above).
>
> 3. I have tried several variations on my arrow head to try shift its
> center, but I am failing to translate the information in the above document
> to be able to do it correctly.
>
> 4. Perhaps most important: the length of the arrow is varying based on
> [rate]. In other words, I want only the stem to be shorter or longer, but
> the arrow head to be the same size, and to be at the "end" of the stem
> always. In fact, there are instances in which [rate] could be equal to zero.
> In those instances I don't want any arrow to be drawn at all.
>
> *** In other words, I want an arrow stem to be as long as the varying
> [rate], and if the stem has a length greater than zero then and only then do
> I want an arrow head at the end of the stem pointing in the same direction
> as the stem. ***
>
> I even tried using a truetype font symbol, but I get no image at all but no
> error as well.
>
> I even tried using a SYMBOL of TYPE pixmap pointing to an image of an
> arrow. I realize that if I could make that work, it would still be
> unsatisfactory because as MapServer would scale my arrow image, it would
> make the attached arrow head also larger, and that would look ugly. In any
> case, I couldn't get that to work as well... no image at all, but no error
> as well.
>
> Could be my compilation of MapServer was buggy, but I didn't see any
> compilation time errors, and other than the above oddities, it works quite
> well.
>
> $./mapserv -v
> MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER
> SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE
>
> I would love to know if my *** objective *** above can be accomplished with
> MapServer. If not, I would look at other workaround. I am currently
> rendering arrows using OpenLayers vector layer... it works quite well, but
> is slow... MapServer is much faster, and could be cached, hence my desire to
> use MapServer.
>
> Thanks.
>
>
> >
> > Håvard Tveite
> >
> > On 9/27/2011 4:12 AM, Puneet Kishor wrote:
> >> My arrows look like so -->-- instead of >  with declarations like so
> >>
> >> SYMBOL
> >> NAME "vert-line"
> >> TYPE vector
> >> POINTS
> >> 0 1
> >> 0 0
> >> END
> >> END
> >>
> >>  SYMBOL
> >> NAME "up"
> >> TYPE vector
> >> POINTS
> >> 0 1
> >> 0.5 0
> >> 1 1
> >> END
> >> END
> >>
> >> CLASS
> >> STYLE
> >> SYMBOL 'vert-line'
> >> ANGLE [az]
> >> SIZE [rate]
> >> COLOR 0 0 0
> >> WIDTH 1
> >> END
> >> STYLE
> >> SYMBOL "up"
> >> ANGLE [az]
> >> SIZE 5
> >> GEOMTRANSFORM "end"
> >> COLOR 0 0 0
> >> END
> >> END
> >>
> >> But, at least the arrow heads are aligned correctly. Because, if I use
> "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown
> above, my arrows draw like so --^--. The heads are always pointed up, and
> are

Re: [mapserver-users] arrow head doesn't draw at the end

2011-09-28 Thread Havard Tveite

GEOMTRANSFORM end only works for the lines of a line layer.
Is your layer a line layer?

Håvard

On 9/27/2011 4:48 PM, Puneet Kishor wrote:


On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote:


Have you seen:

http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol



Yup, seen and read it from end to end until my eyes glazed. Perhaps it is clear 
as crystal to the rest of the world, but I can't fathom anything there 
applicable to me. I am facing four problems --

1. As I mentioned below, per the docs, I am supposed to be able to declare "ANGLE AUTO" 
in my STYLE definition. That simply does not work for me. I *have* to declare the angle the same as 
the angle of the stem of the arrow "ANGLE [az]" in order to get arrow heads headed in the 
same direction as the arrow stems.

2. From the docs on GEOMTRANSFORM, "end: produces the last point of the geometry. 
When used with ANGLE AUTO, it can for instance be used to render an arrowhead." 
Well, no... it is *not* producing the *last point of the geometry* as I understand it. 
Instead, it is producing the middle point of the geometry. And it sure as as I can see is 
not working with ANGLE AUTO (see #1 above).

3. I have tried several variations on my arrow head to try shift its center, 
but I am failing to translate the information in the above document to be able 
to do it correctly.

4. Perhaps most important: the length of the arrow is varying based on [rate]. In other 
words, I want only the stem to be shorter or longer, but the arrow head to be the same 
size, and to be at the "end" of the stem always. In fact, there are instances 
in which [rate] could be equal to zero. In those instances I don't want any arrow to be 
drawn at all.

*** In other words, I want an arrow stem to be as long as the varying [rate], 
and if the stem has a length greater than zero then and only then do I want an 
arrow head at the end of the stem pointing in the same direction as the stem. 
***

I even tried using a truetype font symbol, but I get no image at all but no 
error as well.

I even tried using a SYMBOL of TYPE pixmap pointing to an image of an arrow. I 
realize that if I could make that work, it would still be unsatisfactory 
because as MapServer would scale my arrow image, it would make the attached 
arrow head also larger, and that would look ugly. In any case, I couldn't get 
that to work as well... no image at all, but no error as well.

Could be my compilation of MapServer was buggy, but I didn't see any 
compilation time errors, and other than the above oddities, it works quite well.

$./mapserv -v
MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE

I would love to know if my *** objective *** above can be accomplished with 
MapServer. If not, I would look at other workaround. I am currently rendering 
arrows using OpenLayers vector layer... it works quite well, but is slow... 
MapServer is much faster, and could be cached, hence my desire to use MapServer.

Thanks.




Håvard Tveite

On 9/27/2011 4:12 AM, Puneet Kishor wrote:

My arrows look like so -->-- instead of >   with declarations like so

 SYMBOL
 NAME "vert-line"
 TYPE vector
 POINTS
 0 1
 0 0
 END
 END

  SYMBOL
 NAME "up"
 TYPE vector
 POINTS
 0 1
 0.5 0
 1 1
 END
 END

 CLASS
 STYLE
 SYMBOL 'vert-line'
 ANGLE [az]
 SIZE [rate]
 COLOR 0 0 0
 WIDTH 1
 END
 STYLE
 SYMBOL "up"
 ANGLE [az]
 SIZE 5
 GEOMTRANSFORM "end"
 COLOR 0 0 0
 END
 END

But, at least the arrow heads are aligned correctly. Because, if I use "ANGLE auto" as 
prescribed in the docs instead of "ANGLE [az]" as shown above, my arrows draw like so 
--^--. The heads are always pointed up, and are in the middle.

Suggestions?





--
Håvard Tveite
Department of Mathematical Sciences and Technology, UMB
Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Mapserver + NDVI styling

2011-09-28 Thread Jorge Arévalo
I'm serving a NDVI coverage via Mapserver. So, one band, float32
values, [-1.0, 1.0]. I want to display the NDVI in greyscale, and
generate a legend. I've tried 2 things:

- Create two dummy classes, just for testing:

CLASS
NAME "rojo"
EXPRESSION ([pixel] < 0.3)
STYLE
COLOR 255 0 0
END
END

CLASS
NAME "azul"
EXPRESSION ([pixel] >= 0.3)
STYLE
COLOR 0 0 255
END
END

So, my legend looks like this: http://dl.dropbox.com/u/6599273/leyenda.png

And the image, obviously, is red and blue:
http://dl.dropbox.com/u/6599273/capturas/ndvi_en_gvsig.png

But I'd like to see the image in greyscale... The I've tried the next thing

- Pre-classify values with PROCESSING "SCALE=-1.0, 1.0". I don't know
what Mapserver internally does with this processing order, but I can
see the image in greyscale:
http://dl.dropbox.com/u/6599273/capturas/ndvi_gris_en_gvsig.png

The problem is now I can't see any legend, because I've not created
any class. I'd like to see all the different levels of the grayscale
image in my legend.

How could I do it?

Many thanks in advance

-- 
Jorge Arévalo
Internet & Mobility Division, DEIMOS
jorge.arev...@deimos-space.com
http://es.linkedin.com/in/jorgearevalo80
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] arrow head doesn't draw at the end

2011-09-28 Thread Mr. Puneet Kishor

On Sep 28, 2011, at 3:11 AM, Havard Tveite wrote:

> GEOMTRANSFORM end only works for the lines of a line layer.
> Is your layer a line layer?


Sigh. No, my layer is a POINT layer. Where on this page 
[http://mapserver.org/mapfile/style.html] is it documented that GEOMTRANSFORM 
is only for LINE layers? I could be wrong, but nowhere do I see that mentioned.

In other words, is GEOMTRANSFORM simply not working at all because my layer is 
a POINT layer? That would explain why the symbol is not being produced at the 
"end" point of the symbol, even though I have specified GEOMTRANSFORM "end"

Thanks Håvard. I will lose GEOMTRANSFORM from that STYLE definition.
 
> 
> Håvard
> 
> On 9/27/2011 4:48 PM, Puneet Kishor wrote:
>> 
>> On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote:
>> 
>>> Have you seen:
>>> 
>>> http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol
>> 
>> 
>> Yup, seen and read it from end to end until my eyes glazed. Perhaps it is 
>> clear as crystal to the rest of the world, but I can't fathom anything there 
>> applicable to me. I am facing four problems --
>> 
>> 1. As I mentioned below, per the docs, I am supposed to be able to declare 
>> "ANGLE AUTO" in my STYLE definition. That simply does not work for me. I 
>> *have* to declare the angle the same as the angle of the stem of the arrow 
>> "ANGLE [az]" in order to get arrow heads headed in the same direction as the 
>> arrow stems.
>> 
>> 2. From the docs on GEOMTRANSFORM, "end: produces the last point of the 
>> geometry. When used with ANGLE AUTO, it can for instance be used to render 
>> an arrowhead." Well, no... it is *not* producing the *last point of the 
>> geometry* as I understand it. Instead, it is producing the middle point of 
>> the geometry. And it sure as as I can see is not working with ANGLE AUTO 
>> (see #1 above).
>> 
>> 3. I have tried several variations on my arrow head to try shift its center, 
>> but I am failing to translate the information in the above document to be 
>> able to do it correctly.
>> 
>> 4. Perhaps most important: the length of the arrow is varying based on 
>> [rate]. In other words, I want only the stem to be shorter or longer, but 
>> the arrow head to be the same size, and to be at the "end" of the stem 
>> always. In fact, there are instances in which [rate] could be equal to zero. 
>> In those instances I don't want any arrow to be drawn at all.
>> 
>> *** In other words, I want an arrow stem to be as long as the varying 
>> [rate], and if the stem has a length greater than zero then and only then do 
>> I want an arrow head at the end of the stem pointing in the same direction 
>> as the stem. ***
>> 
>> I even tried using a truetype font symbol, but I get no image at all but no 
>> error as well.
>> 
>> I even tried using a SYMBOL of TYPE pixmap pointing to an image of an arrow. 
>> I realize that if I could make that work, it would still be unsatisfactory 
>> because as MapServer would scale my arrow image, it would make the attached 
>> arrow head also larger, and that would look ugly. In any case, I couldn't 
>> get that to work as well... no image at all, but no error as well.
>> 
>> Could be my compilation of MapServer was buggy, but I didn't see any 
>> compilation time errors, and other than the above oddities, it works quite 
>> well.
>> 
>> $./mapserv -v
>> MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
>> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
>> SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE
>> 
>> I would love to know if my *** objective *** above can be accomplished with 
>> MapServer. If not, I would look at other workaround. I am currently 
>> rendering arrows using OpenLayers vector layer... it works quite well, but 
>> is slow... MapServer is much faster, and could be cached, hence my desire to 
>> use MapServer.
>> 
>> Thanks.
>> 
>> 
>>> 
>>> Håvard Tveite
>>> 
>>> On 9/27/2011 4:12 AM, Puneet Kishor wrote:
 My arrows look like so -->-- instead of >   with declarations like so
 
 SYMBOL
 NAME "vert-line"
 TYPE vector
 POINTS
 0 1
 0 0
 END
 END
 
  SYMBOL
 NAME "up"
 TYPE vector
 POINTS
 0 1
 0.5 0
 1 1
 END
 END
 
 CLASS
 STYLE
 SYMBOL 'vert-line'
 ANGLE [az]
 SIZE [rate]
 COLOR 0 0 0
 WIDTH 1
 END
 STYLE
 SYMBOL "up"
 ANGLE [az]
 SIZE 5
 GEOMTRANSFORM "end"
 COLOR 0 0 0
 END
 END
 
 But, at least the arrow heads are aligned correctly. Because, if I use 
 "ANGLE auto" as prescribed in the doc

Re: [mapserver-users] arrow head doesn't draw at the end

2011-09-28 Thread Mr. Puneet Kishor
Hi luis,

Thanks for helping out. I will try OVERLAYSYMBOL, but from the docs it seems it 
is no different that using two stacked symbols. I did try GAP, but that doesn't 
help at all.

As I mentioned below, I am drawing these points, not unlike the recent thread 
started by Brent on drawing wind barbs. Except, in my case, these are GPS 
sensor readings. The reading values are always 0 or more (actually, they are 
close to 0, but let's say, the really tiny ones are identifiable). The readings 
have two values... rate and azimuth.

The length of the arrows has to be drawn proportional to the rate, and arrows 
have to be pointed toward the azimuth.

First, I don't want arrows on the 0 (or, close to 0) readings but I still want 
to show them. So, I've decided I will just select them out and draw them as a 
separate layer with just dots. Easy.

Now, the ones that are to be drawn with an arrow: the problem I am facing is 
that I want the arrow head at the end of the arrow stem that is of a 
non-predictable length. Even though the docs imply that I can achieve this with 
GEOMTRANSFORM, I have failed to do so. And, of course, just now I learned that 
perhaps that could be because GEOMSTRANSFORM applies *only* to LINE layers.

Seems to me the *only* reasonable way to achieve this would be to have a 
GEOMTRANSFORM kind of capability for POINT layers as well, so that the last (or 
first or whatever... the specified) point of the symbol geometry could be 
decorated with another symbol.

I am open to all kinds of suggestions at this point.


On Sep 28, 2011, at 3:04 AM, luis peinado wrote:

> Hi, just trying to help.
> I used some trick with arrows than maybe can help you with some variation.
> I use mapserver-5.X and the way it worked for me was a LINE type layer using
> a normal class (continous line) with an OVERLAYSYMBOL, using  a ">"
> character.
> Maybe changin some parameters like GAP may be useful to you.
> 
> This is my class on a TYPE LINE layer
> CLASS
> NAME "capa_tub"
> SYMBOL "continous"
> SIZE 2
> COLOR 6 79 167
> OVERLAYSYMBOL "arrow"
> OVERLAYSIZE 30
> OVERLAYCOLOR 6 79 167
> END
> 
> And my continous and arrow are
> 
> SYMBOL
>  NAME "arrow"
>  TYPE TRUETYPE
>  FONT arial
>  CHARACTER '>'
>  FILLED true
>  ANTIALIAS true
>  GAP -100
> END
> 
> SYMBOL
> NAME "continous"
> TYPE ELLIPSE
> POINTS 1 1 END
> END
> 
> Hope it helps.
> Lluís
> 
> 2011/9/27 Puneet Kishor 
> 
>> 
>> On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote:
>> 
>>> Have you seen:
>>> 
>>> 
>> http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol
>> 
>> 
>> Yup, seen and read it from end to end until my eyes glazed. Perhaps it is
>> clear as crystal to the rest of the world, but I can't fathom anything there
>> applicable to me. I am facing four problems --
>> 
>> 1. As I mentioned below, per the docs, I am supposed to be able to declare
>> "ANGLE AUTO" in my STYLE definition. That simply does not work for me. I
>> *have* to declare the angle the same as the angle of the stem of the arrow
>> "ANGLE [az]" in order to get arrow heads headed in the same direction as the
>> arrow stems.
>> 
>> 2. From the docs on GEOMTRANSFORM, "end: produces the last point of the
>> geometry. When used with ANGLE AUTO, it can for instance be used to render
>> an arrowhead." Well, no... it is *not* producing the *last point of the
>> geometry* as I understand it. Instead, it is producing the middle point of
>> the geometry. And it sure as as I can see is not working with ANGLE AUTO
>> (see #1 above).
>> 
>> 3. I have tried several variations on my arrow head to try shift its
>> center, but I am failing to translate the information in the above document
>> to be able to do it correctly.
>> 
>> 4. Perhaps most important: the length of the arrow is varying based on
>> [rate]. In other words, I want only the stem to be shorter or longer, but
>> the arrow head to be the same size, and to be at the "end" of the stem
>> always. In fact, there are instances in which [rate] could be equal to zero.
>> In those instances I don't want any arrow to be drawn at all.
>> 
>> *** In other words, I want an arrow stem to be as long as the varying
>> [rate], and if the stem has a length greater than zero then and only then do
>> I want an arrow head at the end of the stem pointing in the same direction
>> as the stem. ***
>> 
>> I even tried using a truetype font symbol, but I get no image at all but no
>> error as well.
>> 
>> I even tried using a SYMBOL of TYPE pixmap pointing to an image of an
>> arrow. I realize that if I could make that work, it would still be
>> unsatisfactory because as MapServer would scale my arrow image, it would
>> make the attached arrow head also larger, and that would look ugly. In any
>> case, I couldn't get that to work as well... no image at all, but no error
>> as well.
>> 
>> Could be my compilation of MapServer was buggy, but I didn't see any
>> compilation time errors, and other than the above oddit

Re: [mapserver-users] arrow head doesn't draw at the end

2011-09-28 Thread thomas bonfort
On Wed, Sep 28, 2011 at 15:09, Mr. Puneet Kishor  wrote:
> Hi luis,
>
> Thanks for helping out. I will try OVERLAYSYMBOL, but from the docs it seems 
> it is no different that using two stacked symbols. I did try GAP, but that 
> doesn't help at all.
>
> As I mentioned below, I am drawing these points, not unlike the recent thread 
> started by Brent on drawing wind barbs. Except, in my case, these are GPS 
> sensor readings. The reading values are always 0 or more (actually, they are 
> close to 0, but let's say, the really tiny ones are identifiable). The 
> readings have two values... rate and azimuth.
>
> The length of the arrows has to be drawn proportional to the rate, and arrows 
> have to be pointed toward the azimuth.
>
> First, I don't want arrows on the 0 (or, close to 0) readings but I still 
> want to show them. So, I've decided I will just select them out and draw them 
> as a separate layer with just dots. Easy.
>
> Now, the ones that are to be drawn with an arrow: the problem I am facing is 
> that I want the arrow head at the end of the arrow stem that is of a 
> non-predictable length. Even though the docs imply that I can achieve this 
> with GEOMTRANSFORM, I have failed to do so. And, of course, just now I 
> learned that perhaps that could be because GEOMSTRANSFORM applies *only* to 
> LINE layers.

The docs have *never* implied that, even if you might have wanted them to.
"end: produces the last point of the geometry": the last point of a
point geometry is the point itself, which is what is happening.


>
> Seems to me the *only* reasonable way to achieve this would be to have a 
> GEOMTRANSFORM kind of capability for POINT layers as well, so that the last 
> (or first or whatever... the specified) point of the symbol geometry could be 
> decorated with another symbol.

again, geomtransform applies to the underlying feature, not the symbol
you are rendering on top of the feature. geomtransform will not help
in your case.

as paul suggested, you need to classify your data with a different
symbol depending on your [rate], and use the azimuth for the
orientation.

>
> I am open to all kinds of suggestions at this point.
>
>
> On Sep 28, 2011, at 3:04 AM, luis peinado wrote:
>
>> Hi, just trying to help.
>> I used some trick with arrows than maybe can help you with some variation.
>> I use mapserver-5.X and the way it worked for me was a LINE type layer using
>> a normal class (continous line) with an OVERLAYSYMBOL, using  a ">"
>> character.
>> Maybe changin some parameters like GAP may be useful to you.
>>
>> This is my class on a TYPE LINE layer
>> CLASS
>> NAME "capa_tub"
>> SYMBOL "continous"
>> SIZE 2
>> COLOR 6 79 167
>> OVERLAYSYMBOL "arrow"
>> OVERLAYSIZE 30
>> OVERLAYCOLOR 6 79 167
>> END
>>
>> And my continous and arrow are
>>
>> SYMBOL
>>  NAME "arrow"
>>  TYPE TRUETYPE
>>  FONT arial
>>  CHARACTER '>'
>>  FILLED true
>>  ANTIALIAS true
>>  GAP -100
>> END
>>
>> SYMBOL
>> NAME "continous"
>> TYPE ELLIPSE
>> POINTS 1 1 END
>> END
>>
>> Hope it helps.
>> Lluís
>>
>> 2011/9/27 Puneet Kishor 
>>
>>>
>>> On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote:
>>>
 Have you seen:


>>> http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol
>>>
>>>
>>> Yup, seen and read it from end to end until my eyes glazed. Perhaps it is
>>> clear as crystal to the rest of the world, but I can't fathom anything there
>>> applicable to me. I am facing four problems --
>>>
>>> 1. As I mentioned below, per the docs, I am supposed to be able to declare
>>> "ANGLE AUTO" in my STYLE definition. That simply does not work for me. I
>>> *have* to declare the angle the same as the angle of the stem of the arrow
>>> "ANGLE [az]" in order to get arrow heads headed in the same direction as the
>>> arrow stems.
>>>
>>> 2. From the docs on GEOMTRANSFORM, "end: produces the last point of the
>>> geometry. When used with ANGLE AUTO, it can for instance be used to render
>>> an arrowhead." Well, no... it is *not* producing the *last point of the
>>> geometry* as I understand it. Instead, it is producing the middle point of
>>> the geometry. And it sure as as I can see is not working with ANGLE AUTO
>>> (see #1 above).
>>>
>>> 3. I have tried several variations on my arrow head to try shift its
>>> center, but I am failing to translate the information in the above document
>>> to be able to do it correctly.
>>>
>>> 4. Perhaps most important: the length of the arrow is varying based on
>>> [rate]. In other words, I want only the stem to be shorter or longer, but
>>> the arrow head to be the same size, and to be at the "end" of the stem
>>> always. In fact, there are instances in which [rate] could be equal to zero.
>>> In those instances I don't want any arrow to be drawn at all.
>>>
>>> *** In other words, I want an arrow stem to be as long as the varying
>>> [rate], and if the stem has a length greater than zero then and only then do
>>> I want an arrow head at the end

Re: [mapserver-users] arrow head doesn't draw at the end

2011-09-28 Thread Mr. Puneet Kishor
Hi Thomas,


On Sep 28, 2011, at 8:15 AM, thomas bonfort wrote:

> On Wed, Sep 28, 2011 at 15:09, Mr. Puneet Kishor  wrote:
>> Hi luis,
>> 
>> Thanks for helping out. I will try OVERLAYSYMBOL, but from the docs it seems 
>> it is no different that using two stacked symbols. I did try GAP, but that 
>> doesn't help at all.
>> 
>> As I mentioned below, I am drawing these points, not unlike the recent 
>> thread started by Brent on drawing wind barbs. Except, in my case, these are 
>> GPS sensor readings. The reading values are always 0 or more (actually, they 
>> are close to 0, but let's say, the really tiny ones are identifiable). The 
>> readings have two values... rate and azimuth.
>> 
>> The length of the arrows has to be drawn proportional to the rate, and 
>> arrows have to be pointed toward the azimuth.
>> 
>> First, I don't want arrows on the 0 (or, close to 0) readings but I still 
>> want to show them. So, I've decided I will just select them out and draw 
>> them as a separate layer with just dots. Easy.
>> 
>> Now, the ones that are to be drawn with an arrow: the problem I am facing is 
>> that I want the arrow head at the end of the arrow stem that is of a 
>> non-predictable length. Even though the docs imply that I can achieve this 
>> with GEOMTRANSFORM, I have failed to do so. And, of course, just now I 
>> learned that perhaps that could be because GEOMSTRANSFORM applies *only* to 
>> LINE layers.
> 
> The docs have *never* implied that, even if you might have wanted them to.
> "end: produces the last point of the geometry": the last point of a
> point geometry is the point itself, which is what is happening.


Now it makes crystal clear sense. Nevertheless, consider that until as of this 
moment, I did take the docs to imply that the geometry in this case was the 
geometry of the symbol. When I say "imply," I am not accusing anyone of 
misleading. I am asserting that the way "a truth" has been stated in the 
document can and has appeared as "another truth" to someone else.

Just changing the docs to what you explained above would be fantastic.

Additionally, per Havard, GEOMTRANSFORM apparently doesn't even apply to 
POINTs. Which now makes sense, since a point geometry's start, middle and end 
are exactly the same. However, again, stating this in the docs would be super 
helpful.


> 
> 
>> 
>> Seems to me the *only* reasonable way to achieve this would be to have a 
>> GEOMTRANSFORM kind of capability for POINT layers as well, so that the last 
>> (or first or whatever... the specified) point of the symbol geometry could 
>> be decorated with another symbol.
> 
> again, geomtransform applies to the underlying feature, not the symbol
> you are rendering on top of the feature. geomtransform will not help
> in your case.
> 
> as paul suggested, you need to classify your data with a different
> symbol depending on your [rate], and use the azimuth for the
> orientation.
> 


Hmmm I am trying to figure out which "Paul" suggested "where" in this 
thread. Perhaps you are referring to the wind barb thread.

In any case, I am not sure what you mean by "classify your data with a 
different symbol depending on your [rate]." The way I am understanding that 
sentence is that I should have an actual different symbol for every different 
rate. Well, that will not only not work for me, it would defeat the purpose of 
all this automation. I have ~3000 points, each with a different rate. I can't 
possibly have 3000 symbols. Not just that, these rates change on a daily basis.

Background -- these are readings from almost 3000 stations around the world 
reporting the rates daily. I get new values on a daily basis, so every day I 
would have a different map. (actually, it is a lot more complicated than that, 
but that is a good depiction of the problem).

Many thanks again for your assistance, but I hope the above clarifies the 
issues.


>> 
>> I am open to all kinds of suggestions at this point.
>> 
>> 
>> On Sep 28, 2011, at 3:04 AM, luis peinado wrote:
>> 
>>> Hi, just trying to help.
>>> I used some trick with arrows than maybe can help you with some variation.
>>> I use mapserver-5.X and the way it worked for me was a LINE type layer using
>>> a normal class (continous line) with an OVERLAYSYMBOL, using  a ">"
>>> character.
>>> Maybe changin some parameters like GAP may be useful to you.
>>> 
>>> This is my class on a TYPE LINE layer
>>> CLASS
>>> NAME "capa_tub"
>>> SYMBOL "continous"
>>> SIZE 2
>>> COLOR 6 79 167
>>> OVERLAYSYMBOL "arrow"
>>> OVERLAYSIZE 30
>>> OVERLAYCOLOR 6 79 167
>>> END
>>> 
>>> And my continous and arrow are
>>> 
>>> SYMBOL
>>>  NAME "arrow"
>>>  TYPE TRUETYPE
>>>  FONT arial
>>>  CHARACTER '>'
>>>  FILLED true
>>>  ANTIALIAS true
>>>  GAP -100
>>> END
>>> 
>>> SYMBOL
>>> NAME "continous"
>>> TYPE ELLIPSE
>>> POINTS 1 1 END
>>> END
>>> 
>>> Hope it helps.
>>> Lluís
>>> 
>>> 2011/9/27 Puneet Kishor 
>>> 
 
 On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote:
 

RE: [mapserver-users] Using a Symbol instead of text for a label

2011-09-28 Thread Fawcett, David (MPCA)
Matt,

I haven't fully thought it through, but maybe the new Cluster functionality 
might work for this.  You could have a generic park symbol for the cluster 
symbol.

http://mapserver.org/mapfile/cluster.html

David.

From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Matt McClelland
Sent: Tuesday, September 27, 2011 6:15 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Using a Symbol instead of text for a label

Hi

I have a bunch of symbols that overlap on a map.  EG at a park where I want to 
show an symbol for playground, toilet and picnic tables.  The data for each of 
these items are individual point data items.

I would like to ask mapserver, very kindly, to 'tile' nearby symbols into a 
group
OR
Use the main symbol like a label.  So that I could have a dot where the play 
equipment is, then nearby have the symbol for the play equipment.  This is 
obviously very easy to do with text, but is it possible with a symbol??

I have tried this
   CLASS
  EXPRESSION /play|playground/
  NAME "Children's Playground"
  STYLE
SYMBOL 'waypoint'
color 255 0 0
SIZE 5
  END
  LABEL
 STYLE
  SYMBOL '/var/www/osm/kml/icons/play.png'
  Size 10
 END
 ...text styleing info
  END
   END

I get my 'waypoint' dot and the play.png in the same location.  I would like 
the play.png to be positioned AUTO like I can with text.
Any ideas??

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


Re: [mapserver-users] PHP mapscript - how to add label style

2011-09-28 Thread Carlos Ruiz
Ian,

Why don't you post your script ?

 
IC Carlos Ruiz




From: Ian Walberg 
To: mapserver-users@lists.osgeo.org
Sent: Tuesday, September 27, 2011 5:51 PM
Subject: RE: [mapserver-users] PHP mapscript - how to add label style 


We have spent some time chasing this with no success, is anyone out there using 
PHP mapscript and mapserver 6.x?
 
Thanks
 
Ian
 
 
From:mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Ian Walberg
Sent: Tuesday, September 27, 2011 8:21 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] PHP mapscript - how to add label style 
 
Hello,
 
I am sure it is staring me in the face but we cannot see how to add a style to 
a label (Mapserver 6.x) using PHP mapscript.
 
Works fine via map file and we see the open issue with the save not including 
the geotransform line.
 
What are we missing?
 
Thanks
 
Ian
___
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] arrow head doesn't draw at the end

2011-09-28 Thread Havard Tveite

With a point layer, you can fix this using the offset trick I
referred to in my earlier post:

The following works for me using Mapserver 6 (the arrow head is
centred at the point, but you can shift it using the same
technique as shown for the arrow line)

   SYMBOL
 NAME "up"
 TYPE vector
 POINTS
   0  10
   5  0
   10 10
 END
   END

   SYMBOL
 NAME "vert-line"
 TYPE vector
 POINTS
   0 5
   0 10
 END
   END

   ...
 CLASS
   STYLE
 SYMBOL "vert-line"
 ANGLE [az]
 SIZE [rate]
 COLOR 0 0 0
 WIDTH 1
   END # STYLE
   STYLE
 SYMBOL "up"
 ANGLE [az]
 SIZE 5
 WIDTH 2
 COLOR 0 0 0
   END # STYLE
 END # CLASS

In my opinion, the best thing would be to be able to specify
the "centre/origin" of the point explicitly, as suggested in
RFC45.  But this part of the RFC has not yet been implemented.

Håvard


On 9/27/2011 4:48 PM, Puneet Kishor wrote:


On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote:


Have you seen:

http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol



Yup, seen and read it from end to end until my eyes glazed. Perhaps it is clear 
as crystal to the rest of the world, but I can't fathom anything there 
applicable to me. I am facing four problems --

1. As I mentioned below, per the docs, I am supposed to be able to declare "ANGLE AUTO" 
in my STYLE definition. That simply does not work for me. I *have* to declare the angle the same as 
the angle of the stem of the arrow "ANGLE [az]" in order to get arrow heads headed in the 
same direction as the arrow stems.

2. From the docs on GEOMTRANSFORM, "end: produces the last point of the geometry. 
When used with ANGLE AUTO, it can for instance be used to render an arrowhead." 
Well, no... it is *not* producing the *last point of the geometry* as I understand it. 
Instead, it is producing the middle point of the geometry. And it sure as as I can see is 
not working with ANGLE AUTO (see #1 above).

3. I have tried several variations on my arrow head to try shift its center, 
but I am failing to translate the information in the above document to be able 
to do it correctly.

4. Perhaps most important: the length of the arrow is varying based on [rate]. In other 
words, I want only the stem to be shorter or longer, but the arrow head to be the same 
size, and to be at the "end" of the stem always. In fact, there are instances 
in which [rate] could be equal to zero. In those instances I don't want any arrow to be 
drawn at all.

*** In other words, I want an arrow stem to be as long as the varying [rate], 
and if the stem has a length greater than zero then and only then do I want an 
arrow head at the end of the stem pointing in the same direction as the stem. 
***

I even tried using a truetype font symbol, but I get no image at all but no 
error as well.

I even tried using a SYMBOL of TYPE pixmap pointing to an image of an arrow. I 
realize that if I could make that work, it would still be unsatisfactory 
because as MapServer would scale my arrow image, it would make the attached 
arrow head also larger, and that would look ugly. In any case, I couldn't get 
that to work as well... no image at all, but no error as well.

Could be my compilation of MapServer was buggy, but I didn't see any 
compilation time errors, and other than the above oddities, it works quite well.

$./mapserv -v
MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE

I would love to know if my *** objective *** above can be accomplished with 
MapServer. If not, I would look at other workaround. I am currently rendering 
arrows using OpenLayers vector layer... it works quite well, but is slow... 
MapServer is much faster, and could be cached, hence my desire to use MapServer.

Thanks.




Håvard Tveite

On 9/27/2011 4:12 AM, Puneet Kishor wrote:

My arrows look like so -->-- instead of >   with declarations like so

 SYMBOL
 NAME "vert-line"
 TYPE vector
 POINTS
 0 1
 0 0
 END
 END

  SYMBOL
 NAME "up"
 TYPE vector
 POINTS
 0 1
 0.5 0
 1 1
 END
 END

 CLASS
 STYLE
 SYMBOL 'vert-line'
 ANGLE [az]
 SIZE [rate]
 COLOR 0 0 0
 WIDTH 1
 END
 STYLE
 SYMBOL "up"
 ANGLE [az]
 SIZE 5
 GEOMTRANSFORM "end"
 COLOR 0 0 0
 END
 END

But, at least the arrow heads are aligned correctly. Because, if I use "ANGLE auto" as 
prescribed in the docs instead of "ANGLE [az]" as shown above, my arrows draw like so 
--^--. The heads are always pointed up, an

[mapserver-users] Re: Mapserver + NDVI styling

2011-09-28 Thread Jorge Arévalo
2011/9/28 Jorge Arévalo :
> I'm serving a NDVI coverage via Mapserver. So, one band, float32
> values, [-1.0, 1.0]. I want to display the NDVI in greyscale, and
> generate a legend. I've tried 2 things:
>
> - Create two dummy classes, just for testing:
>
> CLASS
>    NAME "rojo"
>    EXPRESSION ([pixel] < 0.3)
>    STYLE
>        COLOR 255 0 0
>    END
> END
>
> CLASS
>    NAME "azul"
>    EXPRESSION ([pixel] >= 0.3)
>    STYLE
>        COLOR 0 0 255
>    END
> END
>
> So, my legend looks like this: http://dl.dropbox.com/u/6599273/leyenda.png
>
> And the image, obviously, is red and blue:
> http://dl.dropbox.com/u/6599273/capturas/ndvi_en_gvsig.png
>
> But I'd like to see the image in greyscale... The I've tried the next thing
>
> - Pre-classify values with PROCESSING "SCALE=-1.0, 1.0". I don't know
> what Mapserver internally does with this processing order, but I can
> see the image in greyscale:
> http://dl.dropbox.com/u/6599273/capturas/ndvi_gris_en_gvsig.png
>
> The problem is now I can't see any legend, because I've not created
> any class. I'd like to see all the different levels of the grayscale
> image in my legend.
>
> How could I do it?
>
> Many thanks in advance
>
> --
> Jorge Arévalo
> Internet & Mobility Division, DEIMOS
> jorge.arev...@deimos-space.com
> http://es.linkedin.com/in/jorgearevalo80
> http://mobility.grupodeimos.com/
> http://gis4free.wordpress.com
> http://geohash.org/ezjqgrgzz0g
>

Ok, I've found a way, but I'm sure it isn't the shortest path.

Basically, I've generated a legend using GRASS (r.colors to add grey
color as color interpretation for band and d.legend to generate the
legend). The legend is generated from the ndvi file. So, I guess I can
create a HTML template as Mapserver legend, using the legend generated
by grass (here:
http://dl.dropbox.com/u/6599273/grass/grass_legend.png)

On the other hand, I know how to generate a legend in Mapserver using
CLASS objects in the mapfile, but I don't know how to generate that
legend without the CLASS options in the mapfile.

Am I taking the long way on this? Is there an easier way to generate a
legend for a NDVI file in Mapserver?

Many thanks in advance

-- 
Jorge Arévalo
Internet & Mobility Division, DEIMOS
jorge.arev...@deimos-space.com
http://es.linkedin.com/in/jorgearevalo80
http://mobility.grupodeimos.com/
http://gis4free.wordpress.com
http://geohash.org/ezjqgrgzz0g
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] arrow head doesn't draw at the end

2011-09-28 Thread Havard Tveite

One possible problem with my suggested approach is that the
lines will only be the half of the value given in [rate].

Håvard

On 9/28/2011 4:25 PM, Håvard Tveite wrote:

With a point layer, you can fix this using the offset trick I
referred to in my earlier post:

The following works for me using Mapserver 6 (the arrow head is
centred at the point, but you can shift it using the same
technique as shown for the arrow line)

 SYMBOL
   NAME "up"
   TYPE vector
   POINTS
 0  10
 5  0
 10 10
   END
 END

 SYMBOL
   NAME "vert-line"
   TYPE vector
   POINTS
 0 5
 0 10
   END
 END

 ...
   CLASS
 STYLE
   SYMBOL "vert-line"
   ANGLE [az]
   SIZE [rate]
   COLOR 0 0 0
   WIDTH 1
 END # STYLE
 STYLE
   SYMBOL "up"
   ANGLE [az]
   SIZE 5
   WIDTH 2
   COLOR 0 0 0
 END # STYLE
   END # CLASS

In my opinion, the best thing would be to be able to specify
the "centre/origin" of the point explicitly, as suggested in
RFC45.  But this part of the RFC has not yet been implemented.

Håvard


On 9/27/2011 4:48 PM, Puneet Kishor wrote:


On Sep 27, 2011, at 2:18 AM, Havard Tveite wrote:


Have you seen:

http://mapserver.org/mapfile/symbology/construction.html#changing-the-center-of-a-point-symbol



Yup, seen and read it from end to end until my eyes glazed. Perhaps it is clear 
as crystal to the rest of the world, but I can't fathom anything there 
applicable to me. I am facing four problems --

1. As I mentioned below, per the docs, I am supposed to be able to declare "ANGLE AUTO" 
in my STYLE definition. That simply does not work for me. I *have* to declare the angle the same as 
the angle of the stem of the arrow "ANGLE [az]" in order to get arrow heads headed in the 
same direction as the arrow stems.

2. From the docs on GEOMTRANSFORM, "end: produces the last point of the geometry. 
When used with ANGLE AUTO, it can for instance be used to render an arrowhead." 
Well, no... it is *not* producing the *last point of the geometry* as I understand it. 
Instead, it is producing the middle point of the geometry. And it sure as as I can see is 
not working with ANGLE AUTO (see #1 above).

3. I have tried several variations on my arrow head to try shift its center, 
but I am failing to translate the information in the above document to be able 
to do it correctly.

4. Perhaps most important: the length of the arrow is varying based on [rate]. In other 
words, I want only the stem to be shorter or longer, but the arrow head to be the same 
size, and to be at the "end" of the stem always. In fact, there are instances 
in which [rate] could be equal to zero. In those instances I don't want any arrow to be 
drawn at all.

*** In other words, I want an arrow stem to be as long as the varying [rate], 
and if the stem has a length greater than zero then and only then do I want an 
arrow head at the end of the stem pointing in the same direction as the stem. 
***

I even tried using a truetype font symbol, but I get no image at all but no 
error as well.

I even tried using a SYMBOL of TYPE pixmap pointing to an image of an arrow. I 
realize that if I could make that work, it would still be unsatisfactory 
because as MapServer would scale my arrow image, it would make the attached 
arrow head also larger, and that would look ugly. In any case, I couldn't get 
that to work as well... no image at all, but no error as well.

Could be my compilation of MapServer was buggy, but I didn't see any 
compilation time errors, and other than the above oddities, it works quite well.

$./mapserv -v
MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=GEOS INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE

I would love to know if my *** objective *** above can be accomplished with 
MapServer. If not, I would look at other workaround. I am currently rendering 
arrows using OpenLayers vector layer... it works quite well, but is slow... 
MapServer is much faster, and could be cached, hence my desire to use MapServer.

Thanks.




Håvard Tveite

On 9/27/2011 4:12 AM, Puneet Kishor wrote:

My arrows look like so -->-- instead of >with declarations like so

  SYMBOL
  NAME "vert-line"
  TYPE vector
  POINTS
  0 1
  0 0
  END
  END

   SYMBOL
  NAME "up"
  TYPE vector
  POINTS
  0 1
  0.5 0
  1 1
  END
  END

  CLASS
  STYLE
  SYMBOL 'vert-line'
  ANGLE [az]
  SIZE [rate]
  COLOR 0 0 0
  WIDTH 1
  END
  STYLE
  SYMBOL "up"
  ANGLE [az]
  SIZE 5
  GEOMTRANSFORM "

Re: [mapserver-users] arrow head doesn't draw at the end

2011-09-28 Thread Puneet Kishor
On Sep 28, 2011, at 8:32 AM, Mr. Puneet Kishor wrote:

> 
>> ..
>> 
>> On 9/27/2011 4:12 AM, Puneet Kishor wrote:
>>> My arrows look like so -->-- instead of >  with declarations like so
>>> 
>>>   SYMBOL
>>>   NAME "vert-line"
>>>   TYPE vector
>>>   POINTS
>>>   0 1
>>>   0 0
>>>   END
>>>   END
>>> 
>>>SYMBOL
>>>   NAME "up"
>>>   TYPE vector
>>>   POINTS
>>>   0 1
>>>   0.5 0
>>>   1 1
>>>   END
>>>   END
>>> 
>>>   CLASS
>>>   STYLE
>>>   SYMBOL 'vert-line'
>>>   ANGLE [az]
>>>   SIZE [rate]
>>>   COLOR 0 0 0
>>>   WIDTH 1
>>>   END
>>>   STYLE
>>>   SYMBOL "up"
>>>   ANGLE [az]
>>>   SIZE 5
>>>   GEOMTRANSFORM "end"
>>>   COLOR 0 0 0
>>>   END
>>>   END
>>> 
>>> But, at least the arrow heads are aligned correctly. Because, if I use
> "ANGLE auto" as prescribed in the docs instead of "ANGLE [az]" as shown
> above, my arrows draw like so --^--. The heads are always pointed up, and
> are in the middle.
>>> 
>>> Suggestions?
> 

Time to show my full hand --

- go to http://mumbai.geology.wisc.edu/geoplates/
- zoom out two clicks so the entire world is visible
- click on the round grey button with the arrow pointing NW in the top left 
  (just below the blue pan/zoom buttons)
- now click once on the map, say, on North America

The GPS readings load as arrow symbols. This is an OpenLayers vector layer, 
each point being drawn using an external graphic. The problem is speed. Not 
only does it take a perceptible time to load, when it has loaded, the entire 
map is very sluggish repainting as you pan and zoom.

Now, go to http://mumbai.geology.wisc.edu/test/gps_vecs.html where I have the 
same layer being loaded by MapServer. It is much quicker, but, most important, 
since these are images, the map is really responsive. Of course, the markers 
are no good. My style definition is as shown below.

Of course, I can use the same externalGraphic with MapServer as the one I used 
with OpenLayers. But that also doesn't produce much joy. The markers get drawn 
really tiny, for some reason.

--
Puneet Kishor___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Re: Mapserver + NDVI styling

2011-09-28 Thread Gustavo
I'm not sure but if you just display your raster without any styling i think
MapSever would show it in grayscale.

I'm new with MapServer so i'm feeling a bit insolent posting a reply :)


El 28 de septiembre de 2011 11:30, Jorge Arévalo <
jorge.arev...@deimos-space.com> escribió:

> 2011/9/28 Jorge Arévalo :
> > I'm serving a NDVI coverage via Mapserver. So, one band, float32
> > values, [-1.0, 1.0]. I want to display the NDVI in greyscale, and
> > generate a legend. I've tried 2 things:
> >
> > - Create two dummy classes, just for testing:
> >
> > CLASS
> >NAME "rojo"
> >EXPRESSION ([pixel] < 0.3)
> >STYLE
> >COLOR 255 0 0
> >END
> > END
> >
> > CLASS
> >NAME "azul"
> >EXPRESSION ([pixel] >= 0.3)
> >STYLE
> >COLOR 0 0 255
> >END
> > END
> >
> > So, my legend looks like this:
> http://dl.dropbox.com/u/6599273/leyenda.png
> >
> > And the image, obviously, is red and blue:
> > http://dl.dropbox.com/u/6599273/capturas/ndvi_en_gvsig.png
> >
> > But I'd like to see the image in greyscale... The I've tried the next
> thing
> >
> > - Pre-classify values with PROCESSING "SCALE=-1.0, 1.0". I don't know
> > what Mapserver internally does with this processing order, but I can
> > see the image in greyscale:
> > http://dl.dropbox.com/u/6599273/capturas/ndvi_gris_en_gvsig.png
> >
> > The problem is now I can't see any legend, because I've not created
> > any class. I'd like to see all the different levels of the grayscale
> > image in my legend.
> >
> > How could I do it?
> >
> > Many thanks in advance
> >
> > --
> > Jorge Arévalo
> > Internet & Mobility Division, DEIMOS
> > jorge.arev...@deimos-space.com
> > http://es.linkedin.com/in/jorgearevalo80
> > http://mobility.grupodeimos.com/
> > http://gis4free.wordpress.com
> > http://geohash.org/ezjqgrgzz0g
> >
>
> Ok, I've found a way, but I'm sure it isn't the shortest path.
>
> Basically, I've generated a legend using GRASS (r.colors to add grey
> color as color interpretation for band and d.legend to generate the
> legend). The legend is generated from the ndvi file. So, I guess I can
> create a HTML template as Mapserver legend, using the legend generated
> by grass (here:
> http://dl.dropbox.com/u/6599273/grass/grass_legend.png)
>
> On the other hand, I know how to generate a legend in Mapserver using
> CLASS objects in the mapfile, but I don't know how to generate that
> legend without the CLASS options in the mapfile.
>
> Am I taking the long way on this? Is there an easier way to generate a
> legend for a NDVI file in Mapserver?
>
> Many thanks in advance
>
> --
> Jorge Arévalo
> Internet & Mobility Division, DEIMOS
> jorge.arev...@deimos-space.com
> http://es.linkedin.com/in/jorgearevalo80
> http://mobility.grupodeimos.com/
> http://gis4free.wordpress.com
> http://geohash.org/ezjqgrgzz0g
> ___
> 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: VS: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1

2011-09-28 Thread Simon Mercier
Thank you for your reply Jukka

I tried but still dont work.  My raster is ecw file with an .xml file for
the spatial reference specification.  I try to add a .wld extension but no
result.  If I remove the WMS_EXTENT tag, no raster appears on my map.  In my
previous message you can see the raster index shapefile.  Realy strange !

/mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw
/mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw.aux.xml
/mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.wld


My log with NO  WMS_EXTENT
[Wed Sep 28 12:52:38 2011].74323 msDrawRasterLayerLow(T_AN2000_MTM7):
entering.
[Wed Sep 28 12:52:38 2011].90072 msResampleGDALToMap(): no overlap ... no
result.
[Wed Sep 28 12:52:38 2011].156145 msResampleGDALToMap(): no overlap ... no
result.
[Wed Sep 28 12:52:38 2011].224133 msResampleGDALToMap(): no overlap ... no
result.
[Wed Sep 28 12:52:38 2011].280705 msDrawMap(): Layer 0 (T_AN2000_MTM7),
0.211s

My log with WMS_EXTENT
[Wed Sep 28 12:53:32 2011].877755 msDrawRasterLayerLow(T_AN2000_MTM7):
entering.
[Wed Sep 28 12:53:32 2011].895340 msResampleGDALToMap in effect: cellsize =
36.25
[Wed Sep 28 12:53:32 2011].896076 msDrawGDAL(T_AN2000_MTM7): using
RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102
[Wed Sep 28 12:53:32 2011].896184 msDrawRasterLayerGDAL():
red,green,blue,alpha bands = 1,0,0,0
[Wed Sep 28 12:53:33 2011].149187 msResampleGDALToMap in effect: cellsize =
36.25
[Wed Sep 28 12:53:33 2011].149416 msDrawGDAL(T_AN2000_MTM7): using
RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102
[Wed Sep 28 12:53:33 2011].149445 msDrawRasterLayerGDAL():
red,green,blue,alpha bands = 1,0,0,0
[Wed Sep 28 12:53:33 2011].268406 msResampleGDALToMap in effect: cellsize =
36.25
[Wed Sep 28 12:53:33 2011].268784 msDrawGDAL(T_AN2000_MTM7): using
RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102
[Wed Sep 28 12:53:33 2011].268825 msDrawRasterLayerGDAL():
red,green,blue,alpha bands = 1,0,0,0
[Wed Sep 28 12:53:33 2011].22 msDrawMap(): Layer 0 (T_AN2000_MTM7),
0.571s



2011/9/28 Rahkonen Jukka 

> **
> Hi,
>
> It must come from this new feature, capture from
> http://mapserver.org/ogc/wms_server.html
>
> "wms_extent
> WMS TAG Name: BoundingBox (WMS1.1.1, sect. 6.5.6)
> Description: (Optional) Used for the layer’s BoundingBox tag for cases
> where it is impossible (or very inefficient) for MapServer to probe the data
> source to figure its extents. The value for this metadata is “minx miny maxx
> maxy” separated by spaces, with the values in the layer’s projection units.
> If wms_extent is provided then it has priority and MapServer will NOT try to
> read the source file’s extents.
> For Rasters served through WMS, MapServer can now use the wms_extent
> metadata parameter to register the image. If a .wld file cannot be found,
> MapServer will then look for the wms_extent metadata parameter and use the
> extents of the image and the size of the image for georegistration"
>  I would first remove the EXTENT from LAYER and wms_extent from layer
> metadata and see what happens then. You would get a visual hint about what
> happens by making the tileindex shapefile as a normal vector polygon layer
> and by showing it above the imagery layer.
>
> -Jukka Rahkonen-
>
>  Simon Mercier  wrote:
>
>  > Hi list, I try to migrate a map service to Mapserver 6.0.1 that work
> perfectly with a Mapserver 5.0.3 and I have a strange behavior with a
> TILEINDEX layer.  If you look the picture(in yellow you have the raster
> coverage)(http://mapcoop.org/www-demo/bugorthos.JPG), you see that my
> image coverage is not the same scale? The raster coverage fit exactly with
> the WMS_EXTENT tag of my TILEINDEX layer.  Moreover, if I comment the
> WMS_EXTENT tag no raster appears in my map.  Images are ECW files and
> projection is EPSG:32187.  The GETMAP is EPSG:32198.  I had to compile GDAL
> 1.8.0 to use ECW driver.  Did I miss something?  Where should I look?
>
>
> /cgi-bin/orthos_sim?REQUEST=
>
> GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=T_AN2000_MTM7&STYLES=&FORMAT=image/png&BGCOLOR=0xFF&TRANSPARENT=TRUE&SRS=EPSG:32198&BBOX=-452656.626506024,-11030.1204819277,279310.277253593,647379.518072289&WIDTH=1015&HEIGHT=913
>
> MAP
> NAME "orthos_sim"
> EXTENT -110 -23500 110 2253500
> CONFIG MS_ERRORFILE
> "/var/services/mapserv/logs/mapserv-sim.log"
> WEB
> QUERYFORMAT "text/xml"
> BROWSEFORMAT "text/xml"
> IMAGEPATH   "/tmp/"
> IMAGEURL"/ms_tmp/"
> METADATA
> "wms_title"  "orthos"
> "wms_abstract""Service web d'imagerie
> Orthosphoto"
> "wms_description" "Ce service "
> "wms_keywordlist" "orthophotographie"
> "wms_onlineresource" "http://sigdev/cgi-bin/orthos_sim
> ?"
> "wms_server_version"  

Re: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1

2011-09-28 Thread Rahkonen Jukka
Hi,

Could you send also a gdalinfo report about one of the your .ecw images?

-Jukka Rahkonen-



Lähettäjä: Simon Mercier [mercier.si...@gmail.com]
Lähetetty: 28. syyskuuta 2011 19:55
Vastaanottaja: Rahkonen Jukka
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: VS: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1

Thank you for your reply Jukka

I tried but still dont work.  My raster is ecw file with an .xml file for the 
spatial reference specification.  I try to add a .wld extension but no result.  
If I remove the WMS_EXTENT tag, no raster appears on my map.  In my previous 
message you can see the raster index shapefile.  Realy strange !

/mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw
/mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw.aux.xml
/mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.wld


My log with NO  WMS_EXTENT
[Wed Sep 28 12:52:38 2011].74323 msDrawRasterLayerLow(T_AN2000_MTM7): entering.
[Wed Sep 28 12:52:38 2011].90072 msResampleGDALToMap(): no overlap ... no 
result.
[Wed Sep 28 12:52:38 2011].156145 msResampleGDALToMap(): no overlap ... no 
result.
[Wed Sep 28 12:52:38 2011].224133 msResampleGDALToMap(): no overlap ... no 
result.
[Wed Sep 28 12:52:38 2011].280705 msDrawMap(): Layer 0 (T_AN2000_MTM7), 0.211s

My log with WMS_EXTENT
[Wed Sep 28 12:53:32 2011].877755 msDrawRasterLayerLow(T_AN2000_MTM7): entering.
[Wed Sep 28 12:53:32 2011].895340 msResampleGDALToMap in effect: cellsize = 
36.25
[Wed Sep 28 12:53:32 2011].896076 msDrawGDAL(T_AN2000_MTM7): using 
RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102
[Wed Sep 28 12:53:32 2011].896184 msDrawRasterLayerGDAL(): red,green,blue,alpha 
bands = 1,0,0,0
[Wed Sep 28 12:53:33 2011].149187 msResampleGDALToMap in effect: cellsize = 
36.25
[Wed Sep 28 12:53:33 2011].149416 msDrawGDAL(T_AN2000_MTM7): using 
RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102
[Wed Sep 28 12:53:33 2011].149445 msDrawRasterLayerGDAL(): red,green,blue,alpha 
bands = 1,0,0,0
[Wed Sep 28 12:53:33 2011].268406 msResampleGDALToMap in effect: cellsize = 
36.25
[Wed Sep 28 12:53:33 2011].268784 msDrawGDAL(T_AN2000_MTM7): using 
RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102
[Wed Sep 28 12:53:33 2011].268825 msDrawRasterLayerGDAL(): red,green,blue,alpha 
bands = 1,0,0,0
[Wed Sep 28 12:53:33 2011].22 msDrawMap(): Layer 0 (T_AN2000_MTM7), 0.571s



2011/9/28 Rahkonen Jukka 
mailto:jukka.rahko...@mmmtike.fi>>
Hi,

It must come from this new feature, capture from 
http://mapserver.org/ogc/wms_server.html

"wms_extent
WMS TAG Name: BoundingBox (WMS1.1.1, sect. 6.5.6)
Description: (Optional) Used for the layer’s BoundingBox tag for cases where it 
is impossible (or very inefficient) for MapServer to probe the data source to 
figure its extents. The value for this metadata is “minx miny maxx maxy” 
separated by spaces, with the values in the layer’s projection units. If 
wms_extent is provided then it has priority and MapServer will NOT try to read 
the source file’s extents.
For Rasters served through WMS, MapServer can now use the wms_extent metadata 
parameter to register the image. If a .wld file cannot be found, MapServer will 
then look for the wms_extent metadata parameter and use the extents of the 
image and the size of the image for georegistration"
I would first remove the EXTENT from LAYER and wms_extent from layer metadata 
and see what happens then. You would get a visual hint about what happens by 
making the tileindex shapefile as a normal vector polygon layer and by showing 
it above the imagery layer.

-Jukka Rahkonen-

 Simon Mercier  wrote:

 > Hi list, I try to migrate a map service to Mapserver 6.0.1 that work 
 > perfectly with a Mapserver 5.0.3 and I have a strange behavior with a 
 > TILEINDEX layer.  If you look the picture(in yellow you have the raster 
 > coverage)(http://mapcoop.org/www-demo/bugorthos.JPG), you see that my image 
 > coverage is not the same scale? The raster coverage fit exactly with the 
 > WMS_EXTENT tag of my TILEINDEX layer.  Moreover, if I comment the WMS_EXTENT 
 > tag no raster appears in my map.  Images are ECW files and projection is 
 > EPSG:32187.  The GETMAP is EPSG:32198.  I had to compile GDAL 1.8.0 to use 
 > ECW driver.  Did I miss something?  Where should I look?

/cgi-bin/orthos_sim?REQUEST=
GetMap&SERVICE=WMS&VERSION=1.1.1&LAYERS=T_AN2000_MTM7&STYLES=&FORMAT=image/png&BGCOLOR=0xFF&TRANSPARENT=TRUE&SRS=EPSG:32198&BBOX=-452656.626506024,-11030.1204819277,279310.277253593,647379.518072289&WIDTH=1015&HEIGHT=913

MAP
NAME "orthos_sim"
EXTENT -110 -23500 110 2253500
CONFIG MS_ERRORFILE "/var/services/mapserv/logs/mapserv-sim.log"
WEB
QUERYFORMAT "text/xml"
BROWSEFORMAT "text/xml"
IMAGEPATH   "/tmp/"
IMAGEURL"/ms_tmp/"
METADATA
"wms_title"  

Re: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1

2011-09-28 Thread Simon Mercier
Hi,

here:

simmer01@sigtest:~$ gdalinfo /mnt/EntrepotImageJPG/
BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw
ERROR 1: Maximum number of characters allowed reached.
Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x)
Files:
/mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw


/mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw.aux.xml
Size is 8000, 8000
Coordinate System is:
PROJCS["NAD_1983_MTM_7",
GEOGCS["GCS_North_American_1983",
DATUM["North_American_Datum_1983",
SPHEROID["GRS_1980",6378137.0,298.257222101]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",304800.0],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",-70.5],
PARAMETER["Scale_Factor",0.],
PARAMETER["Latitude_Of_Origin",0.0],
UNIT["Meter",1.0]]
Corner Coordinates:
Upper Left  (0.0,0.0)
Lower Left  (0.0, 8000.0)
Upper Right ( 8000.0,0.0)
Lower Right ( 8000.0, 8000.0)
Center  ( 4000.0, 4000.0)
Band 1 Block=8000x1 Type=Byte, ColorInterp=Gray
  Overviews: 4000x4000, 2000x2000, 1000x1000, 500x500, 250x250


2011/9/28 Rahkonen Jukka 

> Hi,
>
> Could you send also a gdalinfo report about one of the your .ecw images?
>
> -Jukka Rahkonen-
>
>
> 
> Lähettäjä: Simon Mercier [mercier.si...@gmail.com]
> Lähetetty: 28. syyskuuta 2011 19:55
> Vastaanottaja: Rahkonen Jukka
> Kopio: mapserver-users@lists.osgeo.org
> Aihe: Re: VS: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1
>
> Thank you for your reply Jukka
>
> I tried but still dont work.  My raster is ecw file with an .xml file for
> the spatial reference specification.  I try to add a .wld extension but no
> result.  If I remove the WMS_EXTENT tag, no raster appears on my map.  In my
> previous message you can see the raster index shapefile.  Realy strange !
>
>
> /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw
>
> /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw.aux.xml
>
> /mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.wld
>
>
> My log with NO  WMS_EXTENT
> [Wed Sep 28 12:52:38 2011].74323 msDrawRasterLayerLow(T_AN2000_MTM7):
> entering.
> [Wed Sep 28 12:52:38 2011].90072 msResampleGDALToMap(): no overlap ... no
> result.
> [Wed Sep 28 12:52:38 2011].156145 msResampleGDALToMap(): no overlap ... no
> result.
> [Wed Sep 28 12:52:38 2011].224133 msResampleGDALToMap(): no overlap ... no
> result.
> [Wed Sep 28 12:52:38 2011].280705 msDrawMap(): Layer 0 (T_AN2000_MTM7),
> 0.211s
>
> My log with WMS_EXTENT
> [Wed Sep 28 12:53:32 2011].877755 msDrawRasterLayerLow(T_AN2000_MTM7):
> entering.
> [Wed Sep 28 12:53:32 2011].895340 msResampleGDALToMap in effect: cellsize =
> 36.25
> [Wed Sep 28 12:53:32 2011].896076 msDrawGDAL(T_AN2000_MTM7): using
> RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102
> [Wed Sep 28 12:53:32 2011].896184 msDrawRasterLayerGDAL():
> red,green,blue,alpha bands = 1,0,0,0
> [Wed Sep 28 12:53:33 2011].149187 msResampleGDALToMap in effect: cellsize =
> 36.25
> [Wed Sep 28 12:53:33 2011].149416 msDrawGDAL(T_AN2000_MTM7): using
> RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102
> [Wed Sep 28 12:53:33 2011].149445 msDrawRasterLayerGDAL():
> red,green,blue,alpha bands = 1,0,0,0
> [Wed Sep 28 12:53:33 2011].268406 msResampleGDALToMap in effect: cellsize =
> 36.25
> [Wed Sep 28 12:53:33 2011].268784 msDrawGDAL(T_AN2000_MTM7): using
> RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102
> [Wed Sep 28 12:53:33 2011].268825 msDrawRasterLayerGDAL():
> red,green,blue,alpha bands = 1,0,0,0
> [Wed Sep 28 12:53:33 2011].22 msDrawMap(): Layer 0 (T_AN2000_MTM7),
> 0.571s
>
>
>
> 2011/9/28 Rahkonen Jukka  jukka.rahko...@mmmtike.fi>>
> Hi,
>
> It must come from this new feature, capture from
> http://mapserver.org/ogc/wms_server.html
>
> "wms_extent
> WMS TAG Name: BoundingBox (WMS1.1.1, sect. 6.5.6)
> Description: (Optional) Used for the layer’s BoundingBox tag for cases
> where it is impossible (or very inefficient) for MapServer to probe the data
> source to figure its extents. The value for this metadata is “minx miny maxx
> maxy” separated by spaces, with the values in the layer’s projection units.
> If wms_extent is provided then it has priority and MapServer will NOT try to
> read the source file’s extents.
> For Rasters served through WMS, MapServer can now use the wms_extent
> metadata parameter to register the image. If a .wld file cannot be found,
> MapServer will then look for the wms_extent metadata parameter and use the
> extents of the image and the size of the image for georegistration"
> I would first remove the EXTENT from LAYER and wms_extent from layer
> metadata and see what happens then. You would get a visual hint

Re: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1

2011-09-28 Thread Rahkonen Jukka
So gdalinfo with Upper Left  (0.0,0.0) etc. means that gdal cannot get 
the correct georeferencing for your images. They are placed at coordinates 
(0,0) instead and then the WMS BBOX does not intersect the image area and 
server is sending a white map for you. And "ERROR 1: Maximum number of 
characters allowed reached." suggests that for some part of the system the file 
path is too long.  I have never seen such an error but I would still take it 
seriously and have a try placing the images into a a place like 
/mnt/pathtest/image_01.ecw

-Jukka Rahkonen-

Lähettäjä: Simon Mercier [mercier.si...@gmail.com]
Lähetetty: 28. syyskuuta 2011 20:36
Vastaanottaja: Rahkonen Jukka
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1

Hi,

here:

simmer01@sigtest:~$ gdalinfo /mnt/EntrepotImageJPG/
BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw
ERROR 1: Maximum number of characters allowed reached.
Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x)
Files: 
/mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw

   
/mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw.aux.xml
Size is 8000, 8000
Coordinate System is:
PROJCS["NAD_1983_MTM_7",
GEOGCS["GCS_North_American_1983",
DATUM["North_American_Datum_1983",
SPHEROID["GRS_1980",6378137.0,298.257222101]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",304800.0],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",-70.5],
PARAMETER["Scale_Factor",0.],
PARAMETER["Latitude_Of_Origin",0.0],
UNIT["Meter",1.0]]
Corner Coordinates:
Upper Left  (0.0,0.0)
Lower Left  (0.0, 8000.0)
Upper Right ( 8000.0,0.0)
Lower Right ( 8000.0, 8000.0)
Center  ( 4000.0, 4000.0)
Band 1 Block=8000x1 Type=Byte, ColorInterp=Gray
  Overviews: 4000x4000, 2000x2000, 1000x1000, 500x500, 250x250


2011/9/28 Rahkonen Jukka 
mailto:jukka.rahko...@mmmtike.fi>>
Hi,

Could you send also a gdalinfo report about one of the your .ecw images?

-Jukka Rahkonen-



Lähettäjä: Simon Mercier 
[mercier.si...@gmail.com]
Lähetetty: 28. syyskuuta 2011 19:55
Vastaanottaja: Rahkonen Jukka
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: VS: [mapserver-users] TILEINDEX layer problem mapserver 6.0.1

Thank you for your reply Jukka

I tried but still dont work.  My raster is ecw file with an .xml file for the 
spatial reference specification.  I try to add a .wld extension but no result.  
If I remove the WMS_EXTENT tag, no raster appears on my map.  In my previous 
message you can see the raster index shapefile.  Realy strange !

/mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw
/mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.ecw.aux.xml
/mnt/EntrepotImageJPG/BDImages_JPG_1M/ECW/Images_AN2000_MTM07_MRN_100cm/05400_00800054f07_u.wld


My log with NO  WMS_EXTENT
[Wed Sep 28 12:52:38 2011].74323 msDrawRasterLayerLow(T_AN2000_MTM7): entering.
[Wed Sep 28 12:52:38 2011].90072 msResampleGDALToMap(): no overlap ... no 
result.
[Wed Sep 28 12:52:38 2011].156145 msResampleGDALToMap(): no overlap ... no 
result.
[Wed Sep 28 12:52:38 2011].224133 msResampleGDALToMap(): no overlap ... no 
result.
[Wed Sep 28 12:52:38 2011].280705 msDrawMap(): Layer 0 (T_AN2000_MTM7), 0.211s

My log with WMS_EXTENT
[Wed Sep 28 12:53:32 2011].877755 msDrawRasterLayerLow(T_AN2000_MTM7): entering.
[Wed Sep 28 12:53:32 2011].895340 msResampleGDALToMap in effect: cellsize = 
36.25
[Wed Sep 28 12:53:32 2011].896076 msDrawGDAL(T_AN2000_MTM7): using 
RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102
[Wed Sep 28 12:53:32 2011].896184 msDrawRasterLayerGDAL(): red,green,blue,alpha 
bands = 1,0,0,0
[Wed Sep 28 12:53:33 2011].149187 msResampleGDALToMap in effect: cellsize = 
36.25
[Wed Sep 28 12:53:33 2011].149416 msDrawGDAL(T_AN2000_MTM7): using 
RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102
[Wed Sep 28 12:53:33 2011].149445 msDrawRasterLayerGDAL(): red,green,blue,alpha 
bands = 1,0,0,0
[Wed Sep 28 12:53:33 2011].268406 msResampleGDALToMap in effect: cellsize = 
36.25
[Wed Sep 28 12:53:33 2011].268784 msDrawGDAL(T_AN2000_MTM7): using 
RAW_WINDOW=2618 4796 188 102, dst=0,0,188,102
[Wed Sep 28 12:53:33 2011].268825 msDrawRasterLayerGDAL(): red,green,blue,alpha 
bands = 1,0,0,0
[Wed Sep 28 12:53:33 2011].22 msDrawMap(): Layer 0 (T_AN2000_MTM7), 0.571s



2011/9/28 Rahkonen Jukka 
mailto:jukka.rahko...@mmmtike.fi>>>
Hi,

It must come from this new feature, capture from 
http://mapserver.org/ogc/wms_server.html

"wms_extent
W

[mapserver-users] PHP-mapscript before/after draw discrepancy

2011-09-28 Thread Shorthouse, David
I am using PHP-mapscript and am bumping into this old issue:
http://osgeo-org.1803224.n2.nabble.com/Mapscript-extent-prediction-td1991453.html,
which is now a show-stopper for me.

I tried using CONFIG 'MS_NONSQUARE' 'yes', which does *initially*
produce an extent after draw precisely the same as provided with
setExtent. However, my application also make heavy use of zoompoint
and zoomrectangle, which no longer work as expected after having set
this CONFIG.

Anyone have any suggestions on how to get an extent that is precisely
the same before and after the draw method?

Thanks in advance,

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


Re: [mapserver-users] Using a Symbol instead of text for a label

2011-09-28 Thread Matt McClelland
Thanks David

That Cluster function is very impressive (as is Mapserver).
Using expressions to find common cluster problems I can fairly easily
resolve about 90% of my issues, a good solution.

Thanks

Matt  :)

On Wed, Sep 28, 2011 at 11:47 PM, Fawcett, David (MPCA) <
david.fawc...@state.mn.us> wrote:

> Matt, 
>
> ** **
>
> I haven’t fully thought it through, but maybe the new Cluster functionality
> might work for this.  You could have a generic park symbol for the cluster
> symbol.
>
> ** **
>
> http://mapserver.org/mapfile/cluster.html
>
> ** **
>
> David.
>
> ** **
>
> *From:* mapserver-users-boun...@lists.osgeo.org [mailto:
> mapserver-users-boun...@lists.osgeo.org] *On Behalf Of *Matt McClelland
> *Sent:* Tuesday, September 27, 2011 6:15 PM
> *To:* mapserver-users@lists.osgeo.org
> *Subject:* [mapserver-users] Using a Symbol instead of text for a label***
> *
>
> ** **
>
> Hi
>
> I have a bunch of symbols that overlap on a map.  EG at a park where I want
> to show an symbol for playground, toilet and picnic tables.  The data for
> each of these items are individual point data items.
>
> I would like to ask mapserver, very kindly, to 'tile' nearby symbols into a
> group
> OR
> Use the main symbol like a label.  So that I could have a dot where the
> play equipment is, then nearby have the symbol for the play equipment.  This
> is obviously very easy to do with text, but is it possible with a symbol??
>
> I have tried this
>CLASS
>   EXPRESSION /play|playground/
>   NAME "Children's Playground"
>   STYLE
> SYMBOL 'waypoint'
> color 255 0 0
> SIZE 5
>   END
>   LABEL
>  STYLE
>   SYMBOL '/var/www/osm/kml/icons/play.png'
>   Size 10
>  END
>  ...text styleing info
>   END
>END
>
> I get my 'waypoint' dot and the play.png in the same location.  I would
> like the play.png to be positioned AUTO like I can with text.
> Any ideas??
>
> Thanks
> Matt  :)
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] PHP-mapscript before/after draw discrepancy

2011-09-28 Thread Shorthouse, David
On Wed, Sep 28, 2011 at 5:51 PM, Cristiano Sumariva  wrote:
> Well after reading the discussion in the link I guess you need to implement
> double msAdjustExtent(rectObj *rect, int width, int height) mapserver
> function in your language
> and update size then the extent on map object using the mapscript API.

Thanks for the response Christiano. Indeed, I *might* be able to
pre-calculate what the eventual extent will be after the draw() method
as Tamas suggested, assuming I don't bungle the logic. However, this
feels backward, especially since I have to design a front-end to
compensate for it. Why is the extent being mysteriously (read
inaccessibly) adjusted in the the first place?

David P. Shorthouse

> 2011/9/28 Shorthouse, David 
>>
>> I am using PHP-mapscript and am bumping into this old issue:
>>
>> http://osgeo-org.1803224.n2.nabble.com/Mapscript-extent-prediction-td1991453.html,
>> which is now a show-stopper for me.
>>
>> I tried using CONFIG 'MS_NONSQUARE' 'yes', which does *initially*
>> produce an extent after draw precisely the same as provided with
>> setExtent. However, my application also make heavy use of zoompoint
>> and zoomrectangle, which no longer work as expected after having set
>> this CONFIG.
>>
>> Anyone have any suggestions on how to get an extent that is precisely
>> the same before and after the draw method?
>>
>> Thanks in advance,
>>
>> David P. Shorthouse
>> ___
>> 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] Parameter substitution problem

2011-09-28 Thread Steve Lime
What happens if you quote the variable in the CGI call, that is:

  “/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+'OMI-Aura_L3-OMCLDRRclpWMSNRT_"+
amsreDate + ".png'"

Note the single quotes in the DATA value... I'll try to whip up local test case.

Steve

On Tue, Sep 27, 2011 at 4:28 PM, Asad Ullah  wrote:
> Steve,
>
> DATA in  the URL has quotes as:
>
> “/cgi-bin/mapserv.cgi?map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+
> amsreDate + ".png"
>
> I unquoted the value in mapfile but there was no error. Any more suggestion?
>
>
>
> Thanks,
>
>
>
> Asad
>
>
>
>
>
> From: Steve Lime [mailto:sdl...@gmail.com]
> Sent: Friday, September 23, 2011 4:55 AM
> To: Asad Ullah
> Cc: mapserver-users@lists.osgeo.org
> Subject: Re: [mapserver-users] Parameter substitution problem
>
>
>
> My guess is the validation is correct but the syntax of the URL parameter is
> is wrong in that the value passed for DATA is not quoted. If you unquote the
> default value in your mapfile does that result in a error? That would be an
> easy way to test the need for quotes.
>
> One last idea, while map_layer... should work, try map.layer... instead as
> you variable name.
>
> If you're really are just replacing the date part you could do that by doing
> a runtime sub...
>
>  DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_%date%.png"
>  VALIDATION
>      date 'regex'
>  END
>
> And then you pass date as a CGI variable.
>
> Steve
>
> On Thursday, September 22, 2011, Asad Ullah 
> wrote:
>> List,
>> I am trying to substitute DATA parameter in my mapfile with a call from
>> Openlayers as follow:
>>
>> map_layer[OMI_CP]=DATA+OMI-Aura_L3-OMCLDRRclpWMSNRT_"+ amsreDate + ".png"
>>
>> The mapfile is:
>>
>> LAYER
>>  NAME "OMI_CP"
>>     TYPE RASTER
>>     STATUS DEFAULT
>>     OFFSITE 0 0 0
>>  PROJECTION
>>     "init=epsg:4326"
>>   END
>>     DATA "OMI-Aura_L3-OMCLDRRclpWMSNRT_20110922.png"
>> VALIDATION
>>   'DATA' '^OMI_.*\.png$'
>> END
>>
>> The call should change the date part (20110922) of the png filename but it
>> is not doing it. Can anyone point to what I am doing wrong here?
>>
>> Thanks,
>>
>> Asad
>>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] PHP mapscript - how to add label style

2011-09-28 Thread Steve Lime
I'm guessing this is a bug, could you quick file a ticket and we'll
make sure this is addressed in 6.0.2?

Steve

On Tue, Sep 27, 2011 at 10:21 AM, Ian Walberg  wrote:
> Hello,
>
>
>
> I am sure it is staring me in the face but we cannot see how to add a style
> to a label (Mapserver 6.x) using PHP mapscript.
>
>
>
> Works fine via map file and we see the open issue with the save not
> including the geotransform line.
>
>
>
> What are we missing?
>
>
>
> Thanks
>
>
>
> Ian
>
> ___
> 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] PHP-mapscript before/after draw discrepancy

2011-09-28 Thread Steve Lime
Extents are adjusted to deal with the fact the supplied extent often
doesn't match the aspect ratio of the output image. One set of
coordinates (x's or y's) is left alone and the other is adjusted to
compensate for the image aspect ratio. By default MapServer likes
square pixels.

I don't know enough to about the zoompoint/zoomrect methods to really
comment on why they don't work well with the non-square pixels, except
that non-square pixels are really a WMS/WCS phenomena in MapServer...

Steve

On Wed, Sep 28, 2011 at 7:08 PM, Shorthouse, David  wrote:
> On Wed, Sep 28, 2011 at 5:51 PM, Cristiano Sumariva  
> wrote:
>> Well after reading the discussion in the link I guess you need to implement
>> double msAdjustExtent(rectObj *rect, int width, int height) mapserver
>> function in your language
>> and update size then the extent on map object using the mapscript API.
>
> Thanks for the response Christiano. Indeed, I *might* be able to
> pre-calculate what the eventual extent will be after the draw() method
> as Tamas suggested, assuming I don't bungle the logic. However, this
> feels backward, especially since I have to design a front-end to
> compensate for it. Why is the extent being mysteriously (read
> inaccessibly) adjusted in the the first place?
>
> David P. Shorthouse
>
>> 2011/9/28 Shorthouse, David 
>>>
>>> I am using PHP-mapscript and am bumping into this old issue:
>>>
>>> http://osgeo-org.1803224.n2.nabble.com/Mapscript-extent-prediction-td1991453.html,
>>> which is now a show-stopper for me.
>>>
>>> I tried using CONFIG 'MS_NONSQUARE' 'yes', which does *initially*
>>> produce an extent after draw precisely the same as provided with
>>> setExtent. However, my application also make heavy use of zoompoint
>>> and zoomrectangle, which no longer work as expected after having set
>>> this CONFIG.
>>>
>>> Anyone have any suggestions on how to get an extent that is precisely
>>> the same before and after the draw method?
>>>
>>> Thanks in advance,
>>>
>>> David P. Shorthouse
>>> ___
>>> 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] minscaledenom puzzle, Mapserver 6.0.1

2011-09-28 Thread Steve Lime
Hmmm... What if you use one layer with the various class/expressions
and MAXSCALEDENOM set at the layer level for
all the various squares and then a second layer with just one class
for the pixels with MINSCALEDENOM set. I typically
use layer scales far more than class scale and that setup would
perform much better than what you have since there would
be no expressions or scale computations in the scale > 700 case. E.g.:

LAYER
  NAME 'sites_high'
  GROUP 'sites'
  MAXSCALE 700
  ...multi-class...
END
LAYER
  NAME 'sites_low'
  GROUP 'sites'
  MINSCALE 700
  ...one class...
END

If the second layer indeed renders then it's a class handling issue.
If the second layer (with pixels) doesn't render then
it's a drawing issue. What backend is used, GD or AGG?

Steve

On Tue, Sep 27, 2011 at 3:55 PM, Peter N. Schweitzer
 wrote:
> Surely I have misunderstood minscaledenom or otherwise have misused it.
>
> I just switched over to Mapserver 6.0.1 (Linux, CentOS, data in
> PostgreSQL+PostGIS)
>
> The web page is http://mrdata.usgs.gov/mineral-resources/mrds-us.html
> Feature type is point.  The classes from the map file are these:
>
>  labelitem "site_name"
>  labelmaxscaledenom 25
>  classitem "dev_stat"
>  class
>    maxscaledenom 700
>    expression ('[dev_stat]' == 'Producer' or '[dev_stat]' == 'Past
> Producer')
>    name "Mine, past or present producer"
>    color 160 0 0
>    symbol "mine"
>    size 5
>    label
>      color 0 0 0
>      size 10
>      type truetype
>      font arial
>      position cr
>      offset 4 4
>      end
>    end
>  class
>    maxscaledenom 700
>    expression ('[dev_stat]' == 'Prospect' or '[dev_stat]' == 'Occurrence')
>    name "Prospect or occurrence"
>    color 0 160 0
>    symbol "opensquare"
>    size 5
>    end
>  class
>    maxscaledenom 700
>    expression ('[dev_stat]' == 'Plant')
>    name "Processing plant"
>    color 0 0 160
>    symbol "mine"
>    size 6
>    label
>      color 0 0 0
>      size 10
>      type truetype
>      font arial
>      position cr
>      offset 4 4
>      end
>    end
>  class
>    maxscaledenom 700
>    expression ('[dev_stat]' == 'Unknown')
>    name "Unknown"
>    color 0 0 0
>    symbol "occurrence"
>    size 6
>    end
>  class
>    minscaledenom 700
>    color 160 0 0
>    symbol 0
>    end
>
> Under mapserver 5.6.7, this generated red pixels for every point when
> the map is zoomed out; those are replaced by the square symbols when
> the map is zoomed in.
>
> But under 6.0.1, I am not getting the 1-pixel symbols when zoomed out.
> I assumed that the last class defined above would apply when the scale
> is coarser than 1:7M.
>
> Here is the OpenLayers command that loads this layer:
>
>  var wms = new OpenLayers.Layer.WMS(
>    "Mineral Resources",
>    "http://mrdata.usgs.gov/cgi-bin/mapserv?";,
>    {
>      map: 'mrds.map',
>      transparent: 'true',
>      layers: 'mrds'
>      },
>    {
>      singleTile: 'true',
>      ratio: 1
>      }
>    );
>
> Would some modification of my map file or my OpenLayers javascript
> bring back my little red pixels?
>
> Thanks for any help you might offer.
>
> Peter
> --
> Peter N. Schweitzer (MS 954, U.S. Geological Survey, Reston, VA 20192)
> (703) 648-6533  FAX: (703) 648-6252  email: pschweit...@usgs.gov
> 
> ___
> 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] output template trimlast doesn't work

2011-09-28 Thread Steve Lime
Which version of MapServer? Template certainly looks ok. What happens
if you pull the closing feature tag up like so:

  },[/feature]

Steve

On Tue, Sep 27, 2011 at 6:15 PM, jjwang  wrote:
> This is my template file.
> The *trimlast=','* statement doesn't work.
> Any idea on this?
>
> // mapserver template
> [resultset layer=pd]
> [
>    [feature trimlast=',']
>    {
>      "id": "[id]",
>      "description": "[description]",
>      "venue": "[venue]",
>      "year": "[year]"
>    },
>    [/feature]
> ]
> [/resultset]
>
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/output-template-trimlast-doesn-t-work-tp6838218p6838218.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 + NDVI styling

2011-09-28 Thread Steve Lime
Unfortunately MapServer isn't bright enough to generate a legend
solely from an image itself. The legend code
just wasn't built for such a task.Sorry... Steve

2011/9/28 Jorge Arévalo :
> 2011/9/28 Jorge Arévalo :
>> I'm serving a NDVI coverage via Mapserver. So, one band, float32
>> values, [-1.0, 1.0]. I want to display the NDVI in greyscale, and
>> generate a legend. I've tried 2 things:
>>
>> - Create two dummy classes, just for testing:
>>
>> CLASS
>>    NAME "rojo"
>>    EXPRESSION ([pixel] < 0.3)
>>    STYLE
>>        COLOR 255 0 0
>>    END
>> END
>>
>> CLASS
>>    NAME "azul"
>>    EXPRESSION ([pixel] >= 0.3)
>>    STYLE
>>        COLOR 0 0 255
>>    END
>> END
>>
>> So, my legend looks like this: http://dl.dropbox.com/u/6599273/leyenda.png
>>
>> And the image, obviously, is red and blue:
>> http://dl.dropbox.com/u/6599273/capturas/ndvi_en_gvsig.png
>>
>> But I'd like to see the image in greyscale... The I've tried the next thing
>>
>> - Pre-classify values with PROCESSING "SCALE=-1.0, 1.0". I don't know
>> what Mapserver internally does with this processing order, but I can
>> see the image in greyscale:
>> http://dl.dropbox.com/u/6599273/capturas/ndvi_gris_en_gvsig.png
>>
>> The problem is now I can't see any legend, because I've not created
>> any class. I'd like to see all the different levels of the grayscale
>> image in my legend.
>>
>> How could I do it?
>>
>> Many thanks in advance
>>
>> --
>> Jorge Arévalo
>> Internet & Mobility Division, DEIMOS
>> jorge.arev...@deimos-space.com
>> http://es.linkedin.com/in/jorgearevalo80
>> http://mobility.grupodeimos.com/
>> http://gis4free.wordpress.com
>> http://geohash.org/ezjqgrgzz0g
>>
>
> Ok, I've found a way, but I'm sure it isn't the shortest path.
>
> Basically, I've generated a legend using GRASS (r.colors to add grey
> color as color interpretation for band and d.legend to generate the
> legend). The legend is generated from the ndvi file. So, I guess I can
> create a HTML template as Mapserver legend, using the legend generated
> by grass (here:
> http://dl.dropbox.com/u/6599273/grass/grass_legend.png)
>
> On the other hand, I know how to generate a legend in Mapserver using
> CLASS objects in the mapfile, but I don't know how to generate that
> legend without the CLASS options in the mapfile.
>
> Am I taking the long way on this? Is there an easier way to generate a
> legend for a NDVI file in Mapserver?
>
> Many thanks in advance
>
> --
> Jorge Arévalo
> Internet & Mobility Division, DEIMOS
> jorge.arev...@deimos-space.com
> http://es.linkedin.com/in/jorgearevalo80
> http://mobility.grupodeimos.com/
> http://gis4free.wordpress.com
> http://geohash.org/ezjqgrgzz0g
> ___
> 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: output template trimlast doesn't work

2011-09-28 Thread jjwang
6.0.1
There is no difference.
Did I miss something?

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/output-template-trimlast-doesn-t-work-tp6838218p6842760.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] WFS 1.1.0 Namespace quirk for PropertyName attribute restricting

2011-09-28 Thread bte...@gmail.com
Hi,

I think I've found a quirk in MapServer V5.6.0 WFS behaviour - but I'm not
really sure as I don't understand enough about reading an XSD to know
whether or not this is "expected behaviour".  This particular issue is not
causing me any grief at the moment as I know the work-around, but perhaps it
might be of interest to others.  I noticed the problem when hand-crafting a
WFS request for an Intersect Filter - I specified some PropertyName elements
at the head of the request in order to retrieve only a select set of
attributes.  I specified the namespace (because I based the XML on what I
read in the WFS 1.1.0 recommendation) and because it had apparently worked
in another previous request.  However this time it didn't work in as much as
the request responded with only the spatial data and not the attributes. 
With a bit of mucking around I noticed that apparently this version of
MapServer allows namespace to be specified on "PropertyName" elements within
the "Filter" section, but not outside it.  My XML below:



The XML above works fine and responds with the spatial info and the
attributes.  However, if you code the namespace into say the elements like
"ms:esa_code" - it no longer returns
the attributes (and yet it works fine if the namespace is removed.)

I think if I read ticket 1350 correctly, it indicates the MSv5.2 strips out
namespaces ?  Maybe that was changed later?

It's not really a problem to me.  But just a quirk that took me a hour or
two of mucking around to find what caused the problem.

(Is there a recommended approach on writing WFS XML requests for MapServer
eg. should all namespaces be removed?)

-
Regards, Bill Teluk
--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/WFS-1-1-0-Namespace-quirk-for-PropertyName-attribute-restricting-tp6842768p6842768.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] GetFeatureInfo or GetFeature?

2011-09-28 Thread jjwang
The data I have is suburb boundaries (polygon).
I want the server can do this: when I pass a coordinate to the server and it
could return the info of the suburb who covers this coordinate.
For getfeatureinfo request, there are two required parameters X and Y. But
they are not longitude and latitude . So I don't know how to get what I
want.
For getfeature request, I think the filter might be able to do this. But I
couldn't find the documentations teache how to use Spatial Capabilities,
like Touches,Within,Overlaps,Contains,DWithin.

Someone help me.
Thanks

JJ

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/GetFeatureInfo-or-GetFeature-tp6842879p6842879.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


VS: [mapserver-users] GetFeatureInfo or GetFeature?

2011-09-28 Thread Rahkonen Jukka
Hi,

X and Y in GetFeatureInfo are pixel coordinates and you can calculate the 
coordinates for any pixel in the image because you know the BBOX and the size 
of the image in pixels (WIDTHxHEIGHT).
When it comes to filters in WFS you must read some parts of that WFS standard 
version you are going to use, for WFS 1.0.0 
http://portal.opengeospatial.org/files/?artifact_id=7176
and also another stasndard about how the filters must be used
http://portal.opengeospatial.org/files/?artifact_id=1171

A filter uses with http POST could look like


myns:PATH

50,40 100,60




It is also possible to use filter with http GET but urls tend to come very 
long. This example, as the previuos one, is from the WFS 1.0.0 standard
FILTER=INWATERA_1M/WKB_GEOM
10,10 20,20



-Jukka Rahkonen-

 
jjwang wrote:

> 
> The data I have is suburb boundaries (polygon).
> I want the server can do this: when I pass a coordinate to 
> the server and it
> could return the info of the suburb who covers this coordinate.
> For getfeatureinfo request, there are two required parameters 
> X and Y. But
> they are not longitude and latitude . So I don't know how to 
> get what I
> want.
> For getfeature request, I think the filter might be able to 
> do this. But I
> couldn't find the documentations teache how to use Spatial 
> Capabilities,
> like Touches,Within,Overlaps,Contains,DWithin.
> 
> Someone help me.
> Thanks
> 
> JJ
> 
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/GetFeatureInfo-or-GetFe
ature-tp6842879p6842879.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