Transforms the Ordnance Survey "Code-Point Open" data.
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-codepoint-open-transform --save-dev
The "codepoint_open_transform" task
In your project's Gruntfile, add a section named
codepoint_open_transform to the data object passed into
Indicates which row of headers to use (object keys in JSON files)
Include Latitude & Longitude conversions in output.
Include only minimal data in output.
Include whitespace in output to assist when reading the output files directly.
File format is determined by the destination file suffix.
JSON, Object of Arrays
Destinations ending in ooa.json will output JSON along the following form:
JSON, Array of Objects
Presently this output method will generate a file that appears valid, ** however, the output file will likely trigger memory constraints** ** due to the 1.47 million objects in the array.** Destinations ending in aoo.json will output JSON along the following form:
Destinations ending in .sqlite will output SQLite databases.
Destinations ending in .sql will output SQL scripts.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
- SQL Support
- SQLite Support
- JSON Support