[Geoserver-devel] Question on PostGIS and views

Hello,

I'm fairly new to Geoserver and GIS in general. I've managed to get
Postgress/PostGIS installed and my shape files moved into the database. I
configured the server to read the geometry from the tables and can display
overlays of the shapefiles that are read directly from the tables. However,
when I try to merge the shape data with some agricultural data via a view I
am having issues.

I can see the view that I have created in the Feature Type Name drop down
list, however, when I go to generate a bounding box from the view, I get the
following error:

The FeatureType 'varieties' has a NULL extent.
HINT: the dataset is empty or has no default geometry attribute.

It does not appear as if the geometry column is being returned correctly from
the database.

Any advice would be really appreciated.

Thanks,
Dan

Hello Daniel:

Chris Holmes offers a possible fix to you problem here on the Wiki:
http://docs.codehaus.org/display/GEOSDOC/PostGIS+DataStore

Alex

On 10/4/06, Sadowski, Daniel <Daniel.Sadowski@anonymised.com> wrote:

Hello,

I'm fairly new to Geoserver and GIS in general. I've managed to get
Postgress/PostGIS installed and my shape files moved into the database. I
configured the server to read the geometry from the tables and can display
overlays of the shapefiles that are read directly from the tables. However,
when I try to merge the shape data with some agricultural data via a view I
am having issues.

I can see the view that I have created in the Feature Type Name drop down
list, however, when I go to generate a bounding box from the view, I get the
following error:

The FeatureType 'varieties' has a NULL extent.
HINT: the dataset is empty or has no default geometry attribute.

It does not appear as if the geometry column is being returned correctly from
the database.

Any advice would be really appreciated.

Thanks,
Dan

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Hi Daniel,

When you create a view postgis wont update the geometry_columns table
even if the view contains a geometry column. It is a limitation of postgres.

So you will have to create a geometry_columns row manually (I don't
think AddGEometryColumn will work either).

-Justin

Sadowski, Daniel wrote:

Hello,

I'm fairly new to Geoserver and GIS in general. I've managed to get
Postgress/PostGIS installed and my shape files moved into the database. I
configured the server to read the geometry from the tables and can display
overlays of the shapefiles that are read directly from the tables. However,
when I try to merge the shape data with some agricultural data via a view I
am having issues.

I can see the view that I have created in the Feature Type Name drop down
list, however, when I go to generate a bounding box from the view, I get the
following error:

The FeatureType 'varieties' has a NULL extent.
HINT: the dataset is empty or has no default geometry attribute.

It does not appear as if the geometry column is being returned correctly from
the database.

Any advice would be really appreciated.

Thanks,
Dan

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

!DSPAM:1004,45242322154492051017194!

--
Justin Deoliveira
jdeolive@anonymised.com
The Open Planning Project
http://topp.openplans.org

Hi,

  It sounds like the geometry entry is missing. Did you make an entry
for the new view?

INSERT INTO "geometry_columns" VALUES
('','public','test','geom',2,4326,'MULTIPOLYGON');

More details here:
http://docs.codehaus.org/display/GEOSDOC/PostGIS+DataStore

randy

-----Original Message-----
From: geoserver-devel-bounces@lists.sourceforge.net
[mailto:geoserver-devel-bounces@lists.sourceforge.net] On Behalf Of
Sadowski, Daniel
Sent: Wednesday, October 04, 2006 3:07 PM
To: geoserver-devel@lists.sourceforge.net
Subject: [Geoserver-devel] Question on PostGIS and views

Hello,

I'm fairly new to Geoserver and GIS in general. I've managed to get
Postgress/PostGIS installed and my shape files moved into the database. I
configured the server to read the geometry from the tables and can display
overlays of the shapefiles that are read directly from the tables. However,
when I try to merge the shape data with some agricultural data via a view I
am having issues.

I can see the view that I have created in the Feature Type Name drop down
list, however, when I go to generate a bounding box from the view, I get the
following error:

The FeatureType 'varieties' has a NULL extent.
HINT: the dataset is empty or has no default geometry attribute.

It does not appear as if the geometry column is being returned correctly
from
the database.

Any advice would be really appreciated.

Thanks,
Dan

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel