-
Notifications
You must be signed in to change notification settings - Fork 13
JSON vs GeoJSON
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language,Standard ECMA-262 3rd Edition - December 1999.JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language.
JSON is built on two structures:
- A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
- An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
These are universal data structures. Virtually all modern programming languages support them in one form or another. It makes sense that a data format that is interchangeable with programming languages also be based on these structures.
quoted from http://www.json.org/
Additional links: http://blog.scottlowe.org/2013/11/08/a-non-programmers-introduction-to-json/ https://betterexplained.com/articles/using-json-to-exchange-data/
GeoJSON is a format for encoding a variety of geographic data structures using JavaScript Object Notation (JSON) RFC7159. A GeoJSON object may represent a region of space (a Geometry), a spatially bounded entity (a Feature), or a list of Features (a FeatureCollection). GeoJSON supports the following geometry types: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection. Features in GeoJSON contain a Geometry object and additional properties, and a FeatureCollection contains a list of Features.
The format is concerned with geographic data in the broadest sense; anything with qualities that are bounded in geographical space might be a Feature whether or not it is a physical structure. The concepts in GeoJSON are not new; they are derived from preexisting open geographic information system standards and have been streamlined to better suit web application development using JSON.
GeoJSON comprises the seven concrete geometry types defined in the OpenGIS Simple Features Implementation Specification for SQL SFSQL: 0-dimensional Point and MultiPoint; 1-dimensional curve LineString and MultiLineString; 2-dimensional surface Polygon and MultiPolygon;
Quoted from https://tools.ietf.org/html/rfc7946#page-3
Additional links http://geojson.org/geojson-spec.html
Chords is currently using JSON to show the project, site, affiliation, and what station the instrument is located at. As well as some variables input by the researchers.
Example Code
{"Project":"EarthCube Portal", "Site":"NCAR Foothills Lab", "Affiliation":"NSF EarthCube", "Instrument":"FL Wx Station", "Data":{"Time":["2017-01-25T21:58:31Z"], "wdir":[104.0], "wspd":[1.7], "wmax":[3.2], "tdry":[-1.3], "rh":[44.5], "pres":[833.7], "raintot":[3.1], "batv":[15.5]}}
Definitions:
Instrument: Name of the instrument, define by researchers
Affiliation: Which group researchers are working with on specific projects
Project: Name of the project on CHORDS portal.
Site: Specific lab, college, or general location the instrument is located at.
(Header)
{"Project":"EarthCube Portal", "Site":"NCAR Foothills Lab", "Affiliation":"NSF EarthCube", "Instrument":"FL Wx Station",
(Data)
"Data":{"Time":["2017-01-25T21:58:31Z"], "wdir":[104.0], "wspd":[1.7], "wmax":[3.2], "tdry":[-1.3], "rh":[44.5], "pres":[833.7], "raintot":[3.1], "batv":[15.5]}}
GeoJSON is a format for encoding a variety of geographic data structures. A GeoJSON object may represent a geometry, a feature, or a collection of features. GeoJSON supports the following geometry types: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection. Features in GeoJSON contain a geometry object and additional properties, and a feature collection represents a list of features. A complete GeoJSON data structure is always an object (in JSON terms). In GeoJSON, an object consists of a collection of name/value pairs -- also called members. For each member, the name is always a string. Member values are either a string, number, object, array or one of the literals: true, false, and null. An array consists of elements where each element is a value as described above.
Quoted from http://geojson.org/geojson-spec.html
Note: When you download the data you'll need to change the delimiter " => " to " : " in the JSON file from CHORDS.
e.x.: "Project"=>"EarthCube Portal", should be changed to, "Project":"EarthCube Portal" (tested in python and ruby)
Example Code
{"Project":"EarthCube Portal", "Site":"NCAR Foothills Lab", "Affiliation":"NSF EarthCube", "Instrument":"FL Wx Station", “Units of measurement”:”mph, m/s, mm, watt”,”Device Used”: “magnetometer (make: Geometrics model: G882)”: "Data":
{"Time":["2017-01-25T21:58:31Z"], "wdir":[104.0], "wspd":[1.7], "wmax":[3.2], "tdry":[-1.3], "rh":[44.5], "pres":[833.7], "raintot":[3.1], "batv":[15.5] "coordinates": [102.0, 0.0],
}}
(Header)
{"Project":"EarthCube Portal", "Site":"NCAR Foothills Lab", "Affiliation":"NSF EarthCube", "Instrument":"FL Wx Station", “Units of measurement”:”mph, m/s, mm, watt”,”Device Used”: “magnetometer (make: Geometrics model: G882)”:
(Data)
"Data":
{"Time":["2017-01-25T21:58:31Z"], "wdir":[104.0], "wspd":[1.7], "wmax":[3.2], "tdry":[-1.3], "rh":[44.5], "pres":[833.7], "raintot":[3.1], "batv":[15.5] "coordinates": [102.0, 0.0],
}}
GeoJSON also has the ability to map data points geographically and uses a variety of tools to do so. I’ve listed some of the tools below for those interested.
- Joining data through python
http://frictionlessdata.io/guides/joining-data-in-python/
- Quantum GIS Software
http://spatialnews.geocomm.com/articles/qgisreview/
- Google Maps Data Layers
- Google Maps Android API Utility Library
https://developers.google.com/maps/documentation/android-api/utility/
- GeoBases: Data Services and Visualization
http://opentraveldata.github.io/geobases/
- GeoJSON Open Source Geo, Web Maps, etc.
- Building Custom Maps in Wave
- GitHub: GeoJSON Dashboard
https://github.com/fulcrumapp/geojson-dashboard
- QGIS: Free and Open Source Geographic Information System
-- (Tutorial for QGIS)
http://www.qgistutorials.com/en/docs/importing_spreadsheets_csv.html
JSON Shows | GeoJSON Shows |
---|---|
Project | What Station the Instrument is at |
Site | Affiliation |
Affiliation | Project |
What Station the Instrument is located at | Axes (latitude, longitude) |
Variables input by the researchers | Device Information (What make/model) |
Units of Measure |
GeoJSON offers more than normal JSON in terms of geoscience with a format that specifies the data and makes it easier not just for machines to read but for people too. It helps to specify measurements and increase accuracy in collecting the data that we read in from our machines around the globe.
Project Management
- Stakeholders
- Communication
- Use Cases
- Requirements
- Deliverables
- Milestones Associated with a Release
- "Sandbox" Milestones
- Github Workflow
AWS
- AWS Portal Migrations
- Amazon Appliance Workflow
- Overview
- Bringing up a new CHORDS Portal
- Cloud Formation
- EC2 Costing and Memory Constraints
Docker
- Running CHORDS
- Docker on AWS
- Duplicating Docker/Influxdb portals
- Docker on Raspberry Pi
- Docker Details and Tips
- Running CHORDS on Windows 10
Influxdb
Data Formats
Google Maps
Ingest Utilities
Miscellaneous
- Recovery from a full disk
- Github/Dockerhub release scheme
- CHORDS gh-pages and jeykll
- Bootstrap
- CHORDS Portal Web Site
- Dashboard Helper Refactor
- Development Notes
- Heroku
- Meteobridge
- Migrating from mysql to mysql/influxdb portals
- NCAR Wx Stations into CHORDS
- PAWS to CHORDS
- Post Get Query Syntax
- Postgres Testing
- Rails Tips
- Ruby and Rails Resources
- CUAHSI Archive
Historical Archive