Re: [mapserver-users] Rendering order of objects in a layer

2009-06-11 Thread David Nugent
On Thu, 11 Jun 2009 15:42:10 +1000, Thomas Bonfort  
thomas.bonf...@camptocamp.com wrote:




I will try playing with ordering in the DATA property as Thomas  
suggests. I
wasn't aware it would handle order by (but only too aware that while  
being

sql like it isn't exactly sql :-)).


it is *exactly sql* : that query string is being sent to your
database, so you can do joins, groupby's, etc...



Ah, its a subquery... I turned up debugging for other reasons and see now  
how it is transformed.



Thanks again,
David
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] cartographic lines

2009-06-11 Thread David Nugent

On Thu, 11 Jun 2009 15:42:03 +1000, I wrote:

On Thu, 11 Jun 2009 14:58:47 +1000, Thomas Bonfort  
thomas.bonf...@camptocamp.com wrote:


a variation of this a couple of weeks back I kept getting the  
mapserver

message: Cartoline drawing is deprecated with AGG, so I figured that
wasn't the correct way to do it. :-)


Just to follow this up... yes, I do get the error message in the
$MS_ERRORFILE but it renders correctly regardless.

Is this message something I should be worried about?


yes, this means that some of your features aren't being drawn. you
must be having a layer that still references a cartoline symbol.



Hmm, I'm still using symbols for rendering several features including  
train lines and tracks/trails.


What does mapserver consider a cartoline symbol? A single point elipse  
or something similar?



To answer my own question, ones of TYPE CARTOLINE of course.  :-)

Now found and fixed it, thanks.

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


Re: [mapserver-users] R

2009-06-11 Thread David Nugent

On Thu, 11 Jun 2009 15:23:27 +1000, I wrote:

If you're already pulling from a view, you might want to consider three  
views:

interstates
highways
local roads

(or how ever you layer it)


Yep, that is what I was originally doing, but I broke it by purposely  
combining all road layers to make joins between roads with outlines  
looking much better (which Thomas' reply referred to).


As part of that change, and in order to improve visual effect, I decided  
instead to use ground relationship to split roads into three layers,  
resulting in tunnels under surface roads under bridges.  I figured I  
could tidy up the side effects if I could just get objects within the  
layer rendering in order of road importance.  :-)


I will try playing with ordering in the DATA property as Thomas suggests.



This works perfectly, so now I'm 95% there. :-)

One last problem I'm scratching my head on.

I want to highlight bridges by using a thick border on each side of the  
road (and if possible an angular section at each end of the border as  
often seen in traditional road maps). Using an outline won't work for this  
as outlines close the end points of the line segment with a border and I  
would prefer them to blend directly with the road to which they belong.  
I'm thinking a symbol would be needed but not sure how to approach it.


Like (view this with a fixed width font):

\/__
  __
   / \

(imagine lines joining \/ being thick)

How to achieve such a border?

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


Re: [mapserver-users] labeling streets

2009-06-11 Thread Raivo Alla
Hi,

I think I found the cause.
When declaring ANGLE AUTO, then MINFEATURESIZE auto was working.
But with ANGLE FOLLOW there was a problem displaying labels.
Could it be considered as a bug?


Raivo

On Tue, Jun 9, 2009 at 9:48 AM, Raivo Allasnaper...@gmail.com wrote:
 Hi,

 I added red box to visualize line vertices
 (style
  geomtransform start
  symbol box
  color 255 0 0
  size 6
  end) and the result is displayed here:

 http://picasaweb.google.com/snaperski/Ort#5345215158256974066


 Best wishes,
 Raivo

 On Tue, Jun 9, 2009 at 9:18 AM, Thomas
 Bonfortthomas.bonf...@camptocamp.com wrote:
 Raivo,

 are you sure that your streets only contain one feature?
 If you are using 5.4+, you can check by appending a geomtransform
 style to your street layer, to draw a symbol at the beginning of each
 feature:

 style
  geomtransform start
  symbol circle
  color 255 0 0
  size 15
 end

 regards,

 thomas

 www.camptocamp.com
 +33 4 79 26 57 97



 On Tue, Jun 9, 2009 at 07:50, Raivo Allasnaper...@gmail.com wrote:
 Thank You,

 so it should be, but somehow in my case it does not work properly.
 When i have no declaration of MINFEATURESIZE, then the picture looks fine:
 http://picasaweb.google.com/snaperski/Ort#5345194219497220482
 But when I add MINFEATURESIZE AUTO, most labels just disappear, even
 if they have enough space to fit in:
 http://picasaweb.google.com/snaperski/Ort#5345195269825705586

 And those labeled straight streets contain only one feature (line
 feature) each - so the label should fit in decently.

 Label is declared this way:
                LABEL
                        TYPE truetype
                        ANTIALIAS true
                        FONT arial
                        COLOR 240 240 240
                        OUTLINECOLOR 52 52 52
                        SIZE 9
                        force false
                        MINDISTANCE 250
                        MINFEATURESIZE auto
                        ANGLE follow
                        POSITION cc
                        BUFFER 1
                END

 Changing FORCE or POSITION parameters didnt help either


 Raivo

 On Mon, Jun 8, 2009 at 12:55 PM, Christy Niemancnie...@dmsolutions.ca 
 wrote:
 Hi,

 You could set MINFEATURESIZE to AUTO and then only the labels that fit on
 the lines should be drawn.

 Regards,
 Christy

 Raivo Alla wrote:

 Hello!

 I'm stuck in simple-looking problem, but the solution is just hiding
 somewhere.

 The question is: how I can label only those line features, whos label
 does not run over the line like that:

 http://picasaweb.google.com/snaperski/Ort#5344831130138846050

 As street lengths are very different, I cant solve the problem by
 setting suitable MINFEATURESIZE for

 respective MINSCALE,MAXSCALE range.


 All the best,
 Raivo Alla
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users


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



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


[mapserver-users] WFS GetFeature problem

2009-06-11 Thread Balázs Bámer
Hi All,

Mapserver is 5.4.1 under Ubuntu 8.10, compiled after
./configure --with-oci
--with-oraclespatial=/usr/local/instantclient_11_1  --with-proj
--with-threads --with-gdal --with-ogr  --with-jpeg --with-png=/usr/lib
--with-php=/usr/include/php5 --with-wmsclient --with-wfsclient
--with-fastcgi=/usr --with-wfs

I try to use Mapserver WFS to query features by = operator. The
problem is altough the feature is found and returned, the attributes
are missing. The DescribeFeature request

http://att-it.homelinux.net:22080/cgi-bin/ms-5.4.1/blokknez.fcgi?SERVICE=WFSVERSION=1.0.0REQUEST=DescribeFeatureTypeTYPENAME=blokk2009OUTPUTFORMAT=XMLSCHEMA
returns

schema targetNamespace=http://mapserver.gis.umn.edu/mapserver;
elementFormDefault=qualified version=0.1
import namespace=http://www.opengis.net/gml;
schemaLocation=http://schemas.opengis.net/gml/2.1.2/feature.xsd/
element name=blokk2009 type=ms:blokk2009Type
substitutionGroup=gml:_Feature/
complexType name=blokk2009Type
complexContent
extension base=gml:AbstractFeatureType
sequence
element name=msGeometry type=gml:GeometryPropertyType
minOccurs=0 maxOccurs=1/
/sequence
/extension
/complexContent
/complexType
/schema

as far as I know, attributes should be described in the sequence tag.

My mapfile is (without other layers)

MAP

NAME BLOKKNEZ
STATUS ON
SIZE 650 500
# xmin ymin xmax ymax?
EXTENT 42 4 95 37
UNITS METERS
PROJECTION
  init=epsg:23700
END
SHAPEPATH .
IMAGECOLOR 200 200 200
IMAGETYPE png32
FONTSET fonts.txt
DEBUG 5
CONFIG MS_ERRORFILE /var/log/mapserver-5.4.1/error.txt
CONFIG ON_MISSING_DATA LOG

WEB
  MINSCALEDENOM 1
  MAXSCALEDENOM 100
  IMAGEPATH /tmp
  IMAGEURL /tmp
  LOG /var/log/mapserver-5.4.1/ms_error.txt
  METADATA
