From: Michael T. <MT...@dr...> - 2009-10-30 23:13:34
|
Hi Justin, I am having a very similar problem with views in PostGIS after upgrading to 2.0 2009-10-30 16:11:21,237 WARN [geotools.jdbc] - No primary key or unique index found for tod_projects_residential. 2009-10-30 16:11:21,252 INFO [geoserver.catalog] - Loaded feature type 'DRCOG:tod_projects_residential' The layer loads but is blank in the openlayers preview. To confirm, there is no entry of the views in the geometry_columns table. Would a solution be to just add the views to the geometry_columns table? Thanks in advance, Mike Michael Tafel| GIS Specialist| Denver Regional Council of Governments -----Original Message----- From: Justin Deoliveira [mailto:jde...@op...] Sent: Friday, October 30, 2009 3:01 PM To: Franco Nogarin Cc: geo...@li... Subject: Re: [Geoserver-users] 1st post - Help - Geoserver 20a on tomcat6 Hi Franco, What we meant was that GeoServer 2.0 requires any views to have the geometry column registered in the geometry_columns table, whereas 1.7.x did not. This is a bug that has been reported in the tracker. http://jira.codehaus.org/browse/GEOT-2664 Can you confirm that your views have or don't have geometry column entries? -Justin Franco Nogarin wrote: > So, if I understand, you are saying that the reason all of my geoserver > 1.7.x data in postgis, which is all in views, is not working in 2.0 is > the heuristic approach has been removed. > If so, what then do I need to do to make my views geoserver 2.0 compatible. > here is a view that works perfectly under 1.7.4 but not at all under 2.0 > -- View: v_stations > > -- DROP VIEW v_stations; > > CREATE OR REPLACE VIEW v_stations AS > SELECT n.nid AS oid, n.nid, n.title, > st_x(ctw.field_stn_location_openlayers_wkt::geometry) AS x, > st_y(ctw.field_stn_location_openlayers_wkt::geometry) AS y, > ctw.field_elevation_value AS elevation, ctw.field_stn_type_value AS > type, geomfromtext(ctw.field_stn_location_openlayers_wkt, 4326) AS geom > FROM node n > JOIN content_type_wxstation ctw ON n.nid = ctw.nid::integer > WHERE n.status <> 0 AND n.type::text = 'wxstation'::text; > > ALTER TABLE v_stations OWNER TO postgres; > > > On Thu, Oct 29, 2009 at 7:43 PM, Andrea Aime <aa...@op... > <mailto:aa...@op...>> wrote: > > Franco Nogarin ha scritto: > > Well, as I said, ALL of my postgis layers dont work. node_vid is > always an integer. I already included a view definition for analsis. > More reading on the subject points to the fact that GS2 needs a > PK in a view and PGsql cant do that. > > > There is no need for pk over views, that's a trick needed only for > people that want views and also want them updatable (via triggers), > something that actually works only with Oracle right now. > > But 2.0 requires one to register all of the views in the > geometry_columns table as if they were tables so that the nature > of the geometric column and its native srid can be assessed. > > The old postgis connection had some heurisitics, basically if the > info could not be found in geometry_columns it read the first > geometry out of the table and assumed (hoped) that all of the other > rows had > the same geometric type and srid. > > Cheers > Andrea > > > > > -- > Socrates said: > "The only true wisdom is in knowing you know nothing." > > Henry Ward Beecher said: > "The art of being happy lies in the power of extracting happiness from > common things." > > Bob Marley Said "Don't gain the world and lose your soul, wisdom is > better than silver or gold." > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > > > ------------------------------------------------------------------------ > > _______________________________________________ > Geoserver-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geoserver-users -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Geoserver-users mailing list Geo...@li... https://lists.sourceforge.net/lists/listinfo/geoserver-users |