WFS Endpoint

This api allows you to make a request for merged data from a Web Feature Service (WFS) and Comma Separated Values (CSV) . Data is available in GeoJSON format.

How to make an API call

API call

https://geofusion.schawanji.tech/tjs/api/wfs?FrameworkURI={FrameworkURI}&GetDataURL={GetDataURL}&typeName={typeName}&FrameworkKey={FrameworkKey}&AttributeKey={AttributeKey}
Parameters
FrameworkURI required FrameworkURI: The URL to the Web Feature Service providing the GeoJSON data.
typeName required typeName: The name of the typeName in the GeoServer.
GetDataURL required GetDataURL: The URL to the CSV file containing the tabular data.
FrameworkKey required FrameworkKey: The key in the GeoJSON data to join on.
AttributeKey required AttributeKey:The key in the CSV data to join on.

Example of API call

https://geofusion.schawanji.tech/tjs/api/wfs?FrameworkURI=https://geoserver.schawanji.tech/geoserver/ows?&GetDataURL=https://raw.githubusercontent.com/schawanji/TJS-Server/refs/heads/main/static/covid_data.csv&typeName=us-states&FrameworkKey=name&AttributeKey=state
Example of API response

                    {
                        "type": "FeatureCollection",
                        "features": [
                          {
                            "type": "Feature",
                            "geometry": {
                              "type": "Polygon",
                              "coordinates": [
                                [
                                  [-89.0961, 37.0556],
                                  [-88.0698, 36.9931],
                                  [-88.0542, 37.5778],
                                  [-89.0961, 37.0556]
                                ]
                              ]
                            },
                            "properties": {
                              "name": "Illinois",
                              "population": 12671821,
                              "state": "Illinois",
                              "covid_cases": 300000,
                              "covid_deaths": 8000
                            }
                          },
                          {
                            "type": "Feature",
                            "geometry": {
                              "type": "Polygon",
                              "coordinates": [
                                [
                                  [-77.0369, 38.9072],
                                  [-76.9094, 39.1062],
                                  [-77.1198, 38.9343],
                                  [-77.0369, 38.9072]
                                ]
                              ]
                            },
                            "properties": {
                              "name": "District of Columbia",
                              "population": 689545,
                              "state": "District of Columbia",
                              "covid_cases": 15000,
                              "covid_deaths": 400
                            }
                          },
                          {
                            "type": "Feature",
                            "geometry": {
                              "type": "Polygon",
                              "coordinates": [
                                [
                                  [-91.5161, 42.0003],
                                  [-90.5662, 42.4963],
                                  [-91.1239, 41.9942],
                                  [-91.5161, 42.0003]
                                ]
                              ]
                            },
                            "properties": {
                              "name": "Iowa",
                              "population": 3192406,
                              "state": "Iowa",
                              "covid_cases": 80000,
                              "covid_deaths": 2000
                            }
                          }
                        ]
                      }
                      
  
                      
                   

Explanation of the Response

Explanation of the Response
type: Specifies the type of GeoJSON object, here a FeatureCollection. features: An array of features, where each feature represents a state.
geometry The geospatial representation of the feature, such as polygons defining state boundaries.
properties Attributes merged from the WFS (e.g., name) and CSV data (e.g., covid_cases, covid_deaths).