[Geoserver-devel] feature type editor shows "empty" on geometry field

Hi,

does anyone know what can cause the feature type editor has a null value for the geometry column ?

It just looks like this
wkb_geometry:

I've checked that
1) WMS requests work, seems to render fine as points
2) The table / column is in geomentry_columns
3) The srsid is in spatial_ref_sys
4) Column is defined as

wkb_geometry | geometry | not null

with
"MORIS_ATL_EXT_PT_wkb_geometry" gist (wkb_geometry) CLUSTER

Shouldanyone want to check, 11 Mb of data can be found here: http://atlas.openplans.org/~ak/MORIS_ATL_EXT_PT.psql.gz

To register the geomentry column:
INSERT INTO geometry_columns VALUES('', 'public','MORIS_ATL_EXT_PT','wkb_geometry',2,26986,'GEOMETRY');

Merry xmas to those in Europe and happy holidays to the rest :wink:
-Arne

--
Arne Kepp
OpenGeo - http://opengeo.org
Expert service straight from the developers

Hmmm... your list of stuff are the only things i can think of. I am not sure if you are set up with a gs environment to debug. If you are not feel free to send me a dump of the data and i can help debug.

-Justin

Arne Kepp wrote:

Hi,

does anyone know what can cause the feature type editor has a null value for the geometry column ?

It just looks like this
wkb_geometry:

I've checked that
1) WMS requests work, seems to render fine as points
2) The table / column is in geomentry_columns
3) The srsid is in spatial_ref_sys
4) Column is defined as

wkb_geometry | geometry | not null

with
"MORIS_ATL_EXT_PT_wkb_geometry" gist (wkb_geometry) CLUSTER

Shouldanyone want to check, 11 Mb of data can be found here: http://atlas.openplans.org/~ak/MORIS_ATL_EXT_PT.psql.gz

To register the geomentry column:
INSERT INTO geometry_columns VALUES('', 'public','MORIS_ATL_EXT_PT','wkb_geometry',2,26986,'GEOMETRY');

Merry xmas to those in Europe and happy holidays to the rest :wink:
-Arne

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Hi Justin,

I don't have a complete GeoTools setup in Eclipse, and I'm a bit swamped, so I'd appreciate a hand if you want to look at it while it's current. If not, I can also just make a ticket of it, I'm going to have to work around it anyway.

See the last few lines below for data, the whole thing (big!) is massgis_kml on db.opengeo.org

In the mean time I've also confirmed that it's not a known Postgis issue (upgraded GEOS from 3.0.0 to 3.0.3 and Postgis from 1.3.2 to 1.3.5).

SELECT GeometryType(wkb_geometry) FROM "MORIS_ATL_EXT_PT" LIMIT 1; return POINT, which makes sense.

-Arne

Justin Deoliveira wrote:

Hmmm... your list of stuff are the only things i can think of. I am not sure if you are set up with a gs environment to debug. If you are not feel free to send me a dump of the data and i can help debug.

-Justin

Arne Kepp wrote:

Hi,

does anyone know what can cause the feature type editor has a null value for the geometry column ?

It just looks like this
wkb_geometry:

I've checked that
1) WMS requests work, seems to render fine as points
2) The table / column is in geomentry_columns
3) The srsid is in spatial_ref_sys
4) Column is defined as
wkb_geometry | geometry | not null

with
"MORIS_ATL_EXT_PT_wkb_geometry" gist (wkb_geometry) CLUSTER

Shouldanyone want to check, 11 Mb of data can be found here: http://atlas.openplans.org/~ak/MORIS_ATL_EXT_PT.psql.gz

To register the geomentry column:
INSERT INTO geometry_columns VALUES('', 'public','MORIS_ATL_EXT_PT','wkb_geometry',2,26986,'GEOMETRY');

Merry xmas to those in Europe and happy holidays to the rest :wink:
-Arne

--
Arne Kepp
OpenGeo - http://opengeo.org
Expert service straight from the developers

Hi Arne,

Looked into it. Basically this will happen anytime a feature type does not report a concrete geometry for its type. Which happens in this case b/c of type in geometry_columns is 'GEOMETRY'.

To fix it just change the type to POINT, and you will get "pointProperty" on the feature type page. We could also have the type be set to "geometryProperty" for this case, rather than null. However since these values are not really used i am not sure it is a big win.

-Justin

Arne Kepp wrote:

Hi Justin,

I don't have a complete GeoTools setup in Eclipse, and I'm a bit swamped, so I'd appreciate a hand if you want to look at it while it's current. If not, I can also just make a ticket of it, I'm going to have to work around it anyway.

