SemanticWeb-Schema/lib/SemanticWeb/Schema/GeoCircle.pm
use utf8;
package SemanticWeb::Schema::GeoCircle;
# ABSTRACT: A GeoCircle is a GeoShape representing a circular geographic area
use v5.14;
use Moo;
extends qw/ SemanticWeb::Schema::GeoShape /;
use MooX::JSON_LD 'GeoCircle';
use Ref::Util qw/ is_plain_hashref /;
# RECOMMEND PREREQ: Ref::Util::XS
use namespace::autoclean;
our $VERSION = 'v23.0.0';
has geo_midpoint => (
is => 'rw',
predicate => '_has_geo_midpoint',
json_ld => 'geoMidpoint',
);
has geo_radius => (
is => 'rw',
predicate => '_has_geo_radius',
json_ld => 'geoRadius',
);
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
SemanticWeb::Schema::GeoCircle - A GeoCircle is a GeoShape representing a circular geographic area
=head1 VERSION
version v23.0.0
=head1 DESCRIPTION
A GeoCircle is a GeoShape representing a circular geographic area. As it is
a GeoShape it provides the simple textual property 'circle', but also
allows the combination of postalCode alongside geoRadius. The center of the
circle can be indicated via the 'geoMidpoint' property, or more
approximately using 'address', 'postalCode'.
=head1 ATTRIBUTES
=head2 C<geo_midpoint>
C<geoMidpoint>
Indicates the GeoCoordinates at the centre of a GeoShape, e.g. GeoCircle.
A geo_midpoint should be one of the following types:
=over
=item C<InstanceOf['SemanticWeb::Schema::GeoCoordinates']>
=back
=head2 C<_has_geo_midpoint>
A predicate for the L</geo_midpoint> attribute.
=head2 C<geo_radius>
C<geoRadius>
Indicates the approximate radius of a GeoCircle (metres unless indicated
otherwise via Distance notation).
A geo_radius should be one of the following types:
=over
=item C<InstanceOf['SemanticWeb::Schema::Distance']>
=item C<Num>
=item C<Str>
=back
=head2 C<_has_geo_radius>
A predicate for the L</geo_radius> attribute.
=head1 SEE ALSO
L<SemanticWeb::Schema::GeoShape>
=head1 SOURCE
The development version is on github at L<https://github.com/robrwo/SemanticWeb-Schema>
and may be cloned from L<git://github.com/robrwo/SemanticWeb-Schema.git>
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website
L<https://github.com/robrwo/SemanticWeb-Schema/issues>
When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.
=head1 AUTHOR
Robert Rothenberg <rrwo@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2018-2023 by Robert Rothenberg.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
=cut