[MAPSERVER-USERS] Key labelcache_map_edge_buffer does not exist (While using TiF files in Raster Layer)

2008-08-27 Thread Ritesh Ambastha

Hello,

I am using Tilecache to generate tiles by reading few raster layers from my
mapfile. I have successfully generated tiles using tilecache and mapserver
vector layers.  My raster images includes TIF files.

When I checked my logs, I got these errors/warning:


getMetaData: Hash table error. Key labelcache_map_edge_buffer does not exist
msDrawLabelCacheGD(): labelcache_map_edge_buffer = -15


I have not used labelcache_map_edge_buffer anywhere in the mapfile. I tried
to keep a negative value to this in the METADATA seciton, but it didn't
worked. 

I am using MapServer version 5.0.0.

Any help will be highly appreciated.

Thanks, 
Ritesh Ambastha
-- 
View this message in context: 
http://www.nabble.com/Key-labelcache_map_edge_buffer-does-not-exist-%28While-using-TiF-files-in-Raster-Layer%29-tp19176014p19176014.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

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


Re: [mapserver-users] [mapserver] Java - PostGIS - Quoting issue in SQL request

2008-08-27 Thread julien

Hello Karim,

As I reported in my first mail, it is the first pair of quotes like in 
*'*France*'* which induce the error.
I tried *''*France*''*, with double single quote (*'*), but it is also 
not working.


Thanks anyway for the help.

Julien

alim karim wrote:

Perhaps you can try escaping your quotes like so:

'person's name' => 'person''s name'

ak

On Tue, Aug 26, 2008 at 8:16 AM, julien <[EMAIL PROTECTED] 
> wrote:


Hello,

I am developing an interface for a PostreSQL/PostGIS (v8.2)
database using Mapserver (v 5.2.0) and Java (v6.0).
I obtained some nice maps using a basic SQL query, inserted into
the mapfile.

But as soon as I tried to _use some simple quote *'* or *\'*_, the
server cannot draw the layer and report the following error :

java.lang.UnknownError: msPOSTGISLayerRetrievePK(): Query error. Error 
executing POSTGIS statement (msPOSTGISLayerRetrievePK():select attname from 
pg_attribute, pg_constraint, pg_class where pg_constraint.conrelid = 
pg_class.oid and pg_class.oid = pg_attribute.attrelid and pg_constraint.contype 
= 'p' and pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = 
'/*REQUEST REMOVED*/' and pg_table_is_visible(pg_class.oid) and 
pg_constraint.conkey[2] is null
edu.umn.gis.mapscript.mapscriptJNI.layerObj_draw(Native Method)
edu.umn.gis.mapscript.layerObj.draw(layerObj.java:472)
fr.ird.remige.bean.MapFileBean$layerItemClass.draw(MapFileBean.java:617)
fr.ird.remige.bean.MapFileBean.draw(MapFileBean.java:1105)




REQUEST REMOVED was something like :

g_carre5 from (select distinct g_carre5 from carre 
inner join date using (id_date)
inner join country using (id_country) 
WHERE v_date BETWEEN 2000 AND 2001 AND _*l_country='France'*_

group by g_carre5) as foo

The previous request, which was working, was :

g_carre5 from (select distinct g_carre5 from carre 
inner join date using (id_date)
inner join country using (id_country) 
WHERE v_date BETWEEN 2000 AND 2001 AND _*v_country=1*_

group by g_carre5) as foo

_
Table country :_
id_country serial primary key
v_country numeric(4)
l_country varchar(12)

And first line is id_country = 1, v_country = 1, l_country = France.

One strange thing is that, when I am using a mapfile script on my
computer (not on the server) and transform it into an image file
with *shp2img* (shell command), both requests are working.
Moreover, both requests are also working with SQL command, when
logged into the database.

In Java, the string containing the request is : "g_carre5 from
(select distinct g_carre5 from carre inner join date using
(id_date) inner join country using (id_country) WHERE v_date
BETWEEN 2000 AND 2001 AND l_country=\'France\' group by g_carre5)
as foo".

I also tried to replace *\' *by *\"*, and the expected error
/*column "France" does not exist*/ was reported, which shows that
Libmapscript.so translated *\"* correctly.

I do not understand why there is this quoting issue. Does somebody
have ever dealt with something like that?

Julien


___
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] Resource viewer for grama panchayat

2008-08-27 Thread നെടുമ്പാല ജയ്സെന്‍
 Hai,
Let me introduce my work to the list:-

http://cheruvannur.web4all.in/resources/

Hope, I can hear valuable suggestions.

It is hosted on a Debian GNU/Linux Etch server. It was my main project
during my M.Sc. course in last semester, and I decided to do this because I
wanted to do something useful for the panchayat - my first employer
:) (Panchayats are the rural local authorities in India, just like
Municipalities - the urban thing.) My course is just finished.

I developed this on a Debian GNU/Linux Etch system using GRASS GIS,
PostgreSQL with PostGIS, Quantum GIS, UMN MapServer, ka-Map etc. Coded in
MapScript and php. All Free/Open Source things.

I want to expand this to the entire district with some added query modules,
such as shortest route to a place, maximum coverage for some areas, flood
risk analysis etc, to make it a complete plan-development support system.

-- 
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
http://www.whylinuxisbetter.net/
~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
(`'·.¸(`'·.¸  ¸.·'´)¸.·'´)
«´¨`·*Jaisen.*..´¨`»
(¸.·'´(¸.·'´  `'·.¸)`'·.¸)
¸.·´
(  `·.¸
`·.¸ )
¸.·)´
(.·´
( `v´ )
  `v´
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] howto draw amount of points features of one layer depending on scale

2008-08-27 Thread Nils Zierath

Hi David,
your suggestion is similar to Jeff's?
How would I treat a point as lable? I haven't had any luck in displaying the points 
with "TYPE ANNOTATION".


What would the syntax in the mapfile would look like to either treat a point as lable 
or with "TYPE ANNOTATION"?


My mapfile currently looks like:

LAYER
 NAME   'Field research locations'
 DATA   '../vector/gps/fieldresearch_complete'
 STATUS default
 TYPE   point
 #TYPE  annotation
 TRANSPARENCY   100
 TOLERANCE  7
 TOLERANCEUNITS pixels
 UNITS  kilometers

 METADATA
 ...
 END #METADATA

 PROJECTION
 ...
 END #PROJECTION

 CLASSITEM  'StudyFocus'
 #LABELITEM 'LableAnnot'

 CLASS
  NAME  'Research locations (all)'
  #MINSCALEDENOM100

  STYLE
   SYMBOL 'ttf_pin-sm'
   SIZE 10
   COLOR 255 180 0
   ANGLE 345
  END #STYLE
 END #CLASS
END #LAYER



David Percy schrieb:
If you treated them as labels when zoomed out (maxscale 5 for 
example), then you could take advantage of the label colission features 
of mapserver to avoid overlaps.


when zoomed in further you could have another layer (minscale 5 for 
example) that shows all the detail...


so you would have two layer definitions in this case...
Cheers,
Percy


Nils Zierath wrote:

Dear list,
I got a layer with gps points. On the largest scale of my map the 
symbols for points overlap and are not distinguishable from one 
another since they are too close together.


Is it possible to tell mapserver to draw only that many of the 
points/symbols that do not overlap, so that more points will be shown 
the more I zoom into the map?


Thank you,
Nils

___
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] Key labelcache_map_edge_buffer does not exist (While using TiF files in Raster Layer)

2008-08-27 Thread Yewondwossen Assefa
This should only happen if you have you have debug ON at the map level. 
Setting it to OFF should get rid of the message.


Best Regards,


Ritesh Ambastha wrote:

Hello,

I am using Tilecache to generate tiles by reading few raster layers from my
mapfile. I have successfully generated tiles using tilecache and mapserver
vector layers.  My raster images includes TIF files.

When I checked my logs, I got these errors/warning:


getMetaData: Hash table error. Key labelcache_map_edge_buffer does not exist
msDrawLabelCacheGD(): labelcache_map_edge_buffer = -15


I have not used labelcache_map_edge_buffer anywhere in the mapfile. I tried
to keep a negative value to this in the METADATA seciton, but it didn't
worked. 


I am using MapServer version 5.0.0.

Any help will be highly appreciated.

Thanks, 
Ritesh Ambastha



--

Assefa Yewondwossen
Software Analyst

Email: [EMAIL PROTECTED]
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925


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


[mapserver-users] Use featureid WMS Property in MapServer

2008-08-27 Thread Arnaud Vandecasteele
Hi the list,

I work in fedora 8, and my MapServer version is : 4.10.3. I use MapServer as
a WMS/WFS Server.
For a project, i need to be able to ask some custom WMS request to
MapServer. The aim it's that a user can draw a polygon on a map and all the
feature includ in this polygon will be color in an other style (like yellow
for example).
So  can I use the WMS property featureid (or FILTER) ? My example works with
GéoServer but not with mapServer. Could someone tell me what is wrong ?

Here it's my OpenLayers code :

// setup tiled layer
tiled = new OpenLayers.Layer.WMS(
"topp:rts_nv_6_7_8 - Tiled", "
http://localhost:8080/geoserver/wms";,
{
width: '800',
srs: 'EPSG:4326',
styles: '',
height: '629',
layers: 'topp:rts_nv_6_7_8',
format: 'image/png',
tiled: 'true',
tilesOrigin : "55.186482,-21.41333445",
   featureid:'rts_nv_6_7_8.1'
},
{buffer: 0}
);

// Layer Route Niveau1
  rprincipal_z500KWMS = new OpenLayers.Layer.WMS(
  "rprincipal_z500KWMS", "
http://localhost/cgi-bin/mapserv?map=/var/www/html/mapserver/rdt_map.map";,
  {
  layers: 'rprincipal_z500K',
  srs: 'EPSG:4326',
  width: '800',
  styles: '',
  height: '626',
  format: 'image/png',
  tiled: 'true',
  tilesOrigin : "55.185611724,-21.41508548247",
  transparent:true,
  featureid:'rprincipal_z500KWMS.1'
  },
{buffer: 0}
 );

And my map configuration :

###
LAYER
NAME "rprincipal_z500K"
MINSCALE 25
MAXSCALE 50
METADATA
  "wms_title" "rprincipal_z500K"
"wfs_title" "rprincipal_z500K"
"gml_featureid" "id_voie"
END
DUMP TRUE
PROJECTION
  "init=epsg:4326"
END
TEMPLATE " "
TOLERANCE 5
GROUP map_ligne
TYPE LINE
STATUS ON
CONNECTIONTYPE OGR
CONNECTION
"/home/projets/v3/projets/reunion/routes/route_frca_3_4.tab"
CLASS
   STYLE
COLOR 255 0 0
SYMBOL "line"
SIZE 4
MINSIZE  4
MAXSIZE 36
END
STYLE
COLOR 250 250 200
SYMBOL "line"
SIZE 2
MINSIZE  2
MAXSIZE 22
END
END # END OF CLASS
END
###

-- 

Van De Casteele Arnaud
72 Rue de la colline des camélias 97400 Saint-Denis
0262 30 67 79 - 0692 23 73 17
SIG - WebMapping - GPS embarqué
Site internet : http://cataloguesig.c-webhosting.org/
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Use featureid WMS Property in MapServer

2008-08-27 Thread bartvde
This is probably a vendor-specific extension that Geoserver did, since
this is not part of the WMS standard AFAIK.

With Mapserver you have to create an SLD (Styled Layer Descriptor)
document to achieve the same thing. In an SLD you can use a Filter.

Best regards,
Bart

> Hi the list,
>
> I work in fedora 8, and my MapServer version is : 4.10.3. I use MapServer
> as
> a WMS/WFS Server.
> For a project, i need to be able to ask some custom WMS request to
> MapServer. The aim it's that a user can draw a polygon on a map and all
> the
> feature includ in this polygon will be color in an other style (like
> yellow
> for example).
> So  can I use the WMS property featureid (or FILTER) ? My example works
> with
> GéoServer but not with mapServer. Could someone tell me what is wrong ?
>
> Here it's my OpenLayers code :
>
> // setup tiled layer
> tiled = new OpenLayers.Layer.WMS(
> "topp:rts_nv_6_7_8 - Tiled", "
> http://localhost:8080/geoserver/wms";,
> {
> width: '800',
> srs: 'EPSG:4326',
> styles: '',
> height: '629',
> layers: 'topp:rts_nv_6_7_8',
> format: 'image/png',
> tiled: 'true',
> tilesOrigin : "55.186482,-21.41333445",
>featureid:'rts_nv_6_7_8.1'
> },
> {buffer: 0}
> );
>
> // Layer Route Niveau1
>   rprincipal_z500KWMS = new OpenLayers.Layer.WMS(
>   "rprincipal_z500KWMS", "
> http://localhost/cgi-bin/mapserv?map=/var/www/html/mapserver/rdt_map.map";,
>   {
>   layers: 'rprincipal_z500K',
>   srs: 'EPSG:4326',
>   width: '800',
>   styles: '',
>   height: '626',
>   format: 'image/png',
>   tiled: 'true',
>   tilesOrigin :
> "55.185611724,-21.41508548247",
>   transparent:true,
>   featureid:'rprincipal_z500KWMS.1'
>   },
> {buffer: 0}
>  );
>
> And my map configuration :
>
> ###
> LAYER
> NAME "rprincipal_z500K"
> MINSCALE 25
> MAXSCALE 50
> METADATA
>   "wms_title" "rprincipal_z500K"
> "wfs_title" "rprincipal_z500K"
> "gml_featureid" "id_voie"
> END
> DUMP TRUE
> PROJECTION
>   "init=epsg:4326"
> END
> TEMPLATE " "
> TOLERANCE 5
> GROUP map_ligne
> TYPE LINE
> STATUS ON
> CONNECTIONTYPE OGR
> CONNECTION
> "/home/projets/v3/projets/reunion/routes/route_frca_3_4.tab"
> CLASS
>STYLE
> COLOR 255 0 0
> SYMBOL "line"
> SIZE 4
> MINSIZE  4
> MAXSIZE 36
> END
> STYLE
> COLOR 250 250 200
> SYMBOL "line"
> SIZE 2
> MINSIZE  2
> MAXSIZE 22
> END
> END # END OF CLASS
> END
> ###
>
> --
> 
> Van De Casteele Arnaud
> 72 Rue de la colline des camélias 97400 Saint-Denis
> 0262 30 67 79 - 0692 23 73 17
> SIG - WebMapping - GPS embarqué
> Site internet : http://cataloguesig.c-webhosting.org/
> ___
> 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] howto draw amount of points features of one layer depending on scale

