GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  GEO::PARSE::OSM::SINGLEPASS (3)

.ds Aq ’

NAME

Geo::Parse::OSM::Singlepass - Single pass OpenStreetMap file parser

CONTENTS

VERSION

version 0.42

SYNOPSIS

Geo::Parse::OSM::Singlepass extends Geo::Parse::OSM class to resolve geometry on one pass. It faster than ::Multipass, but uses much more memory and fails on old-style multipolygons.



    use Geo::Parse::OSM::Singlepass;

    my $osm = Geo::Parse::OSM::Singlepass->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::Singlepass->new( planet.osm );



Creates parser instance and makes one pass to load node coords, way chains and multipolygon lists.

You can add extra custom callback function ’pass1’ for every object



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



    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.



    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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 GEO::PARSE::OSM::SINGLEPASS (3) 2011-02-19

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.