[Geoserver-users] How to specify a geometry column for a featuretype

My 'road' table in postgis has two geometry columns, one is "the_geom"(4326)
and another is "the_geom_google"(google 900913).

When i add a featue type in geoserver web manager ui, geoserver defaults
using "the_geom" column, but what i want is using 'the_geom_google' column
to make a google-overlap WMS.

How can i specify a custom geometry column for a feature type in geoserver.

Thanks for any answer.
--
View this message in context: http://www.nabble.com/How-to-specify-a-geometry-column-for-a-featuretype-tp19369533p19369533.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi,

Add a corresponding line to PostGIS table "geometry_columns".

-Jukka Rahkonen-

-----Alkuperäinen viesti-----
Lähettäjä: geoserver-users-bounces@lists.sourceforge.net puolesta: greed.005
Lähetetty: ma 8.9.2008 13:34
Vastaanottaja: geoserver-users@lists.sourceforge.net
Aihe: [Geoserver-users] How to specify a geometry column for a featuretype

My 'road' table in postgis has two geometry columns, one is "the_geom"(4326)
and another is "the_geom_google"(google 900913).

When i add a featue type in geoserver web manager ui, geoserver defaults
using "the_geom" column, but what i want is using 'the_geom_google' column
to make a google-overlap WMS.

How can i specify a custom geometry column for a feature type in geoserver.

Thanks for any answer.
--
View this message in context: http://www.nabble.com/How-to-specify-a-geometry-column-for-a-featuretype-tp19369533p19369533.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi,

While you can probably get GeoServer to respect the second geometry column by registering it as Jukka suggests you will have issues rendering one column vs the other. There is no real good way in GeoServer to specify which geometry to be used when there are multiple.

If possible its easiest to just use a single geometry column per table. However if this is not possible an alternative is to set up two separate views from the single table. As long as you register the geometry column from each view in the geometry_columns table it should work fine.

-Justin

greed.005 wrote:

My 'road' table in postgis has two geometry columns, one is "the_geom"(4326)
and another is "the_geom_google"(google 900913).

When i add a featue type in geoserver web manager ui, geoserver defaults
using "the_geom" column, but what i want is using 'the_geom_google' column
to make a google-overlap WMS.

How can i specify a custom geometry column for a feature type in geoserver.

Thanks for any answer.

--
Justin Deoliveira
Software Engineer, OpenGeo
http://opengeo.org

Justin Deoliveira ha scritto:

Hi,

While you can probably get GeoServer to respect the second geometry column by registering it as Jukka suggests you will have issues rendering one column vs the other. There is no real good way in GeoServer to specify which geometry to be used when there are multiple.

If possible its easiest to just use a single geometry column per table. However if this is not possible an alternative is to set up two separate views from the single table. As long as you register the geometry column from each view in the geometry_columns table it should work fine.

Sorry to jump in late but... you can control which geometry column gets
used in WMS with SLD, each symbolizer has a <geometry> element allowing
you to choose which geometry should be used for it (going from memory,
you have to check the SLD xml schemas to get the proper syntax).

For WFS it's a different story, you'll always get both column in the output.

Hope this helps
Andrea

Thanks Justin!
I created a view from table, and it work as a normal featuretype in
geoserver and work fine.
So i don't need to write SLD
:slight_smile:

Justin Deoliveira-6 wrote:

Hi,

While you can probably get GeoServer to respect the second geometry
column by registering it as Jukka suggests you will have issues
rendering one column vs the other. There is no real good way in
GeoServer to specify which geometry to be used when there are multiple.

If possible its easiest to just use a single geometry column per table.
However if this is not possible an alternative is to set up two separate
views from the single table. As long as you register the geometry column
from each view in the geometry_columns table it should work fine.

-Justin

greed.005 wrote:

My 'road' table in postgis has two geometry columns, one is
"the_geom"(4326)
and another is "the_geom_google"(google 900913).

When i add a featue type in geoserver web manager ui, geoserver defaults
using "the_geom" column, but what i want is using 'the_geom_google'
column
to make a google-overlap WMS.

How can i specify a custom geometry column for a feature type in
geoserver.

Thanks for any answer.

--
Justin Deoliveira
Software Engineer, OpenGeo
http://opengeo.org

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/How-to-specify-a-geometry-column-for-a-featuretype-tp19369533p19405175.html
Sent from the GeoServer - User mailing list archive at Nabble.com.