2008-08-27 Thread Yewondwossen Assefa

Nils,

look at this thread: it gives details of what you want to accomplish 
with an example of a working layer:


http://www.mail-archive.com/mapserver-users@lists.osgeo.org/msg00164.html

Best Regards,

Nils Zierath wrote:

Hi David,
your suggestion is similar to Jeff's?
How would I treat a point as lable? I haven't had any luck in displaying 
the points with "TYPE ANNOTATION".


What would the syntax in the mapfile would look like to either treat a 
point as lable or with "TYPE ANNOTATION"?


My mapfile currently looks like:

LAYER
 NAME'Field research locations'
 DATA'../vector/gps/fieldresearch_complete'
 STATUSdefault
 TYPEpoint
 #TYPEannotation
 TRANSPARENCY100
 TOLERANCE7
 TOLERANCEUNITSpixels
 UNITSkilometers

 METADATA
 ...
 END #METADATA

 PROJECTION
 ...
 END #PROJECTION

 CLASSITEM'StudyFocus'
 #LABELITEM'LableAnnot'

 CLASS
  NAME'Research locations (all)'
  #MINSCALEDENOM100

  STYLE
   SYMBOL 'ttf_pin-sm'
   SIZE 10
   COLOR 255 180 0
   ANGLE 345
  END #STYLE
 END #CLASS
