[Geoserver-users] I have a problem

Dear Justin,
Hello,I have a boring problem.According to the example of using Geoserver to connect PostGIS,I know something about it.But when I create a view as a Featuretype and generate a bbox following the tutorials,there are always a wrong hint–The FeatureType ‘test’ has a NULL extent.HINT: the dataset is empty or has no default geometry attribute.
I don’t know the structure of the countries table you offered and how to create a right view with the default table of PostGIS.I hope you can spare your time to see my problem during your busy time.Additionally,the spatial_ref_sys table I use has srid, auth_name, auth_srid, srtext and proj4text fields.Thank you very much! Sincerely yours,
Yang


抢注!网易隆重推出新一代免费邮箱 >>

Hi Yang,

To use postgis with a view, you must manually make an entry in the geometry_columns table for the view. So for instance, if you original table is:

mytable(geom geometry, col1 varchar, col2 int );

And you want to create the following view of it:

create view mytable_view as select geometry, col1 from mytable;

You must also insert an entry in the geometry_columns table like so:

insert into geometry_columns( '','public','mytable_view','geom',2,0,'GEOMETRY');

Hope that helps.

-Justin

yangzhaohui wrote:

Dear Justin,
   Hello,I have a boring problem.According to the example of using Geoserver to connect PostGIS,I know something about it.But when I create a view as a Featuretype and generate a bbox following the tutorials,there are always a wrong hint--The FeatureType 'test' has a NULL extent.HINT: the dataset is empty or has no default geometry attribute.
   I don't know the structure of the countries table you offered and how to create a right view with the default table of PostGIS.I hope you can spare your time to see my problem during your busy time.Additionally,the spatial_ref_sys table I use has srid, auth_name, auth_srid, srtext and proj4text fields.Thank you very much! Sincerely yours, Yang
                                                      
------------------------------------------------------------------------
抢注!网易隆重推出新一代免费邮箱 >> <http://www.126.com/&gt;

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org