wms_title Blokkhatar nezegeto
wfs_title Blokkhatar nezegeto
wms_onlineresource
http://att-it.homelinux.net:22080/cgi-bin/ms-5.4.1/blokknez.fcgi?;
wfs_onlineresource
http://att-it.homelinux.net:22080/cgi-bin/ms-5.4.1/blokknez.fcgi?;
wms_srs EPSG:23700
wfs_srs EPSG:23700
  END
END

LEGEND
  IMAGECOLOR 255 255 255
  LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
  END
  STATUS ON
END

SCALEBAR
  IMAGECOLOR 255 255 255
  LABEL
COLOR 0 0 0
SIZE SMALL
  END
  SIZE 150 5
  COLOR 255 255 255
  BACKGROUNDCOLOR 0 0 0
  OUTLINECOLOR 0 0 0
  UNITS meters
  INTERVALS 5
  STATUS ON
END

QUERYMAP
  STYLE HILITE
  COLOR 255 0 0
END

OUTPUTFORMAT
  NAME png32
  DRIVER GD/PNG
  MIMETYPE image/png
  IMAGEMODE RGBA
  EXTENSION png
END

LAYER
  PROCESSING CLOSE_CONNECTION=DEFER
  NAME blokk2009
  METADATA
DESCRIPTION blokk 2009
wms_title blokk 2009
wfs_title blokk 2008
ows_include_items all
ows_extent '426400 43800 937400 362900'
wfs_featureid tfotvbaz
  END
  PROJECTION
init=epsg:23700
  END
  TYPE POLYGON
  MINSCALEDENOM 999
  MAXSCALEDENOM 21
  STATUS ON
  CONNECTIONTYPE oraclespatial
  CONNECTION 
gis/gis@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=200.1.1.25)(PORT=1521)))(CONNECT_DATA=(SID=db2)))
  DATA bgeom from (SELECT bgeom,bloaz,bpter/1.0 as
bpterha,tfotvbaz FROM tfotvb where tolda =
to_Date('20090303','MMDD')) using unique tfotvbaz SRID 23700
  CLASS
NAME blokk2009
STYLE
  OUTLINECOLOR 55 55 255
END
  END
  DUMP TRUE
  TEMPLATE template.html
  DEBUG 5
END # layer blokk2009

END # Map File

What is missing?
Thank you in advance.
Best regards: Balázs
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: WFS GetFeature problem

2009-06-11 Thread Balázs Bámer
Hi All,

I respond to myself. I thought this

ows_include_items all

is enough in layer metadata, but this

gml_include_items all

is also required.

Best regards: Balázs
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] WMS Filter using Logical Operator

2009-06-11 Thread Peter Lock

Hi all,

I'm trying to do a WMS request using a SLD filter.
If I use a single comparison operator (PropertyIsLike) in my filter all
works fine, but when I use a combination of 2 PropertyIsLike operators using
a logical operator (And/Or) it looks like MapServer is only using the last
comparison operator.

This filter works fine; it shows all data where LOC_NAAM is like *MATH*:

StyledLayerDescriptor version='1.0.0'
  NamedLayer
Namemylayer/Name
UserStyle
  Titlexxx/Title
  FeatureTypeStyle
Rule
  ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;
  ogc:PropertyIsLike wildCard=* singleChar=. escape=!
matchCase=false
ogc:PropertyNameLOC_NAAM/ogc:PropertyName
ogc:Literal*MATH*/ogc:Literal
  /ogc:PropertyIsLike
  /ogc:Filter
  LineSymbolizer
Geometry
  PropertyNamecenter-line/PropertyName
/Geometry
Stroke
  CssParameter name='stroke'#ff/CssParameter
  CssParameter name='stroke-width'2.0/CssParameter
/Stroke
  /LineSymbolizer
/Rule
  /FeatureTypeStyle
/UserStyle
  /NamedLayer
/StyledLayerDescriptor


But the next filter shows all data where LOC_NAAM is like *WEG*, but also
the data where LOC_NAAM is not like *MATH*, which is incorrect: it should
show all data where LOC_NAAM contains both WEG and MATH:

StyledLayerDescriptor version='1.0.0'
  NamedLayer
Namemylayer/Name
UserStyle
  Titlexxx/Title
  FeatureTypeStyle
Rule
  ogc:Filter xmlns:ogc=http://www.opengis.net/ogc;