END #LAYER



David Percy schrieb:
If you treated them as labels when zoomed out (maxscale 5 for 
example), then you could take advantage of the label colission 
features of mapserver to avoid overlaps.


when zoomed in further you could have another layer (minscale 5 
for example) that shows all the detail...


so you would have two layer definitions in this case...
Cheers,
Percy


Nils Zierath wrote:

Dear list,
I got a layer with gps points. On the largest scale of my map the 
symbols for points overlap and are not distinguishable from one 
another since they are too close together.


Is it possible to tell mapserver to draw only that many of the 
points/symbols that do not overlap, so that more points will be shown 
the more I zoom into the map?


Thank you,
Nils

___
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




--

Assefa Yewondwossen
Software Analyst

Email: [EMAIL PROTECTED]
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925


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


Re: [MAPSERVER-USERS] Key labelcache_map_edge_buffer does not exist (While using TiF files in Raster Layer)

2008-08-27 Thread Christopher Schmidt
On Wed, Aug 27, 2008 at 12:30:14AM -0700, Ritesh Ambastha wrote:
> 
> Hello,
> 
> I am using Tilecache to generate tiles by reading few raster layers from my
> mapfile. I have successfully generated tiles using tilecache and mapserver
> vector layers.  My raster images includes TIF files.

You sound like you're using TileCache with metaTiling. TileCache sets
this property internally when using metaTiling. 

