|
From: Brent O. <bre...@gm...> - 2005-12-07 17:33:30
|
You can configure Geoserver through the web interface. Just start
GeoServer and head to http://localhost:8080/geoserver/welcome.do in your
favorite web browser.
Then from there navigate to config->data->stores and create your postgis
datastore there. After that, create a feature type:
config->data->featuretype.
Here is a tutorial on adding a shapefile to geoserver
(http://localhost:8080/geoserver/welcome.do). It follows the same steps
as adding a postgis database.
The get capabilities request returns you enabled Feature Types. If you
have only created a data store, then no feature types will be returned.
A datastore is just a description of where data lives, not what kind of
data or exactly which data. You need a feature type, that references the
data store, to specify what data is available. For example, you have a
data store to a postgis database, you now need a feature type to point
to a table in that database. If you have multiple spatial tables, then
you need multiple feature types, all pointing to the same data store.
From what I can see, your config file looks correct. Here is an example
datastore element in a catalog.xml file:
<catalog>
<datastores>
<datastore id="geoserver-demo"
enabled="true"
namespace="gd">
<!-- enabled is optional, defaults to true -->
<description>Data taken from the USGS Digital Line Graph for
Auburn, Washington</description>
<connectionParams>
<parameter name="dbtype" value="postgis"/>
<parameter name="host" value="localhost"/>
<parameter name="port" value="5432"/>
<parameter name="database" value="demo-geoserver"/>
<parameter name="user" value="username"/>
<parameter name="passwd" value="password"/>
</connectionParams>
</datastore>
</datastores>
Brent Owens
TOPP
Albrecht Weiser wrote:
>Hello geoserver-community,
>i've installed a PostGreSQL8.0/PostGIS-database-server at localhost and now want to
>use it with geoserver. I've configurated the db-connection in the
>catalog.xml and it looks something like this:
>
><datastore enabled="true" id="localPostgis" namespace="geo">
> <connectionParams>
> <parameter name="user" value="gpuser"/>
> <parameter name="passwd" value="pass"/>
> <parameter name="host" value="localhost"/>
> <parameter name="port" value="5432"/>
> <parameter name="database" value="gpgeodata"/>
> <parameter name="dbtype" value="postgis"/>
> </connectionParams>
> </datastore>
>i'd like to test it now e.g. with a GetCapabilities Request like
>http://localhost:8080/geoserver/wms?SERVICE=WMS&REQUEST=GetCapabilities
>and it should return the contained features. But it doesn't. Maybe i
>have to make some additional settings in another configuration file?
>Maybe i forgot something else?
>
>Thanks in advance
>
>Albrecht Weiser
>
>mailto:we...@ge...
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
>for problems? Stop! Download the new AJAX search engine that makes
>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
>http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
>_______________________________________________
>Geoserver-users mailing list
>Geo...@li...
>https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
>
|