Geo::JSON::Simple - Simplified functions for generating Geo::JSON objects
version 0.001
use Geo::JSON::Simple; my $point = point(qw( 1.1 1.1 )); $point->to_json; # See Geo::JSON->to_json # all functions generate several points out of a list multipoint(qw( 1.1 1.1 2.2 2.2 )); # polygon don't need the first element repeated at the end polygon([qw( 100.0 0.0 101.0 0.0 101.0 1.0 100.0 1.0 )]); collection( point(qw( 1.1 1.1 )), linestring(qw( 2.2 2.2 3.3 3.3 1.3 1.3 )) ); feature point(qw( 717862.48638976 6648347.0162409 )), gold_amount => 23, data => "Here is the gold"; geometrycollection( point(qw( 34 55 )), player => 1, point(qw( 56 15 )), player => 2, point(qw( 87 33 )), player => 3, point(qw( 11 23 )), player => 4 ); from_geo_json($json); # Shortcut to Geo::JSON->from_json
This module gives an easy access to Geo::JSON. You can generate complex Geo::JSON object structures with simple commands. It also is a bit practical orientated to avoid boilerplate in your code. More magic is upcoming (but not much as far as I can see what is possible).
Returns a Geo::JSON::Point.
Returns a Geo::JSON::MultiPoint.
Returns a Geo::JSON::LineString.
Returns a Geo::JSON::MultiLineString.
Returns a Geo::JSON::Polygon.
Returns a Geo::JSON::MultiPolygon.
Returns a Geo::JSON::Feature.
Returns a Geo::JSON::FeatureCollection.
Returns a Geo::JSON::GeometryCollection.
Shortcut to "from_json" in Geo::JSON.
IRC
Join #duckduckgo on irc.freenode.net. Highlight Getty for fast reaction :).
Repository
http://github.com/Getty/p5-geo-json-simple Pull request and additional contributors are welcome
Issue Tracker
http://github.com/Getty/p5-geo-json-simple/issues
Torsten Raudssus <torsten@raudss.us>
This software is copyright (c) 2013 by Torsten Raudssus.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Geo::JSON::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::JSON::Simple
CPAN shell
perl -MCPAN -e shell install Geo::JSON::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.