Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Geo::Parse::OSM::MultiUser(Contributed Perl DocumGeo::Parse::OSM::Multipass(3)

NAME
       Geo::Parse::OSM::Multipass - Multipass OpenStreetMap file parser

VERSION
       version 0.42

SYNOPSIS
       Geo::Parse::OSM::Multipass extends Geo::Parse::OSM class	to resolve
       geometry.

	   use Geo::Parse::OSM::Multipass;

	   my $osm = Geo::Parse::OSM::Multipass->new( 'planet.osm.gz' );
	   $osm->seek_to_relations;
	   $osm->parse(	sub{ warn $_[0]->{id}  if  $_[0]->{user} eq 'Alice' } );

METHODS
   new
	   my $osm = Geo::Parse::OSM::Multipass->new( 'planet.osm' );

       Creates parser instance and makes two passes: 1 - load node coordinates
       and create list of multipolygon parts 2 - load those parts

       You can add extra custom	callback function:

	   my $osm = Geo::Parse::OSM::Multipass->new( 'planet.osm', pass1 => sub{ ... }	);

       * pass1 - is called for every object during 1st pass * pass2 - same for
       second pass * between - before 2nd pass

   parse
       Same as in Geo::Parse::OSM, but callback	object has additional fields
       for multipolygon	objects:

       * outer - list of outer rings (ring is a	closed list of node ids) *
       inner - inner rings

   latlon
       Returns coordinates of node (after 2nd pass)

	   my ($lat,$lon) = $osm->latlon( '1234578' );

AUTHOR
       liosha, "<liosha	at cpan.org>"

BUGS
       Please report any bugs or feature requests to "bug-geo-parse-osm	at
       rt.cpan.org", or	through	the web	interface at
       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Geo-Parse-OSM>.	I will
       be notified, and	then you'll automatically be notified of progress on
       your bug	as I make changes.

SUPPORT
       You can find documentation for this module with the perldoc command.

	   perldoc Geo::Parse::OSM

       You can also look for information at:

       o   RT: CPAN's request tracker

	   <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Geo-Parse-OSM>

       o   AnnoCPAN: Annotated CPAN documentation

	   <http://annocpan.org/dist/Geo-Parse-OSM>

       o   CPAN	Ratings

	   <http://cpanratings.perl.org/d/Geo-Parse-OSM>

       o   Search CPAN

	   <http://search.cpan.org/dist/Geo-Parse-OSM/>

ACKNOWLEDGEMENTS
LICENSE	AND COPYRIGHT
       Copyright 2010 liosha.

       This program is free software; you can redistribute it and/or modify it
       under the terms of either: the GNU General Public License as published
       by the Free Software Foundation;	or the Artistic	License.

       See http://dev.perl.org/licenses/ for more information.

perl v5.24.1			  2011-02-19	 Geo::Parse::OSM::Multipass(3)

NAME | VERSION | SYNOPSIS | METHODS | AUTHOR | BUGS | SUPPORT | ACKNOWLEDGEMENTS | LICENSE AND COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Geo::Parse::OSM::Multipass&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help