Skip to main content

How to Create & Publish WFS in GeoServer. తెలుగులో నేర్చుకుందాం

How to Create & Publish WFS (Web Feature Services) in GeoServer.
తెలుగులో నేర్చుకుందాం


What is WFS?

The Web Feature Service (WFS) is a standard created by the Open Geospatial Consortium (OGC) for creating, modifying and exchanging vector format geographic information on the Internet using HTTP. A WFS encodes and transfers information in Geography Markup Language (GML), a subset of XML.

Publishing Vector Data as WFS

Create WFS
  • Once the layers/layer groups added to Geoserver, it’s time to publish the data as WFS. Go through the steps of publishing a Shapefile with GeoServer
  • Click on the GeoServer logo at the top left corner as shown in the figure 42

Figure 42 - Geoserver Welcome page
  • On the right side of the page, WCS, WFS, WMS, TMS, WMS-C & WMTS services capabilities will be displayed
  • Under WFS right click on 2.0.0 and copy link address and paste it in notepad.

Figure 43 - Copy link address

  • The current version of WFS is 2.0.0. GeoServer supports versions 2.0.0, 1.1.0, and 1.0.0. Although there are some important differences between the versions, the request syntax often remains the same.
  • The major differences between the WFS versions are:
  • WFS 1.1.0 and 2.0.0 return GML3 as the default GML, whereas in WFS 1.0.0, the default is GML2. GML3 adopts marginally different ways of specifying a geometry. GeoServer supports requests in both GML3 and GML2 formats.
  • In WFS 1.1.0 and 2.0.0, the SRS (Spatial Reference System, or projection) is specified with urn:x-ogc:def:crs:EPSG:XXXX, whereas in WFS 1.0.0 the specification was http://www.opengis.net/gml/srs/epsg.xml#XXXX. This change has implications for the axis order of the returned data.
  • WFS 1.1.0 and 2.0.0 support on-the-fly reprojection of data, which supports returning the data in a SRS other than the native SRS.
  • WFS 2.0.0 introduces a new version of the filter encoding specification, adding support for temporal filters.
  • WFS 2.0.0 supports joins via a GetFeature request.
  • WFS 2.0.0 adds the ability to page results of a GetFeature request via the startIndex and count parameters. GeoServer now supports this functionality in WFS 1.0.0 and 1.1.0.
  • WFS 2.0.0 supports stored queries, which are regular WFS queries stored on the server such that they may be invoked by passing the appropriate identifier with a WFS request.
  • WFS 2.0.0 supports SOAP (Simple Object Access Protocol) as an alternative to the OGC interface – Source GeoServer

Figure 44 - WFS link pasted in notepad
  1. Add WFS to QGIS
Now add WFS in QGIS.
In the browser panel, locate the WFS/OCG API features and right click it to add a new connection.

Figure 45 - Browser Panel in QGIS with WFS
  • Name your connection. This is not the name of the layer but the name of service which is offering the WMS layer. 
  • Name the connection as India_Layers_Geoserver and the URL as http://localhost:8080/geoserver/ows?service=wfs&version=2.0.0&request=GetCapabilities (Reference – Figure 44). 
  • Under WFS Option - Select 2.0 in Version
  • Click OK to add WMS to browser panel.


Figure 46 - WFS connection window

Figure 47 - WMS added to Browser Panel
  • Double click on the layer fromWFS to add to layer panel.


Figure 48 - Displaying layer from Geoserver to QGIS through WFS
Before add/modify the WFS layers, go back to geoserver and change Data Security Settings.
  • Go to GeoServer Main page
  • Security → Data


Figure 49 - Data Security Page before adding rules to workspace
  • Click on Add new rule
  • Select the Workspace
  • Select Layers & Groups
  • Select * to select all layers in the workspace
  • Or select the layer
In Access mode – Select from Read / Write / Admin, in this case Write mode is selected to edit the data
Under Roles: click on Grant access to any role to assign roles to workspace or select individual role from the below table and Click on Save.


Figure 50 - Data access rule page

