[postgis-users] srid, geometry type in spatial view

John Callahan john.callahan at udel.edu
Thu Mar 21 11:39:41 PDT 2013


Forgot to mention, we are currently running Postgres 9.0.7 with PostGIS
2.0.2 on Windows.

- John



On Thu, Mar 21, 2013 at 2:37 PM, John Callahan <john.callahan at udel.edu>wrote:

> I have a few spatial tables that are POLYGON and MULTIPOLYGON as the
> geometry type, each with between 1k and 10k features.  They only a couple
> of attributes and generally look good., and display in QGIS nicely.  I also
> have a separate (non-spatial) data table (called geodatatable) with about
> 50 records that contains numerous attributes and is joined to the polygons
> as follows
>
> CREATE OR REPLACE VIEW public.geomapview AS
>  SELECT geomap.gid, geomap.unitcode, tab.name, tab.description,
> tab.geologicunittype, tab.metadata, geomap.geom
>    FROM geomap
>    LEFT JOIN geodatatable tab ON geomap.unitcode::text =
> tab.unitcode::text;
>
> However. when I look at the geometry_columns view, the srid is listed as 0
> and the type is listed as GEOMETRY.  Shouldn't they be the same as the
> spatial table?  Is there a way to manually fix this or something I can
> check?  Thanks for your help.
>
> - John
>
>
> John Callahan
> Research Scientist
> Delaware Geological Survey
> University of Delaware
> http://www.dgs.udel.edu
> john.callahan at udel.edu
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130321/6c7bca5a/attachment.html>


More information about the postgis-users mailing list