Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #5 from patrickarlt/master

Fix readme and AWS config
  • Loading branch information...
commit 8140475c0bf6cf97401d10e9f5893b06595d9692 2 parents c1fb40e + 3a8c200
@JerrySievert JerrySievert authored
Showing with 33 additions and 60 deletions.
  1. +6 −0 Gruntfile.js
  2. +27 −60 README.md
View
6 Gruntfile.js
@@ -103,6 +103,12 @@ module.exports = function (grunt) {
}
});
+ var awsExists = fs.existsSync(process.env.HOME + '/terraformer-s3.json');
+
+ if (awsExists) {
+ grunt.config.set('aws', grunt.file.readJSON(process.env.HOME + '/terraformer-s3.json'));
+ }
+
grunt.registerTask('wkt-parser', 'Building WKT Parser', function() {
var grammar = fs.readFileSync('./src/wkt.yy', 'utf8');
View
87 README.md
@@ -1,6 +1,6 @@
# Terraformer Well-Known Text Parser
-This package is part of the [Terraformer](https://github.com/Esri/Terraformer) project.
+This package is part of the [Terraformer](http://terraformer.io) project.
A bare-bones WKT parser. Given a WKT primitive, it parses and returns a `Terraformer Primitive`.
@@ -16,30 +16,29 @@ In the browser, Terraformer is required to be used as well.
$ bower install terraformer-wkt-parser
-## Usage
+## Documentation
-### Node.js
+For full documentation check out the [offical website](http://terraformer.io/wkt-parser/).
- var wkt = require('terraformer-wkt-parser');
-
- // parse a WKT file, convert it into a primitive
- var primitive = wkt.parse('LINESTRING (30 10, 10 30, 40 40)');
-
- // take a primitive and convert it into a WKT representation
- var polygon = wkt.convert(
- {
- "type": "Polygon",
- "coordinates": [
- [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
- [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
- ]
- }
- );
+```js
+var wkt = require('terraformer-wkt-parser');
-### Browser
+// parse a WKT file, convert it into a primitive
+var primitive = wkt.parse('LINESTRING (30 10, 10 30, 40 40)');
-The Terraformer-WKT-Parser can be used in the browser with some simple includes.
+// take a primitive and convert it into a WKT representation
+var polygon = wkt.convert(
+ {
+ "type": "Polygon",
+ "coordinates": [
+ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
+ [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
+ ]
+ }
+);
+```
+```html
<!-- Load the main Terraformer library -->
<script src="terraformer.min.js" type="text/javascript"></script>
@@ -50,52 +49,20 @@ The Terraformer-WKT-Parser can be used in the browser with some simple includes.
<script>
var primitive = Terraformer.WKT.parse('LINESTRING (30 10, 10 30, 40 40)');
</script>
+```
-### AMD (Require.js and Dojo)
-
-Terraformer also works with AMD loaders like [RequireJS](http://requirejs.org/) and [Dojo](http://dojotoolkit.org/).
-
-##### RequireJS
-
-First you should register the Terraformer modules with RequireJS
-
- requirejs.config({
- //In order for proper loading of depenencies in Terraformer modules set the path up in requirejs.config
- paths: {
- terraformer: "/the/path/to/terraformer"
- }
- });
-
-Then you can load Terraformer modules in your `require` statements.
-
- requirejs([
- "terraformer/terraformer",
- "terraformer/terraformer-wkt-parser"
- ], function (Terraformer, TerraformerWKT) {
- // Do stuff with terraformer core, wkt parser
- };
-
-##### Dojo
+## Resources
-Dojo includes a built in AMD loader. To use Terraformer with Dojo setup the path to Terraformer in your `dojoConfig`.
+* [Terraformer Website](http://terraformer.io)
+* [twitter@EsriPDX](http://twitter.com/esripdx)
- dojoConfig= {
- async: true,
- packages: [{
- name: "terraformer",
- location: "/the/path/to/terraformer"
- }]
- }
+## Issues
-You can then include Terraformer in your Dojo code
+Find a bug or want to request a new feature? Please let us know by submitting an issue.
- require([
- "terraformer/terraformer",
- "terraformer/terraformer-wkt-parser"
- ], function (Terraformer, TerraformerWKT) {
- // Do stuff with terraformer core, and wkt parser
- });
+## Contributing
+Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing).
[](Esri Tags: Terraformer GeoJSON WKT Well-Known-Text)
[](Esri Language: JavaScript)
Please sign in to comment.
Something went wrong with that request. Please try again.