That's great Richard, Thanks for the followup.
Cheers, Dane On Aug 19, 2008, at 1:08 AM, Richard Duivenvoorde wrote: > > Dane, Jukka, > thanks. > > I will try both, didn't know that it's possible to registre a view- > column as a geometry column. > > I will also try to patch the postgis-plugin to have a extra > parameter 'geomcolumn'. > > Regards, > Richard Duivenvoorde > > Richard Duivenvoorde wrote: >> Hi List, >> I've this big set of shp-files per country. >> I've imported every shp-file per country in a table (so for every >> country I've a table 'roads' etc etc). >> Then I tried to make a view over all countries with something like: >> create or replace view all_roads as >> select * from nld_roads >> union all >> select * from lux_roads >> union all >> select * from bel_roads >> Not sure if this is efficient, but anyway... >> If I try to render nld_roads with a given mapnik-config all is fine. >> But when I try to render all_roads (that is using the VIEW as >> datasource) I see error messages in my postgis-log: >> 2008-08-18 18:19:50 CEST ERROR: function extent() does not exist >> at character 61 >> 2008-08-18 18:19:50 CEST HINT: No function matches the given name >> and argument types. You may need to add explicit type casts. >> 2008-08-18 18:19:50 CEST STATEMENT: select >> xmin(ext),ymin(ext),xmax(ext),ymax(ext) from (select extent() as >> ext from all_roads) as tmp >> And looking in the postgis-plugin src I see: >> std::string table_name=table_from_sql(table_); >> std::ostringstream s; >> s << "select f_geometry_column,srid,type from "; >> s << GEOMETRY_COLUMNS <<" where f_table_name='" << table_name<<"'"; >> so apparently stuff went wrong because the geometry-column in the >> VIEW is not registred as a geometry-column in the table >> 'geometry_columns'. >> Now, normally you don't register a geometry column in a view again >> for a view. >> So my question: should/can I (re)register the geometry-column >> (again) for the view (over my tables)? >> Or is there another way to be able to aggragate stuff over several >> tables instead of using a view? >> Or am I on the wrong track anyway ... >> Thanks in advance & regards, >> Richard Duivenvoorde >> _______________________________________________ >> Mapnik-users mailing list >> [email protected] >> https://lists.berlios.de/mailman/listinfo/mapnik-users > _______________________________________________ Mapnik-users mailing list [email protected] https://lists.berlios.de/mailman/listinfo/mapnik-users

