All Projects → SKalt → geojson-to-wfs-t-2

SKalt / geojson-to-wfs-t-2

Licence: other
A lightweight javascript module to format WFS-T-2 statements from GeoJSON features

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to geojson-to-wfs-t-2

GeoFuse
Thematic Engine for Dynamic CSV or Tab Delimited Data
Stars: ✭ 15 (-28.57%)
Mutual labels:  gis, geoserver
L7
🌎 Large-scale WebGL-powered Geospatial Data Visualization analysis framework which relies on Mapbox GL or AMap to render basemaps.
Stars: ✭ 2,517 (+11885.71%)
Mutual labels:  geojson, gis
Geomet
GeoMet - Convert GeoJSON to WKT/WKB, and vice versa
Stars: ✭ 123 (+485.71%)
Mutual labels:  geojson, gis
Geotools
Official GeoTools repository
Stars: ✭ 1,109 (+5180.95%)
Mutual labels:  geojson, gis
cogj-spec
Cloud Optimized GeoJSON spec
Stars: ✭ 36 (+71.43%)
Mutual labels:  geojson, gis
Featureserver
An open source Geoservices Implementation
Stars: ✭ 66 (+214.29%)
Mutual labels:  geojson, gis
Agstoshapefile
Convert ArcGIS Server Dynamic Map Service to GeoJSON and Shapefile
Stars: ✭ 172 (+719.05%)
Mutual labels:  geojson, gis
Koop
🔮 Transform, query, and download geospatial data on the web.
Stars: ✭ 505 (+2304.76%)
Mutual labels:  geojson, gis
Mapstore2
Modern webmapping with OpenLayers, Leaflet and React
Stars: ✭ 251 (+1095.24%)
Mutual labels:  geojson, gis
Mapshaper
Tools for editing Shapefile, GeoJSON, TopoJSON and CSV files
Stars: ✭ 2,813 (+13295.24%)
Mutual labels:  geojson, gis
Leaflet Geoman
🍂🗺️ The most powerful leaflet plugin for drawing and editing geometry layers
Stars: ✭ 1,088 (+5080.95%)
Mutual labels:  geojson, gis
deegree3
Official deegree repository providing geospatial core libraries, data access and advanced OGC web service implementations
Stars: ✭ 118 (+461.9%)
Mutual labels:  gis, wfs
Django Rest Framework Gis
Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.
Stars: ✭ 830 (+3852.38%)
Mutual labels:  geojson, gis
Gis Dataset Brasil
Geographic Information Systems (GIS) Dataset Brasil - Coleção de shapefiles, GeoJSON e TopoJSON prontas para uso
Stars: ✭ 121 (+476.19%)
Mutual labels:  geojson, gis
Turf
A modular geospatial engine written in JavaScript
Stars: ✭ 6,659 (+31609.52%)
Mutual labels:  geojson, gis
Mapshaper Plus
Generate geojson files for Echarts Map,base on mapshaper(Echarts 地图数据压缩转换)
Stars: ✭ 163 (+676.19%)
Mutual labels:  geojson, gis
Orb
Types and utilities for working with 2d geometry in Golang
Stars: ✭ 378 (+1700%)
Mutual labels:  geojson, gis
Go Geom
Package geom implements efficient geometry types for geospatial applications.
Stars: ✭ 456 (+2071.43%)
Mutual labels:  geojson, gis
Django Geojson
django-geojson is a collection of helpers to (de)serialize (Geo)Django objects into GeoJSON.
Stars: ✭ 209 (+895.24%)
Mutual labels:  geojson, gis
de9im
DE-9IM spatial predicate library implemented in Javascript.
Stars: ✭ 22 (+4.76%)
Mutual labels:  geojson, gis

geojson-to-wfs-t-2

npm version Build Status

A library to create string Web Feature Service XML from geojson. As a string formatting library, geojson-to-wfst-2 has only one dependency and will work in any environment.

Installation

get the library by executing

npm install geojson-to-wfs-t-2

or

git clone https://github.com/SKalt/geojson-to-wfs-t-2.git

and import/require-ing es6 or transpiled es5 commonjs, UMD, or es modules from geojson-to-wfs-t-2/dist/.

Usage

import wfs from 'geojson-to-wfs-t-2';

const nullIsland = {
  type: 'Feature',
  properties: {place_name: 'null island'},
  geometry: {
    type: 'Point',
    coordinates: [0, 0]
  }
  id: 'feature_id'
}
const params = {geometry_name: 'geom', layer: 'my_lyr', ns: 'my_namespace'};

// create a stringified transaction inserting null island
wfs.Transaction(
  wfs.Insert(nullIsland, params),
  {
    nsAssignments: {
      my_namespace: 'https://example.com/namespace_defn.xsd'
    }
  }
);

// create a stringified transaction updating null island's name
wfs.Transaction(
  wfs.Update({properties: {place_name: 'not Atlantis'}, id: nullIsland.id }),
  {nsAssignments: ...}
)
// same deal, but deleting it
wfs.Transaction(
  wfs.Delete({id: nullIsland.id}, params),
  {nsAssignments: ...}
)

See API.md for the full API documentation.

Further notes:

  • While you should make sure to secure permissions to your data elsewhere (such as the geoserver layer-level permissions), you excluding or encapsulating dangerous actions like Delete is a good idea.

  • The functions Insert, Update, Replace, Delete in this module have remained uppercase (1) to remain similar to their xml names and (2) to avoid the keyword delete. If you would prefer to adhere to camelcase naming, consider aliasing the functions on import, like import {Insert as insert} from '...'

Contributing

Features, refactors, documentation, and tests are welcome! To contribute, branch or fork this repo, optionally open an issue, and then open a pull request. Please include tests and well-commented commits in all work.

Here's an example script to start developing a feature on this project:

git clone https://github.com/SKalt/geojson-to-wfs-t-2.git # or your fork
cd geojson-to-wfs-t-2
git checkout -b informative-feature-branch
npm install
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].