[postgis-users] Creating an ID field in a view
Jose Gomez-Dans
jgomezdans at gmail.com
Fri Mar 30 00:01:27 PDT 2007
Greg,
On 3/29/07, Greg Robillard <greg at ecotrust.org> wrote:
> Perhaps I'm missing something, but in traditional database-speak a view
> is just a read-only version of a table, and a spatial view should be the
> same. So if your base table has a unique, nonrepeating ID field, if you
> include it in the syntax that creates your view it should be correctly
> propagated.
True, but since the Union splits features ("one-to-many" mapping), the
same unique ID from the initial table is assigned to all the resulting
split features. In my case, I have a set of land plots, and I want to
do a Union with a grid. Some parcels (which lie in the boundary) will
get split, and will appear as two different parcels, but still sharing
the same ID code from the initial feature, which is correct, but not
what I want, which is an unique identifier for each of the final
parcels.
Thanks!
Jose
More information about the postgis-users
mailing list