[postgis-users] Create a view and dissolve on attribute

Craig Feuerherdt craigfeuerherdt at gmail.com
Wed Aug 16 23:10:15 PDT 2006


Michael,
Thanks for your reply.
I believe that is what I am looking for, however I can not get it to work.
Not sure if it is because my various tables are in two separate schemas or
not. I have copied my SQL below, but it keeps giving me an error;
An error has occured:
ERROR: column c.propertyid does not exist

I tried various combinations of the SQL syntax but to no avail.

View definition:
SELECT c.kilter, GeomUnion(p.the_geom) AS the_geom
FROM vmprop.property_view AS p
JOIN kilter.property AS c ON c.propertyID = p.pfi
GROUP BY c.kilter;

Craig

Is the following what you're looking for?  If not then please explain
> in more detail what you'd like to do.
>
> CREATE VIEW catview AS
> SELECT c.cat, GeomUnion(p.geom) AS geom
> FROM poly AS p
> JOIN category AS c ON c.polyid = p.polyid
> GROUP BY c.cat;
>
> --
> Michael Fuhr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060817/68bba33b/attachment.html>


More information about the postgis-users mailing list