|
NAMEGeo::JSON - Perl OO interface for geojsonSYNOPSISuse Geo::JSON; my $obj = Geo::JSON->from_json( $json ); $obj->to_json(); DESCRIPTIONConvert to and from geojson using Perl objects. GeoJSON objects represent various geographical positions - points, lines, polygons, etc.Currently supports 2 or 3 dimensions (longitude, latitude, altitude). Further dimensions in positions are ignored for calculations and comparisons, but will be read-from and written-to. GEOJSON SPECIFICATIONSee: <http://www.geojson.org/geojson-spec.html>GEOJSON MEMBERS (ATTRIBUTES)See the specification for the full details, but the basics are as follows:
GEOMETRY OBJECTS
FEATURE OBJECTS
FEATURE COLLECTION OBJECTS
METHODSfrom_jsonmy $obj = Geo::JSON->from_json( $json ); Takes a geojson string, returns the object it represents. to_json$obj->to_json(); $obj->to_json( $codec ); Call on a Geo::JSON object. Returns the JSON that represents the object. Pass in an optional JSON codec to modify the default behaviour of the JSON returned. loadmy $obj = Geo::JSON->load( { type => 'Point', coordinates => ... } ); Creates a Geo::JSON object from a hashref. This is used for coercion of attributes during object creation, and probably should not be called directly otherwise. CLASS METHODScodecGeo::JSON->codec->canonical(1)->pretty; my $prev_codec = Geo::JSON->codec($new_codec); Set options on or replace JSON codec. THANKSTim Bunce - for codec suggestions and bug spotting.SEE ALSO
SUPPORTBugs / Feature RequestsPlease report any bugs or feature requests through the issue tracker at <https://github.com/mjemmeson/Geo-JSON/issues>. You will be notified automatically of any progress on your issue.Source CodeThis is open source software. The code repository is available for public review and contribution under the terms of the license.<https://github.com/mjemmeson/Geo-JSON> git clone https://github.com/mjemmeson/Geo-JSON.git AUTHORMichael Jemmeson <mjemmeson@cpan.org>COPYRIGHT AND LICENSEThis software is copyright (c) 2015 by Michael Jemmeson <mjemmeson@cpan.org>.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Visit the GSP FreeBSD Man Page Interface. |