ogc:And
  ogc:PropertyIsLike wildCard=* singleChar=. escape=!
matchCase=false
ogc:PropertyNameLOC_NAAM/ogc:PropertyName
ogc:Literal*MATH*/ogc:Literal
  /ogc:PropertyIsLike
  ogc:PropertyIsLike wildCard=* singleChar=. escape=!
matchCase=false
ogc:PropertyNameLOC_NAAM/ogc:PropertyName
ogc:Literal*WEG*/ogc:Literal
  /ogc:PropertyIsLike
/ogc:And
  /ogc:Filter
  LineSymbolizer
Geometry
  PropertyNamecenter-line/PropertyName
/Geometry
Stroke
  CssParameter name='stroke'#ff/CssParameter
  CssParameter name='stroke-width'2.0/CssParameter
/Stroke
  /LineSymbolizer
/Rule
  /FeatureTypeStyle
/UserStyle
  /NamedLayer
/StyledLayerDescriptor


If I use these filters for a WFS request all works fine.

My question is: is it possible to use these logical operators in a filter in
a WMS request? And if so, how has this to be done?

I hope you can help me!

Best regards,

Peter Lock

-- 
View this message in context: 
http://n2.nabble.com/WMS-Filter-using-Logical-Operator-tp3061075p3061075.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] Metadata.dim DIMAP

2009-06-11 Thread Eric Francois
Hello,

I'm not able to use directly Spot Image ( metadata.dim + IMAGERY.TIF) in
Mapserver.
Nevertheless, gdalinfo --formats told me in supported formts list :
DIMAP(ro): SPOT DIMAP.

I tried to use gcps2wld.py IMAGERY.TIF  IMAGERY.tfw or gcps2wld.py
METADATA.DIM  IMAGERY.tfw. Both tfw files give me, when used in Mapserver,
50 meters images too much in Est. 

Any idea ?

Thanks

Eric


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


Re: [mapserver-users] Metadata.dim DIMAP

2009-06-11 Thread Frank Warmerdam

Eric Francois wrote:

Hello,

I'm not able to use directly Spot Image ( metadata.dim + IMAGERY.TIF) in
Mapserver.


Eric,

Why are you not able to use directly the spot image metadata.dim + imagery.tif
in MapServer?


Nevertheless, gdalinfo --formats told me in supported formts list :
DIMAP(ro): SPOT DIMAP.

I tried to use gcps2wld.py IMAGERY.TIF  IMAGERY.tfw or gcps2wld.py
METADATA.DIM  IMAGERY.tfw. Both tfw files give me, when used in Mapserver,
50 meters images too much in Est. 


I would suggest you file a ticket against GDAL with an example file
demonstrating the problem (the metadata.dim would likely be sufficient)
and careful explanation of why you think the origin is wrong.  It may be
an off by half a pixel error which are common in interpreting the origin
of new file formats.

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

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


RE: [mapserver-users] Ignoring top level settings

2009-06-11 Thread Alexandre.Laplante
I I've discovered that the base layer rendering as jpg was a problem with my 
openlayers, not mapserver. However, I still can't change my top-level 
projection or extent. Any help is greatly appreciated.
 
Thank you.
 
 -Original Message-
From: mapserver-users-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of 
alexandre.lapla...@statcan.gc.ca
Sent: June 8, 2009 9:35 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Ignoring top level settings



Hello list, 

It seems as though my top level settings in my mapfile are being 
ignored. No matter what I put as projection, the output doesn't change (unless 
it's an invalid projection). Changing the values of EXTENT doesn't change 
anything either, as my map always starts zoomed out very far. I also have not 
been able to make my base layer output as anything other than jpg.

