Langertha

 view release on metacpan or  search on metacpan

ex/synopsis.pl  view on Meta::CPAN

    # use Moose::Util::TypeConstraints;
    #
    # # Base class for all GeoJSON objects
    # has 'type' => (is => 'ro', isa => 'Str', required => 1);
    #
    # package GeoJSON::Point;
    # use Moose;
    # extends 'GeoJSON';
    #
    # has '+type' => (default => 'Point');
    # has 'coordinates' => (is => 'ro', isa => 'ArrayRef[Num]', required => 1);
    #
    # package GeoJSON::LineString;
    # use Moose;
    # extends 'GeoJSON';
    #
    # has '+type' => (default => 'LineString');
    # has 'coordinates' => (is => 'ro', isa => 'ArrayRef[ArrayRef[Num]]', required => 1);
    #
    # package GeoJSON::Polygon;
    # use Moose;
    # extends 'GeoJSON';
    #
    # has '+type' => (default => 'Polygon');
    # has 'coordinates' => (is => 'ro', isa => 'ArrayRef[ArrayRef[ArrayRef[Num]]]', required => 1);
    #
    # package GeoJSON::MultiPoint;
    # use Moose;
    # extends 'GeoJSON';
    #
    # has '+type' => (default => 'MultiPoint');
    # has 'coordinates' => (is => 'ro', isa => 'ArrayRef[ArrayRef[Num]]', required => 1);
    #
    # package GeoJSON::MultiLineString;
    # use Moose;
    # extends 'GeoJSON';
    #
    # has '+type' => (default => 'MultiLineString');
    # has 'coordinates' => (is => 'ro', isa => 'ArrayRef[ArrayRef[ArrayRef[Num]]]', required => 1);
    #
    # package GeoJSON::MultiPolygon;
    # use Moose;
    # extends 'GeoJSON';
    #
    # has '+type' => (default => 'MultiPolygon');
    # has 'coordinates' => (is => 'ro', isa => 'ArrayRef[ArrayRef[ArrayRef[ArrayRef[Num]]]]', required => 1);
    #
    # package GeoJSON::GeometryCollection;
    # use Moose;
    # extends 'GeoJSON';
    #
    # has '+type' => (default => 'GeometryCollection');
    # has 'geometries' => (is => 'ro', isa => 'ArrayRef[GeoJSON]', required => 1);
    #
    # package GeoJSON::Feature;
    # use Moose;
    # extends 'GeoJSON';
    #
    # has '+type' => (default => 'Feature');
    # has 'geometry' => (is => 'ro', isa => 'GeoJSON', required => 1);
    # has 'properties' => (is => 'ro', isa => 'HashRef', default => sub { {} });
    # has 'id' => (is => 'ro', isa => 'Str', predicate => 'has_id');
    #
    # package GeoJSON::FeatureCollection;
    # use Moose;
    # extends 'GeoJSON';
    #
    # has '+type' => (default => 'FeatureCollection');
    # has 'features' => (is => 'ro', isa => 'ArrayRef[GeoJSON::Feature]', required => 1);
    #
    # 1;
    # ```
    #
    # This set of classes provides a structured way to work with GeoJSON data in Perl using Moose. Here's a brief explanation of each class:
    #
    # 1. `GeoJSON`: Base class for all GeoJSON objects.
    # 2. `GeoJSON::Point`: Represents a single point.
    # 3. `GeoJSON::LineString`: Represents a line of connected points.
    # 4. `GeoJSON::Polygon`: Represents a polygon (closed shape).



( run in 0.595 second using v1.01-cache-2.11-cpan-5f2e87ce722 )