RE: [mapserver-users] WFS Error "column = 1" on msPostGISLayerGetShape

2010-07-12 Thread Benoit PESTY

Thanks for the answers,
Apparently removing the "gml_featureid" "cell_id" line doesn't change anything. 
I suppose that the PK is detected and used.
I have solved the problem by adding "USING UNIQUE oid".
Thanks,



> Date: Fri, 9 Jul 2010 11:19:48 -0500
> From: a...@squeakycode.net
> To: boolean10...@yahoo.com
> CC: tch...@hotmail.com; mapserver-users@lists.osgeo.org
> Subject: Re: [mapserver-users] WFS Error "column = 1" on 
> msPostGISLayerGetShape
> 
> Oh... Yeah... I should pay more attention to the actual message:
> 
>  > HINT: No operator matches the given name and argument type(s). You might
>  > need to add explicit type casts.
> 
> This was not a "field not found" message, I fixed the wrong thing.. 
> oops.  Good catch Carlos.
> 
> -Andy
> 
> 
> 
> On 7/9/2010 11:15 AM, Carlos Ruiz wrote:
> > The cell_id column is of the integer type ? or character varying type ?
> > It must be integer to be able to
> > compare.
> >
> > IC Carlos Ruiz
> >
> > ----
> > *From:* Andy Colson 
> > *To:* Benoit PESTY 
> > *Cc:* mapserver-users@lists.osgeo.org
> > *Sent:* Fri, July 9, 2010 10:23:39 AM
> > *Subject:* Re: [mapserver-users] WFS Error "column = 1" on
> > msPostGISLayerGetShape
> >
> > On 7/9/2010 10:16 AM, Benoit PESTY wrote:
> >  > Hello,
> >  >
> >  > I have a problem configuring a WFS Service.
> >  >
> >  > My layer is defined like this:
> >  >
> >  > LAYER
> >  > NAME " forest_plot_layer"
> >  > TYPE POLYGON
> >  > STATUS ON
> >  > METADATA
> >  > WFS_TITLE "Forest Plots"
> >  > "gml_include_items" "all"
> >  > "gml_featureid" "cell_id"
> >  > END
> >  > DUMP TRUE
> >  > CONNECTIONTYPE postgis
> >  > CONNECTION xx
> >  > DATA "the_geom FROM forest_plot_layer"
> >  > CLASS
> >  > NAME "Forest Plot"
> >  > STYLE
> >  > SIZE 3
> >  > COLOR 0 255 0
> >  > OUTLINECOLOR 0 255 0
> >  > END
> >  > END
> >  > PROJECTION
> >  > "init=epsg:3035"
> >  > END
> >  > END
> >  >
> >  >
> >  > And I have the follwing error :
> >  > --
> >  > [Tue Jul 6 18:49:16 2010].228958 msPostGISLayerGetShape(): Query error.
> >  > Error (ERROR: operator does not exist: character varying = integer LINE
> >  > 1: ...l_id" from forest_plot_layer where "cell_id" = 1
> >  > ^
> >  > HINT: No operator matches the given name and argument type(s). You might
> >  > need to add explicit type casts.
> >  > --
> >  >
> >  > My "forest_plot_layer" table only has a "cell_id" column which is the PK
> >  > and a "the_geom" column.
> >  >
> >  > The WMS service works correctly.
> >  >
> >  > Does anyone have an idea?
> >  >
> >  > Thanks,
> >
> > This: "gml_featureid" "cell_id"
> >
> > Seems to be the culprit. I'm not sure what that does, if you dont need
> > it, delete it.
> >
> > If you do need it, then I'd guess changing your sql to this would help:
> >
> >
> > DATA "the_geom FROM (select cell_id, the_geom from forest_plot_layer) as
> > subq"
> >
> > ... unrelated, I see you dont have "using unique" on your DATA line... I
> > believe it'll speed things up if you use it. (although I have never
> > actually tested the claim).
> >
> > from: http://mapserver.org/input/vector/postgis.html
> >
> > -Andy
> >
> > ___
> > mapserver-users mailing list
> > mapserver-users@lists.osgeo.org <mailto:mapserver-users@lists.osgeo.org>
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
> 
  
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] WFS Error "column = 1" on msPostGISLayerGetShape

