SQL Views don't include Geography Type Fields (from PostGIS)

Description

Per ss01.png I have a PostGIS table that includes both a Geometry and Geography column.

Per ss02.png when I attempt to select the Geography column into a SQL View it is never <sub>absorbed</sub> into the list of fields.

Similarly the Geography type is never generated into the list of fields, if I cast the Geometry to a Geography (eg "select geom::Geography from &lt;table&gt;" as my SQL View statement, naturally I get no lovin' there either).

Environment

None

Activity

Show:
codehaus
April 10, 2015, 4:02 PM

CodeHaus Comment From: jdeolive - Time: Thu, 26 Apr 2012 07:24:03 -0500
---------------------
<p>Sorry, that is what I get for doing stuff late at night. I was just looking for confirmation of my understanding mostly. So I guess the question is did geometry srid guessing ever work for postgis? From my understanding it can't work unless geometries coming back from the datastore have the srid attribute set, which does not seem to happen. I believe the jts wkb reader will set it if it hits ewkb that has that info but the standard wkb format does not.</p>

codehaus
April 10, 2015, 4:02 PM

CodeHaus Comment From: aaime - Time: Thu, 26 Apr 2012 08:57:32 -0500
---------------------
<p>I see. I'm sure it was working when I created sql views but in fact all times I tried lately it wansn't, so I guess it broke along the way</p>

codehaus
April 10, 2015, 4:02 PM

CodeHaus Comment From: sfsmith - Time: Thu, 26 Apr 2012 11:49:32 -0500
---------------------
<p>Hey Guys ... I can confirm that Justin's fix works as intended - Thanks very much! We can get at geography columns in PostGIS tables (and can apply CQL_FILTER operations on them with a bit of cajoling).</p>

<p>SRID guessing has never worked for me in GeoServer SQL Views, on geom or geog, despite these being properly expressed in the PostGIS 1.5 meta tables. If I uncheck <sub>guess</sub> -1 persists, if I try to guess it returns "". Guessing the spatial type always works!</p>

<p>I'll follow up with some tests against PostGIS 2.0. Where the SRID is contained in the spatial column itself things might guess more easily.</p>

codehaus
April 10, 2015, 4:02 PM

CodeHaus Comment From: jdeolive - Time: Tue, 1 May 2012 12:13:26 -0500
---------------------
<p>Ok, resolving this one for now, Sam feel free to open a separate issue regarding guessing of the srid as appropriate.</p>

codehaus
April 10, 2015, 4:02 PM

CodeHaus Comment From: aaime - Time: Sun, 3 Mar 2013 10:04:56 -0600
---------------------
<p>Switching all issues that have been in "resolved" state for more than one month without further comments to "closed" status</p>

Fixed

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

Affects versions

Components

Priority

Medium
Configure