I'm surprised you're seeing this though. The code says:

try:
# if the metadata is already set, don't override.
wms.getMetaData("labelcache_map_edge_buffer")
except mapscript._mapscript.MapServerError:

Perhaps turning debug off as suggested will get rid of this...

I don't know. But this is definitely directly related to TileCache.  

> When I checked my logs, I got these errors/warning:
> 
> 
> getMetaData: Hash table error. Key labelcache_map_edge_buffer does not exist
> msDrawLabelCacheGD(): labelcache_map_edge_buffer = -15
> 
> 
> I have not used labelcache_map_edge_buffer anywhere in the mapfile. I tried
> to keep a negative value to this in the METADATA seciton, but it didn't
> worked. 
> 
> I am using MapServer version 5.0.0.
> 
> Any help will be highly appreciated.
> 
> Thanks, 
> Ritesh Ambastha
> -- 
> View this message in context: 
> http://www.nabble.com/Key-labelcache_map_edge_buffer-does-not-exist-%28While-using-TiF-files-in-Raster-Layer%29-tp19176014p19176014.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

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


Re: [MAPSERVER-USERS] Key labelcache_map_edge_buffer does not exist (While using TiF files in Raster Layer)

2008-08-27 Thread Ritesh Ambastha

Thanks Christopher, 