I have a feeling that this is related to an invalid /tmp/ location in 
the mapfile. I have not been able to write the location of the /tmp/ folder 
(it's on the root of my c: drive) in a way that mapserver will use it.

Apart from these things, everything works fine. I've been able to sort 
of counter-act the projection ignoring by telling mapserver that the layer's 
projection has lat_0=-49 when in fact, it is in epsg:43204 meaning lat_0=49.

I've attached my mapfile. 

Thanks in advance, 
Alexandre Laplante
Étudiant Co-op / Co-op Student
Division de l'Agriculture / Agriculture Division
Statistique Canada / Statistics Canada
170 Tunney's Pasture Driveway
Éd. Jean-Talon, 12è étage D1 / Jean-Talon Building, 12th floor D1
Ottawa, Ontario 
alex.map 

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


[mapserver-users] How to label a feature once.

2009-06-11 Thread Paul Moen
Is there anyway to label a polygon once?  One feature one label.  I am  
using Mapserver 5.4.1.  Image below shows the problem, there seem to  
be 4 labels in each township polygon.


LAYER
NAME Townships
PROJECTION
proj=longlat
ellps=GRS80
datum=NAD83
no_defs
END
DATA townships_poly
TYPE POLYGON
TEMPLATE dummy
LABELITEM twprng
STATUS ON
CLASS
MAXSCALEDENOM 45
MINSCALEDENOM 4
NAME Townships
STYLE
SYMBOL 'circle_shortlong_dash'
SIZE 1
OUTLINECOLOR 125 125 125
END
LABEL
FONT helveticabold
TYPE TRUETYPE
SIZE 10
COLOR 125 125 125
OUTLINECOLOR 251 239 136
POSITION auto
END
END
END
inline: sample.gif

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


Re: [mapserver-users] How to label a feature once.

2009-06-11 Thread Paul Moen
I figured it out.  The images I am using are tiled so there are 4  
images server by Mapserver with each labeled one time, which gives the  
appearance of 4 labels on one feature. So, Mapserver is working  
exactly the way it should and I am not.


On Jun 11, 2009, at 11:09 PM, David Nugent wrote:

On Fri, 12 Jun 2009 13:34:06 +1000, Paul Moen pm...@offroadsoftware.com 
 wrote:


Thanks for the reply.  Unfortunately for me, that was the first  
thing that I tried.  No matter what value I put in for MINDISTANCE  
the output remained the same.


See if POSITION CC helps.

IIRC there is some strange interaction between MINDISTANCE and  
POSITION AUTO.


Also try MINDISTANCE AUTO.

Mapserver is not without some quirks. :)

Regards,
David



Thanks,
Paul

On Fri, 12 Jun 2009 12:59:55 +1000, Paul Moen pm...@offroadsoftware.com 
 wrote:


Is there anyway to label a polygon once?  One feature one label.   
I am
using Mapserver 5.4.1.  Image below shows the problem, there seem  
to

be 4 labels in each township polygon.



I would usually use MINDISTANCE with a large value in the LABEL  
section to solve this.



Regards,
David





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


Re: [mapserver-users] R

2009-06-11 Thread David Nugent

Greetings all,

On Thu, 11 Jun 2009 16:37:11 +1000, I wrote:

One last problem I'm scratching my head on.

I want to highlight bridges by using a thick border on each side of the  
road (and if possible an angular section at each end of the border as  
often seen in traditional road maps). Using an outline won't work for  
this as outlines close the end points of the line segment with a border  
and I would prefer them to blend directly with the road to which they  
belong. I'm thinking a symbol would be needed but not sure how to  
approach it.


Like (view this with a fixed width font):

\/__
  __
/ \

(imagine lines joining \/ being thick)

How to achieve such a border?



Following up on my own post again...

SYMBOL does not appear to be well suited (unless I'm missing something)  
but I've come close with GEOMTRANSFORM, however only at the start and end  
of a line segment using what are essentially reversed arrowheads.


I read the RFC in the mapserver 5.4 documentation and it talks about plans  
to extend functionality of GEOMTRANSFORM (which it incorrectly refers to  
as GEOTRANSFORM and GEOMETRYTRANSFORM, incidentally), and I *think* either  
the distance or buffer might achieve most of what I need with ANGLE  
AUTO - to draw a parallel line segment. However neither appears to be  
implemented yet.



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


Re: [mapserver-users] How to label a feature once.

2009-06-11 Thread Shawn Gervais

Paul Moen wrote:
I figured it out.  The images I am using are tiled so there are 4 images 
server by Mapserver with each labeled one time, which gives the 
appearance of 4 labels on one feature. So, Mapserver is working exactly 
the way it should and I am not.


You can have MapServer use a fixed label point across tiles by using the 
 PROCESSING 'LABEL_NO_CLIP=TRUE' directive in your layer definition. 
That should give you the result you expect.


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