[talk-ph] OSM, planet.pm (perl module installing), planetosm-excerpt-area.pl in Mac OS X

Noli Sicad nsicad at gmail.com
Sat Jul 2 05:01:35 BST 2011


I managed to extract Vic.osm from Australia.osm using Osmosis with the
Qgis polygon plugin.

I install Osmosis in Mac OS X 10.6.x using Homebrew.

Now, OSM to Spatialite. I got this error, i.e. parser error.

~~~~~~
localhost:bin root# spatialite_osm_map -o Vic.osm -d Vic.sqlite
SQLite version: 3.7.5
SpatiaLite version: 2.4.0-RC5

Parse error at line 872757:
unclosed token
localhost:bin root#
~~~~~~

However, the Vic.sqlite - broken one gives me glimpse on the database
structure of Australia OSM data.

I am interested on POI.

Probably the best way to get the Victoria data is thru
Australia.sqlite (from Australia.osm) which really bid 2.4 Gb. QGIS is
shocking, it renders after few minutes.

Noli

On 7/2/11, Eugene Alvin Villar <seav80 at gmail.com> wrote:
> This might be moot, but the simplest way to use a Perl module is to
> just copy the module directory/file to the same directory as the Perl
> script that uses it (assuming that the Perl module is all Perl
> code--if the module links to non-Perl code such as C libraries, then
> you need to actually install the Perl module).
>
> Properly installing a (all Perl code) Perl module is only needed if
> you want multiple Perl scripts in different locations in your drive to
> be able to access it. But for one-off scripts, you can just copy the
> Perl module directory/file to the same directory.
>
>
>
> On Fri, Jul 1, 2011 at 10:12 AM, maning sambale
> <emmanuel.sambale at gmail.com> wrote:
>> Noli,
>>
>> I use an Ubuntu machine for most of my osm data munging.  And I also
>> don't use Perl much.
>>
>> That said, most perl modules can be installed with CPAN or directly
>> copy them to your /usr/lib/perl/5.8.8/ . On a mac, you probably have
>> darwin port so it should be /opt/local/lib/perl5/5.8.8/darwin-2level/
>>
>> Some threads I found:
>> http://web.archiveorange.com/archive/v/tomQkFckXIEapRXDWu0z
>> http://comments.gmane.org/gmane.comp.gis.openstreetmap.devel/12112
>>
>> Hope that was helpful. Maybe Eugene can chime in. :)
>>
>>
>>
>>
>> On Fri, Jul 1, 2011 at 9:22 AM, Noli Sicad <nsicad at gmail.com> wrote:
>>> Hi Maning,
>>>
>>> I need help on figuring how to these things, i.e.  installing a PERL
>>> module Planet.pm and running planetosm-excerpt-area.pl in Mac OS X.
>>>
>>> I know that you using a Mac and working a lot of extracting data from OSM
>>> file.
>>>
>>> I am trying to extract State of Victoria from Australia.osm file for
>>> iPhone/iPad Openlayers + Spatialite app that I am working. I found
>>> this info (below).
>>>
>>> http://users.tpg.com.au/users/stevez/OSM/credits.html
>>>
>>> planetosm-excerpt-area.pl -bbox -39.4,140.2,-33.7,151.5 australia.osm >
>>> VIC.osm
>>>
>>> However, it is need Planet.pm. How do you download the planet.pm and
>>> install this Perl module in Mac OS X?
>>>
>>> Thanks in advance.
>>>
>>> Noli
>> --
>> cheers,
>> maning
>



More information about the talk-ph mailing list