I turned DEBUG  OFF, and resolved the problem. 
Now I am successfully generating tiles from Mapserver's raster layer. 

Regards,
Ritesh Ambastha


Christopher Schmidt-4 wrote:
> 
> On Wed, Aug 27, 2008 at 12:30:14AM -0700, Ritesh Ambastha wrote:
>> 
>> Hello,
>> 
>> I am using Tilecache to generate tiles by reading few raster layers from
>> my
>> mapfile. I have successfully generated tiles using tilecache and
>> mapserver
>> vector layers.  My raster images includes TIF files.
> 
> You sound like you're using TileCache with metaTiling. TileCache sets
> this property internally when using metaTiling. 
> 
> I'm surprised you're seeing this though. The code says:
> 
> try:
> # if the metadata is already set, don't override.
> wms.getMetaData("labelcache_map_edge_buffer")
> except mapscript._mapscript.MapServerError:
> 
> Perhaps turning debug off as suggested will get rid of this...
> 
> I don't know. But this is definitely directly related to TileCache.  
> 
>> When I checked my logs, I got these errors/warning:
>> 
>> 
>> getMetaData: Hash table error. Key labelcache_map_edge_buffer does not
>> exist
>> msDrawLabelCacheGD(): labelcache_map_edge_buffer = -15
>> 
>> 
>> I have not used labelcache_map_edge_buffer anywhere in the mapfile. I
>> tried
>> to keep a negative value to this in the METADATA seciton, but it didn't
>> worked. 
>> 
>> I am using MapServer version 5.0.0.
>> 
>> Any help will be highly appreciated.
>> 
>> Thanks, 
>> Ritesh Ambastha
>> -- 
>> View this message in context:
>> http://www.nabble.com/Key-labelcache_map_edge_buffer-does-not-exist-%28While-using-TiF-files-in-Raster-Layer%29-tp19176014p19176014.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
> 
> -- 
> Christopher Schmidt
> MetaCarta
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Key-labelcache_map_edge_buffer-does-not-exist-%28While-using-TiF-files-in-Raster-Layer%29-tp19176014p19183697.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

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