See the last few lines below for data, the whole thing (big!) is massgis_kml on db.opengeo.org

In the mean time I've also confirmed that it's not a known Postgis issue (upgraded GEOS from 3.0.0 to 3.0.3 and Postgis from 1.3.2 to 1.3.5).

SELECT GeometryType(wkb_geometry) FROM "MORIS_ATL_EXT_PT" LIMIT 1; return POINT, which makes sense.

-Arne

Justin Deoliveira wrote:

Hmmm... your list of stuff are the only things i can think of. I am not sure if you are set up with a gs environment to debug. If you are not feel free to send me a dump of the data and i can help debug.

-Justin

Arne Kepp wrote:

Hi,

does anyone know what can cause the feature type editor has a null value for the geometry column ?

It just looks like this
wkb_geometry:

I've checked that
1) WMS requests work, seems to render fine as points
2) The table / column is in geomentry_columns
3) The srsid is in spatial_ref_sys
4) Column is defined as
wkb_geometry | geometry | not null

with
"MORIS_ATL_EXT_PT_wkb_geometry" gist (wkb_geometry) CLUSTER

Shouldanyone want to check, 11 Mb of data can be found here: http://atlas.openplans.org/~ak/MORIS_ATL_EXT_PT.psql.gz

To register the geomentry column:
INSERT INTO geometry_columns VALUES('', 'public','MORIS_ATL_EXT_PT','wkb_geometry',2,26986,'GEOMETRY');

Merry xmas to those in Europe and happy holidays to the rest :wink:
-Arne

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Hi,

thanks for looking into it. The issue I was trying to figure out was caused by wacko bounds and an incorrect SLD on data I didn't really know.

I'm not sure the column type is the whole explanation though, as far as I can see all our postgis databases only have "geometry" as the type, and you have to use the GeometryType() function to figure out what lies behind. I asked about something related in the Postgis channel a week ago, I got the impression that this was the intended behavior.

So maybe there's some subtlety about types that I haven't understood, but GeoServer is generally able to figure it out when the column type is "geometry". windpower_grid in the massgis database (not massgis_kml) on the same server is an example. If I was going to make a wild guess, it would be that the upper case table names are not escaped properly with double quotation marks.

Anyway, it doesn't seem to be a real problem, except maybe for loading layers through the REST module, which isn't stable anyway.

-Arne

Justin Deoliveira wrote:

Hi Arne,

Looked into it. Basically this will happen anytime a feature type does not report a concrete geometry for its type. Which happens in this case b/c of type in geometry_columns is 'GEOMETRY'.

To fix it just change the type to POINT, and you will get "pointProperty" on the feature type page. We could also have the type be set to "geometryProperty" for this case, rather than null. However since these values are not really used i am not sure it is a big win.

-Justin

Arne Kepp wrote:

Hi Justin,

I don't have a complete GeoTools setup in Eclipse, and I'm a bit swamped, so I'd appreciate a hand if you want to look at it while it's current. If not, I can also just make a ticket of it, I'm going to have to work around it anyway.

See the last few lines below for data, the whole thing (big!) is massgis_kml on db.opengeo.org

In the mean time I've also confirmed that it's not a known Postgis issue (upgraded GEOS from 3.0.0 to 3.0.3 and Postgis from 1.3.2 to 1.3.5).

SELECT GeometryType(wkb_geometry) FROM "MORIS_ATL_EXT_PT" LIMIT 1; return POINT, which makes sense.

-Arne

Justin Deoliveira wrote:

Hmmm... your list of stuff are the only things i can think of. I am not sure if you are set up with a gs environment to debug. If you are not feel free to send me a dump of the data and i can help debug.

-Justin

Arne Kepp wrote:

Hi,

does anyone know what can cause the feature type editor has a null value for the geometry column ?

It just looks like this
wkb_geometry: I've checked that
1) WMS requests work, seems to render fine as points
2) The table / column is in geomentry_columns
3) The srsid is in spatial_ref_sys
4) Column is defined as
wkb_geometry | geometry | not null

with
"MORIS_ATL_EXT_PT_wkb_geometry" gist (wkb_geometry) CLUSTER

Shouldanyone want to check, 11 Mb of data can be found here: http://atlas.openplans.org/~ak/MORIS_ATL_EXT_PT.psql.gz

To register the geomentry column:
INSERT INTO geometry_columns VALUES('', 'public','MORIS_ATL_EXT_PT','wkb_geometry',2,26986,'GEOMETRY');

Merry xmas to those in Europe and happy holidays to the rest :wink:
-Arne

--
Arne Kepp
OpenGeo - http://opengeo.org
Expert service straight from the developers