Geog 480: Principles of GIS
Guofeng Cao
CyberInfrastructure and Geospatial Information Laboratory
Department of Geography
National Center for Supercomputing Applications (NCSA)
University of Illinois at Urbana-Champaign
What we have learned
o
o
o
o
Hybrid, integrated, and composable architectures
Distributed systems
Distributed databases
Location-aware computing
Geoserver Hands-on
Share your data using Geoserver
• Publishing your data through GeoServer consists of three steps
• Login to the Geoserver
(http://geog480.cigi.illinois.edu:8080/geoserver)
• An account with the username ‘Geog480’ and passwd
‘Geog480’ as database has been created
• Create a DataStore for your feature data (you will create
Coverage stores for raster datasets)
• Create a FeatureType for feature data (create Coverages for
raster datasets)
A good tutorial illustrating how to add shapefile data to geoserver
can be
found http://docs.geoserver.org/stable/en/user/gettingstarted/shape
file-quickstart/index.html
Adding PostGIS datasets
• Login in to the server with username and password.
• After logging in, click on Stores (in the Data section), then
Add new store.
• Now in the new DataStore interface. Select 'postgis' from
'Vector Data Sources' section.
o You should get a new interface that will have various text boxes. The five important
options for you to specify are a) Workspace; b) Data Source Name c) database; d)
user; e) password. Select your group name as appropriate, from the drop down list for
workspace. Give a unique name for the data store. The database name should be the
name of that contains the postgis data. Then enter your database username and
password.
o Note: hostname should be 'localhost', port should be '5432' and schema should be
'public'. These values should be correctly populated by default and you do not need to
change them.
o Click on Save
o Now you have created a new datastore that will talk to the postgis database
• This will automatically lead to a new layer interface that can
be used to add a new feature type.
o Note you can also reach the new layer page by clicking on layer (on left panel), then
“Add a new resource” and selecting your datasource form the drop down menu.
o You will see the data from the previously added postgis datastore in a list.
o Click on publish next to the data layer you wish to create.
o This will lead you to a new interface that will allow you to specify information on this
layer.
o On this page a) Select an appropriate style sheet (in publish tab); b) Click on 'Lookup
SRS' button or manually enter the appropriate SRID; c) Click on 'Compute from Data'
link which is next to the Bounding Box fields. You should be able to leave other values
as defaults; and d) Be sure to mark the layer as enabled (publish tab). Finally Click
'Save' button.
o Please remember to complete the information on both Data and Publish tab.
o Your layer from the PostGIS database should now be available as a map, through a
WMS interface.
• Go to the demo page on the GeoServer (here) and click on
the layer you just created.
References
• NOTE: Tutorial on adding a PostGIS table from Geoserver
documentation.
• GeoServer
• GeoServer User Guide
• GeoServer Tutorials
• End of this topic
Download

Geoserver-hands-on - CyberInfrastructure and Geospatial