Re: [mapserver-users] GetFeatureInfo from Oracle Spatial

2008-08-27 Thread Kristian Thy
On Mon, Jun 09, SIMON MERCIER wrote:
> maybe you can try to limite the output field in the metadata
> "$$$_include_items" "$$$_exclude_items" tag :
> ...
> DATA "SHAPE FROM  MAPSERVER_TRIMQ USING UNIQUE MAXIMO_ID SRID 32632
> VERSION 10g"
> ...
> METADATA
> ...
>   "wms_exclude_items" "ALL"
>   "wms_include_items" "MAXIMO_ID, ASSETTYPE"
>   "oms_exclude_items" "ALL" 
>   "ows_include_items" "MAXIMO_ID, ASSETTYPE"
>   "gms_exclude_items" "ALL"
>   "gml_include_items" "MAXIMO_ID, ASSETTYPE"
> END
>  ...

Yeah, it's been a while ... ;-)

Just wanted to record for posterity that the cause of my problem was my
unique id not being unique in the table.

\\kristian
-- 
... et nemo ex vobis interrogat me: »Quo vadis?«
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] expressions for Postgis layers

2008-08-27 Thread Mike Leahy

Hello list,

I'm having a bit of trouble setting up expressions for a PostGIS layer. 
 The layer is fine if I set the CLASSITEM property for the property, 
and set the EXPRESSION equal to specific values.  However, I'd like to 
be able to use more complex expressions based on one or more fields in 
the layer.  Unfortunately, I can't seem to get it to work just with a 
single field.  Below is an example of a layer in my mapfile - previously 
it was classified using the field 'lcdb1name' as the classitem.  I tried 
rewriting the expression (see below), but I just get a blank image - no 
error messages.  I'm fairly sure that I've done this before...maybe 
somebody can spot what I've missed?


Thanks for any help,
Mike



LAYER
  NAME 'Land Cover Database'
  TYPE POLYGON
  CONNECTIONTYPE postgis
  CONNECTION 'host=localhost user=postgres dbname=testdb port=5432'
  DATA 'the_geom FROM lcdb_test'
  STATUS ON
  #CLASSITEM 'lcdb1name'
  CLASS
NAME 'High Producing Exotic Grassland'
#EXPRESSION "High Producing Exotic Grassland"
EXPRESSION "('[lcdb1name]' = 'High Producing Exotic Grassland')"
STYLE
  OUTLINECOLOR 192 192 192
  COLOR 170 255 0
END
  END
END

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


Re: [mapserver-users] expressions for Postgis layers

2008-08-27 Thread Gregor Mosheh

Mike Leahy wrote:

EXPRESSION "('[lcdb1name]' = 'High Producing Exotic Grassland')"


Remove the "" from it. An expression with () around it is the complex 
sort you're looking for.


--
Gregor Mosheh / Greg AllensworthBS, A+, Network+, Security+, Server+
System Administrator, Lead Programmer
HostGIS development & hosting services, http://www.HostGIS.com/

"Remember that no one cares if you can back up,
 only if you can restore." - AMANDA
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] expressions for Postgis layers

2008-08-27 Thread Mike Leahy
Thanks for such a quick answer.  Of course, the mapfile reference had 
the answer right in front of me - it just didn't click.


Regards,
Mike

Gregor Mosheh wrote:

Mike Leahy wrote:

EXPRESSION "('[lcdb1name]' = 'High Producing Exotic Grassland')"


Remove the "" from it. An expression with () around it is the complex 
sort you're looking for.



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