Geo::OSM::Render::Projection - Project OSM latitudes and longitudes into x, y coordinate pairs to be rendered by Geo::OSM::Render.


This is an abstract base class. So, I am hard pressed to write a synopsis here.


Before OpenStreetMap data can be rendered, the OSM coordinates must be projected into a suitable x/y coordinate system. Descendents of this class should (must...) provide the conversion function <lat_lon_to_x_y> which performce this projection.

Currently, two classes are derived from this class: Geo::OSM::Render::Projection::CH_LV03 and Geo::OSM::Render::Projection::Ident.



    my $proj = Geo::OSM::Render::Projection->new();

Create an instance of a projection. Use it in a derived class.


    my ($x, $y) = $projection->lat_lon_to_x_y($lat, $lon);

Because this is an abstract base class, calling this method on <Geo::OSM::Render::Projection> just croaks.


René Nyffenegger <rene.nyffenegger at>

COPYRIGHT AND LICENSE Copyright © 2017 René Nyffenegger, Switzerland. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

Source Code

The source code is on github. Meaningful pull requests are welcome.