2010-07-09 Thread Andy Colson

Oh... Yeah... I should pay more attention to the actual message:

> HINT: No operator matches the given name and argument type(s). You might
> need to add explicit type casts.

This was not a "field not found" message, I fixed the wrong thing.. 
oops.  Good catch Carlos.


-Andy



On 7/9/2010 11:15 AM, Carlos Ruiz wrote:

The cell_id column is of the integer type ? or character varying type ?
It must be integer to be able to
compare.

IC Carlos Ruiz


*From:* Andy Colson 
*To:* Benoit PESTY 
*Cc:* mapserver-users@lists.osgeo.org
*Sent:* Fri, July 9, 2010 10:23:39 AM
*Subject:* Re: [mapserver-users] WFS Error "column = 1" on
msPostGISLayerGetShape

On 7/9/2010 10:16 AM, Benoit PESTY wrote:
 > Hello,
 >
 > I have a problem configuring a WFS Service.
 >
 > My layer is defined like this:
 >
 > LAYER
 > NAME " forest_plot_layer"
 > TYPE POLYGON
 > STATUS ON
 > METADATA
 > WFS_TITLE "Forest Plots"
 > "gml_include_items" "all"
 > "gml_featureid" "cell_id"
 > END
 > DUMP TRUE
 > CONNECTIONTYPE postgis
 > CONNECTION xx
 > DATA "the_geom FROM forest_plot_layer"
 > CLASS
 > NAME "Forest Plot"
 > STYLE
 > SIZE 3
 > COLOR 0 255 0
 > OUTLINECOLOR 0 255 0
 > END
 > END
 > PROJECTION
 > "init=epsg:3035"
 > END
 > END
 >
 >
 > And I have the follwing error :
 > --
 > [Tue Jul 6 18:49:16 2010].228958 msPostGISLayerGetShape(): Query error.
 > Error (ERROR: operator does not exist: character varying = integer LINE
 > 1: ...l_id" from forest_plot_layer where "cell_id" = 1
 > ^
 > HINT: No operator matches the given name and argument type(s). You might
 > need to add explicit type casts.
 > --
 >
 > My "forest_plot_layer" table only has a "cell_id" column which is the PK
 > and a "the_geom" column.
 >
 > The WMS service works correctly.
 >
 > Does anyone have an idea?
 >
 > Thanks,

This: "gml_featureid" "cell_id"

Seems to be the culprit. I'm not sure what that does, if you dont need
it, delete it.

If you do need it, then I'd guess changing your sql to this would help:


DATA "the_geom FROM (select cell_id, the_geom from forest_plot_layer) as
subq"

... unrelated, I see you dont have "using unique" on your DATA line... I
believe it'll speed things up if you use it. (although I have never
actually tested the claim).

from: http://mapserver.org/input/vector/postgis.html

-Andy

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org <mailto: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] WFS Error "column = 1" on msPostGISLayerGetShape

2010-07-09 Thread Carlos Ruiz
The cell_id column is of the integer type ? or character varying type ? It must 
be integer to be able to 

compare.
 

IC Carlos Ruiz




From: Andy Colson 
To: Benoit PESTY 
Cc: mapserver-users@lists.osgeo.org
Sent: Fri, July 9, 2010 10:23:39 AM
Subject: Re: [mapserver-users] WFS Error "column = 1" on msPostGISLayerGetShape

