View, create, edit, transform GeoJSON map data in British National Grid reference system.
GeoJSON is a simple data structure based on JavaScript Object Notation (JSON) that can be used to describe geographic features. With gb-geojson you can upload existing GeoJSON, create new features or edit existing objects in either WGS84 Longitude and Latitude or British National Grid Eastings and Northings.
gb-geojson is a tool that allows you to view, create and edit GeoJSON in both ESPG:4326
aka WGS84 and OS National Grid coordinate reference systems. We reproject between these reference systems on the fly so you can edit in either system and interchange as easily as possible, this is done with accuracy that is acceptable for most editing.
- View, create, edit GeoJSON in WGS84 and OS National Grid coordinate reference systems
- Reproject on the fly
- Uses Ordnance Survey backdrop mapping
- Open from and save to local files
The "Lon, Lat" and "OS National Grid" switch in gb-geojson toggles the editable GeoJSON display between two different coordinate reference systems; ESPG:4326 and ESPG:27700. This changes the appearance of the cartesian coordinate data to and from the recognisable Longitude, Latitude coordinates and Ordnance Survey Eastings, Northings used by maps in Great Britain. The default reference system used by GeoJSON to describe its geospatial data is ESPG:4326
however the purpose of gb-geojson is to facilitate editing of GeoJSON in ESPG:27700 so by toggling this switch we reproject between these reference systems.
The GeoJSON geospatial data is always projected on the map using the Spherical Mercator ESPG:3857
. The map tile layer is projected using ESPG:27700 from the OS OpenSpace service.
Note that the GeoJSON spec states that coordinates should be in the form X, Y
for whichever projected reference system used.
The GeoJSON spec lists the CRS
property but this is ignored by gb-geojson at present due to format ambiguity and to maintain tool simplicity.
The reprojection is done by the gbify-geojson library using Proj4js.
Checkout the data/
directory for some example GeoJSONs (sic).
{"type":"Feature","properties":{"popupContent":"I am SU43."},"geometry":{"type":"Polygon","coordinates":[[[440000,130000],[450000,130000],[450000,140000],[440000,140000],[440000,130000]]]}}
Use webpack to build and run local webserver.
$ npm run webpack-server
To produce a minified release Production bundle:
$ npm run build
Please use the GitHub pull-request mechanism to submit contributions.
This stands on the shoulders by reusing many excellent libraries and is inspired by the great geojson.io.
Some of the other libraries used are:
If you dont want to use this tool then a simple alternative is to locally reproject your GeoJSON dataset with something such as GDAL or reproject js library and then import into geojson.io.
GDAL can do this also with something like this to reproject OSGB36 > WGS84, then upload the resultant GeoJSON somewhere.
$ ogr2ogr -s_srs EPSG:27700 -f "GeoJSON" output.json input.json -t_srs EPSG:4326
This project is available for use under the MIT software license. See LICENSE