using postgres-views as feature-type in geoserver

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

using postgres-views as feature-type in geoserver

Henriksen, Jonas F
Hi,

I have installed geoserver 1.3.0 RC1 which I read in the changelog should allow the use of postgres-views as feature-types. This is a very handy feature. However, I cant get geoserver to detect the default geometry column. Any suggestion how to fix this?

my view:

CREATE OR REPLACE VIEW distview AS
 SELECT d.oid AS oid,
d.gid AS gid,
d.id AS id,
transform(d.the_geom, 4326) AS the_geom,
time_interval AS time,
sp.nor_common_name AS name,
st.name AS stage
FROM distribution d, species sp, stage st
WHERE st.stage=d.stage AND sp.species=d.species ;

regards Jonas:))))

--
Jonas F Henriksen
Institute of Marine Research
Norsk Marint Datasenter
PO Box 1870 Nordnes
5817 Bergen
Norway
 
Phone: +47 55238441





-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: using postgres-views as feature-type in geoserver

Alex Petkov
Make sure that you have the appropriate entry in the 'geometry_columns'
table for your newly-created view.

Alex


                                                                       
             "Henriksen, Jonas                                        
             F"                                                        
             <jonas.f.henrikse                                          To
             [hidden email]>                 <[hidden email].
             Sent by:                  net>                            
             geoserver-users-a                                          cc
             [hidden email]                                        
             forge.net                                             Subject
                                       [Geoserver-users] using        
                                       postgres-views as feature-type in
             06/24/2005 08:47          geoserver                      
             AM                                                        
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       




Hi,

I have installed geoserver 1.3.0 RC1 which I read in the changelog should
allow the use of postgres-views as feature-types. This is a very handy
feature. However, I cant get geoserver to detect the default geometry
column. Any suggestion how to fix this?

my view:

CREATE OR REPLACE VIEW distview AS
 SELECT d.oid AS oid,
d.gid AS gid,
d.id AS id,
transform(d.the_geom, 4326) AS the_geom,
time_interval AS time,
sp.nor_common_name AS name,
st.name AS stage
FROM distribution d, species sp, stage st
WHERE st.stage=d.stage AND sp.species=d.species ;

regards Jonas:))))

--
Jonas F Henriksen
Institute of Marine Research
Norsk Marint Datasenter
PO Box 1870 Nordnes
5817 Bergen
Norway

Phone: +47 55238441





-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: using postgres-views as feature-type in geoserver

David Dabney
In reply to this post by Henriksen, Jonas F
Jonas,

I am in the same place you are in regard to this problem.  It would be
very nice for me to be able to use my views.  I'm new to GeoServer, but
went through the archives yesterday and was able to get the default
geometry column to be detected by manually adding a row to the
geometry_columns table for my view.  This worked and the view shows up
in WFS:GetCapabilities.

 However, I get errors when I try to do a GetFeature request.  I'm
getting a translator error.  If anyone has an idea about this it would
be much appreciated.  In some post something about naming one of the
fields gid was mentioned.

-Dave

Henriksen, Jonas F wrote:

>Hi,
>
>I have installed geoserver 1.3.0 RC1 which I read in the changelog should allow the use of postgres-views as feature-types. This is a very handy feature. However, I cant get geoserver to detect the default geometry column. Any suggestion how to fix this?
>
>my view:
>
>CREATE OR REPLACE VIEW distview AS
> SELECT d.oid AS oid,
>d.gid AS gid,
>d.id AS id,
>transform(d.the_geom, 4326) AS the_geom,
>time_interval AS time,
>sp.nor_common_name AS name,
>st.name AS stage
>FROM distribution d, species sp, stage st
>WHERE st.stage=d.stage AND sp.species=d.species ;
>
>regards Jonas:))))
>
>--
>Jonas F Henriksen
>Institute of Marine Research
>Norsk Marint Datasenter
>PO Box 1870 Nordnes
>5817 Bergen
>Norway
>
>Phone: +47 55238441
>
>
>
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>from IBM. Find simple to follow Roadmaps, straightforward articles,
>informative Webcasts and more! Get everything you need to get up to
>speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
>_______________________________________________
>Geoserver-users mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>  
>

--
~~~~~~~~~~~~~~~~~~~~~~~
David Dabney
OHH Programmer/Database Specialist
NOAA Hollings Marine Lab/JHT
331 Fort Johnson Rd
Charleston, SC 29412
843.762.8984
843.762.8811 receptionist
843.762.8737 fax
[hidden email]



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

SV: using postgres-views as feature-type in geoserver

Henriksen, Jonas F
In reply to this post by Henriksen, Jonas F
Thanks,

after adding a line in the geometry_columns-table, my view works perfect. I kept the id and gid-columns from the original table the view is created from.

regards Jonas:)))

--
Jonas F Henriksen
Institute of Marine Research
Norsk Marint Datasenter
PO Box 1870 Nordnes
5817 Bergen
Norway
 
Phone: +47 55238441


-----Opprinnelig melding-----
Fra: David Dabney [mailto:[hidden email]]
Sendt: 24. juni 2005 17:07
Til: Henriksen, Jonas F
Kopi: [hidden email]
Emne: Re: [Geoserver-users] using postgres-views as feature-type in
geoserver


Jonas,

I am in the same place you are in regard to this problem.  It would be
very nice for me to be able to use my views.  I'm new to GeoServer, but
went through the archives yesterday and was able to get the default
geometry column to be detected by manually adding a row to the
geometry_columns table for my view.  This worked and the view shows up
in WFS:GetCapabilities.

 However, I get errors when I try to do a GetFeature request.  I'm
getting a translator error.  If anyone has an idea about this it would
be much appreciated.  In some post something about naming one of the
fields gid was mentioned.

-Dave

Henriksen, Jonas F wrote:

>Hi,
>
>I have installed geoserver 1.3.0 RC1 which I read in the changelog should allow the use of postgres-views as feature-types. This is a very handy feature. However, I cant get geoserver to detect the default geometry column. Any suggestion how to fix this?
>
>my view:
>
>CREATE OR REPLACE VIEW distview AS
> SELECT d.oid AS oid,
>d.gid AS gid,
>d.id AS id,
>transform(d.the_geom, 4326) AS the_geom,
>time_interval AS time,
>sp.nor_common_name AS name,
>st.name AS stage
>FROM distribution d, species sp, stage st
>WHERE st.stage=d.stage AND sp.species=d.species ;
>
>regards Jonas:))))
>
>--
>Jonas F Henriksen
>Institute of Marine Research
>Norsk Marint Datasenter
>PO Box 1870 Nordnes
>5817 Bergen
>Norway
>
>Phone: +47 55238441
>
>
>
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>from IBM. Find simple to follow Roadmaps, straightforward articles,
>informative Webcasts and more! Get everything you need to get up to
>speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
>_______________________________________________
>Geoserver-users mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>  
>

--
~~~~~~~~~~~~~~~~~~~~~~~
David Dabney
OHH Programmer/Database Specialist
NOAA Hollings Marine Lab/JHT
331 Fort Johnson Rd
Charleston, SC 29412
843.762.8984
843.762.8811 receptionist
843.762.8737 fax
[hidden email]



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. <a href="http://ads.osdn.com/?ad_idt77&alloc_id492&op=click">http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users