Creating a Data Store

Log into the GeoServer admin portal by visiting http://localhost:8080/geoserver/ in your browser and entering the credentials admin/geoserver.

Creating a Workspace

Recall that in GeoServer, every data store belongs to a workspace. Create a new workspace by selecting Data > Workspaces from the menu at left. Select Add new workspace. Name the workspace lc and give it the URI http://launchcode.org.

Creating the Store

Visit Data > Stores and select Add store. Select Shapefile from the Vector Data Sources list. Fill out the required fields, and then browse to the .shp file that you previously placed in stl-parks subdirectory of GeoServer's data directory.

After clicking on the Publish link, you will see the Edit Layer form. Scroll down to the Coordinate Reference Systems section. This is where we configure the native and published SRS for the layer. Notice that the Native SRS field contains UNKNOWN, with the link at right showing an SRS named "NAD_1983_StatePlane_Missouri_East_FIPS_2401_Feet..." This SRS is the spatial reference system declared within the shapefile itself, but if we try to find it within GeoServer, we will fail.

Click on Find next to the Declared SRS field and search for "1983". The only result returned is not the SRS described by the file. In the next section, we'll fix this issue by adding the SRS to GeoServer and finally publishing the layer.

Last updated