On 7/9/2010 10:16 AM, Benoit PESTY wrote:
> Hello,
>
> I have a problem configuring a WFS Service.
>
> My layer is defined like this:
>
> LAYER
> NAME " forest_plot_layer"
> TYPE POLYGON
> STATUS ON
> METADATA
> WFS_TITLE "Forest Plots"
> "gml_include_items" "all"
> "gml_featureid" "cell_id"
> END
> DUMP TRUE
> CONNECTIONTYPE postgis
> CONNECTION xx
> DATA "the_geom FROM forest_plot_layer"
> CLASS
> NAME "Forest Plot"
> STYLE
> SIZE 3
> COLOR 0 255 0
> OUTLINECOLOR 0 255 0
> END
> END
> PROJECTION
> "init=epsg:3035"
> END
> END
>
>
> And I have the follwing error :
> --
> [Tue Jul 6 18:49:16 2010].228958 msPostGISLayerGetShape(): Query error.
> Error (ERROR: operator does not exist: character varying = integer LINE
> 1: ...l_id" from forest_plot_layer where "cell_id" = 1
> ^
> HINT: No operator matches the given name and argument type(s). You might
> need to add explicit type casts.
> --
>
> My "forest_plot_layer" table only has a "cell_id" column which is the PK
> and a "the_geom" column.
>
> The WMS service works correctly.
>
> Does anyone have an idea?
>
> Thanks,

This: "gml_featureid" "cell_id"

Seems to be the culprit.  I'm not sure what that does, if you dont need 
it, delete it.

If you do need it, then I'd guess changing your sql to this would help:


DATA "the_geom FROM (select cell_id, the_geom from forest_plot_layer) as 
subq"

... unrelated, I see you dont have "using unique" on your DATA line... I 
believe it'll speed things up if you use it.  (although I have never 
actually tested the claim).

from: http://mapserver.org/input/vector/postgis.html

-Andy

___
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] WFS Error "column = 1" on msPostGISLayerGetShape

2010-07-09 Thread Andy Colson

On 7/9/2010 10:16 AM, Benoit PESTY wrote:

Hello,

I have a problem configuring a WFS Service.

My layer is defined like this:

LAYER
NAME " forest_plot_layer"
TYPE POLYGON
STATUS ON
METADATA
WFS_TITLE "Forest Plots"
"gml_include_items" "all"
"gml_featureid" "cell_id"
END
DUMP TRUE
CONNECTIONTYPE postgis
CONNECTION xx
DATA "the_geom FROM forest_plot_layer"
CLASS
NAME "Forest Plot"
STYLE
SIZE 3
COLOR 0 255 0
OUTLINECOLOR 0 255 0
END
END
PROJECTION
"init=epsg:3035"
END
END


And I have the follwing error :
--
[Tue Jul 6 18:49:16 2010].228958 msPostGISLayerGetShape(): Query error.
Error (ERROR: operator does not exist: character varying = integer LINE
1: ...l_id" from forest_plot_layer where "cell_id" = 1
^
HINT: No operator matches the given name and argument type(s). You might
need to add explicit type casts.
--

My "forest_plot_layer" table only has a "cell_id" column which is the PK
and a "the_geom" column.

The WMS service works correctly.

Does anyone have an idea?

Thanks,


This: "gml_featureid" "cell_id"

Seems to be the culprit.  I'm not sure what that does, if you dont need 
it, delete it.


If you do need it, then I'd guess changing your sql to this would help:


DATA "the_geom FROM (select cell_id, the_geom from forest_plot_layer) as 
subq"


... unrelated, I see you dont have "using unique" on your DATA line... I 
believe it'll speed things up if you use it.  (although I have never 
actually tested the claim).


from: http://mapserver.org/input/vector/postgis.html

-Andy

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


[mapserver-users] WFS Error "column = 1" on msPostGISLayerGetShape

2010-07-09 Thread Benoit PESTY

Hello,
I have a problem configuring a WFS Service.
My layer is defined like this:
LAYERNAME " forest_plot_layer"TYPE POLYGONSTATUS ONMETADATA 
WFS_TITLE"Forest Plots" 
"gml_include_items" "all"   "gml_featureid" 
"cell_id" ENDDUMP TRUECONNECTIONTYPE postgisCONNECTION 
xxDATA "the_geom FROM forest_plot_layer" CLASS   NAME 
"Forest Plot"STYLE SIZE 3  COLOR 0 255 0   
OUTLINECOLOR 0 255 0ENDENDPROJECTION
"init=epsg:3035"ENDEND

And I have the follwing error :--[Tue 
Jul  6 18:49:16 2010].228958 msPostGISLayerGetShape(): Query error. Error 
(ERROR:  operator does not exist: character varying = integer LINE 1: ...l_id" 
from forest_plot_layer where "cell_id" = 1  
  ^HINT:  No operator matches the given name and 
argument type(s). You might need to add explicit type 
casts.--
My "forest_plot_layer" table only has a "cell_id" column which is the PK and a 
"the_geom" column.
The WMS service works correctly.
Does anyone have an idea?
Thanks,


  
_
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users