Figure 51 - Data Security Page after adding rules to workspace

  • Now, go back Before QGIS and start add/modify the WFS layers.
  • Sample WFS editing
  • In the below given example (see figure 48) for editing WFS, parcel(state) will be splitted into 3 parts and merged back to single parcel. The changes will be seen in the layer added in the geoserver.
  • Click on Toggle Editor in QGIS to start editing of WFS layer
  • Select the parcel to be splitted and click on split features


Figure 52 - Parcel split on WFS layer
  • In the above example the selected parcel has splitted into 3 parts and the attributes of the same can be seen.
  • Click on to save layer edits.
  • Now, go back to Geoserver click on Layer Preview and choose the layer which was added to WFS and click on OpenLayer, to view the edits done on WFS.

Figure 53–Layer Preview of Splitted WFS layer
  • Edits done on WFS in QGIS is successfully executed and saved online as well
  • Now, back to QGIS and merge the splitted features


Figure 54 - Splitted parcel merged on WFS
  • Click on to save layer edits.
  • To view the saved edits, go back to Geoserver click on Layer Preview and choose the layer which was added to WFS and click on OpenLayer, to view the edits done on WFS.


Figure 55 - – Layer Preview of Merged WFS layer

Comments

Popular posts from this blog

How to Rename attribute fields in QGIS & How to Rearrange attribute fields in QGIS | తెలుగులో నేర్చుకుందాం

How to Rename attribute fields &  Rearrange attribute fields in QGIS Refactor fields Refactor fields, allows editing the structure of the attribute table of a vector layer. Fields can be modified in their type and name, using a field’s mapping. The original layer is not modified. A new layer is generated, which contains a modified attribute table, according to the provided fields mapping. Refactor layer fields allows to: Change field names and types Add and remove fields Reorder fields Calculate new fields based on expressions Load field list from another layer Add Vector Layer to Layers panel to Drop field(s) Choose Processing → Toolbox → Vector table → Refactor fields Figure 178 - Vector layer with attribute table before Refactor fields Select Input Layer (Ex: Ind_adm1) Select fields to be renamed and reorder (Ex: in the below given example Name_0 has to rename as Name with Length from 75 as 100 and change order of Name_1 under Name_0 [Name after rename] ) Figure 179 - Fi...

Exercise – 15 / How to Create Topology in QGIS తెలుగులో నేర్చుకుందాం

Exercise – 15 /   How to Create Topology in QGIS Topology Creation Topology describes the relationships between points, lines and polygons that represent the features of a geographic region. With the Topology Checker plugin, you can look over your vector files and check the topology with several topology rules. These rules check with spatial relations whether your features ‘Equal’, ‘Contain’, ‘Cover’, are ‘CoveredBy’, ‘Cross’, are ‘Disjoint’, ‘Intersect’, ‘Overlap’, ‘Touch’ or are ‘Within’ each other. It depends on your individual questions which topology rules you apply to your vector data (e.g., normally you won’t accept overshoots in line layers, but if they depict dead-end streets you won’t remove them from your vector layer). QGIS has a built-in topological editing feature, which is great for creating new features without errors. But existing data errors and user-induced errors are hard to find. This plugin helps you find such errors through a list of rules. It is ve...

What is Survey Of India (SOI) Framework?

What is Survey Of India (SOI) Framework? The Survey of India (SoI) framework is a geospatial reference system used in India for mapping, surveying, and geodetic purposes. The framework is maintained by the Survey of India, which is the national mapping organization of India and the oldest scientific department of the Government of India. The SoI framework is based on the Indian Terrestrial Reference Frame (ITRF) and the Indian National Spatial Reference System (IN-SRS), and is used to determine the location and height of points on the Earth's surface with high accuracy. The framework is also used to define the horizontal and vertical reference systems for mapping and surveying purposes in India. The SoI framework provides a consistent and accurate basis for various geospatial applications, such as land management, urban planning, navigation, disaster management, and environmental monitoring. The framework is also used for the production of topographic maps, cadastral maps, and othe...