Re: [talk-ph] OSM, planet.pm (perl module installing), planetosm-excerpt-area.pl in Mac OS X
Correction. Australia.osm is big, not spatialite file. Australia.sqlite before vacuum was 1.11 Gb and after vacuum it is only 469 Mb. I am viewing it now using Sqlite manager in Firefox. Are OSM file from country to country have almost same / similar database structure? Noli On 7/2/11, Noli Sicad wrote: > 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 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 >> 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 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 >> > ___ talk-ph mailing list talk-ph@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-ph
Re: [talk-ph] OSM, planet.pm (perl module installing), planetosm-excerpt-area.pl in Mac OS X
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 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 > 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 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 > ___ talk-ph mailing list talk-ph@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-ph
Re: [talk-ph] OSM, planet.pm (perl module installing), planetosm-excerpt-area.pl in Mac OS X
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 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 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 ___ talk-ph mailing list talk-ph@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-ph
Re: [talk-ph] OSM, planet.pm (perl module installing), planetosm-excerpt-area.pl in Mac OS X
Brilliant! Needs to one polygon for Victoria, or a whole state of Victoria with multiple polygons will do? Installing the plugin now. I think I can work this out now :-). Thanks a lot Maning. Noli On 7/1/11, maning sambale wrote: > An easier way to create a polygon file for osmosis is through QGIS' > OSM_POLY Export plugin. Simply load the shapefile of Victoria and run > the plugin. > >> >> Given this example for Australia >> http://wiki.openstreetmap.org/wiki/Polygon#Getting_polygon_files >> ~ >> australia_v >> 1 >> 0.1446763E+03 -0.3825659E+02 >> 0.1446693E+03 -0.3826255E+02 >> 0.1446627E+03 -0.3825661E+02 >> 0.1446763E+03 -0.3824465E+02 >> 0.1446813E+03 -0.3824343E+02 >> 0.1446824E+03 -0.3824484E+02 >> 0.1446826E+03 -0.3825356E+02 >> 0.1446876E+03 -0.3825210E+02 >> 0.1446919E+03 -0.3824719E+02 >> 0.1447006E+03 -0.3824723E+02 >> 0.1447042E+03 -0.3825078E+02 >> 0.1446758E+03 -0.3826229E+02 >> 0.1446693E+03 -0.3826255E+02 >> END >> !2 >> 0.1422483E+03 -0.3839481E+02 >> 0.1422436E+03 -0.3839315E+02 >> 0.1422496E+03 -0.3839070E+02 >> 0.1422543E+03 -0.3839025E+02 >> 0.1422574E+03 -0.3839155E+02 >> 0.1422467E+03 -0.3840065E+02 >> 0.1422433E+03 -0.3840048E+02 >> 0.1422420E+03 -0.3839857E+02 >> 0.1422436E+03 -0.3839315E+02 >> END >> END >> >> ~ >> >> What would be the right polygon for Victoria? >> >> Noli >> > > > > -- > cheers, > maning > -- > "Freedom is still the most radical idea of all" -N.Branden > wiki: http://esambale.wikispaces.com/ > blog: http://epsg4253.wordpress.com/ > -- > ___ talk-ph mailing list talk-ph@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-ph
Re: [talk-ph] OSM, planet.pm (perl module installing), planetosm-excerpt-area.pl in Mac OS X
An easier way to create a polygon file for osmosis is through QGIS' OSM_POLY Export plugin. Simply load the shapefile of Victoria and run the plugin. > > Given this example for Australia > http://wiki.openstreetmap.org/wiki/Polygon#Getting_polygon_files > ~ > australia_v > 1 > 0.1446763E+03 -0.3825659E+02 > 0.1446693E+03 -0.3826255E+02 > 0.1446627E+03 -0.3825661E+02 > 0.1446763E+03 -0.3824465E+02 > 0.1446813E+03 -0.3824343E+02 > 0.1446824E+03 -0.3824484E+02 > 0.1446826E+03 -0.3825356E+02 > 0.1446876E+03 -0.3825210E+02 > 0.1446919E+03 -0.3824719E+02 > 0.1447006E+03 -0.3824723E+02 > 0.1447042E+03 -0.3825078E+02 > 0.1446758E+03 -0.3826229E+02 > 0.1446693E+03 -0.3826255E+02 > END > !2 > 0.1422483E+03 -0.3839481E+02 > 0.1422436E+03 -0.3839315E+02 > 0.1422496E+03 -0.3839070E+02 > 0.1422543E+03 -0.3839025E+02 > 0.1422574E+03 -0.3839155E+02 > 0.1422467E+03 -0.3840065E+02 > 0.1422433E+03 -0.3840048E+02 > 0.1422420E+03 -0.3839857E+02 > 0.1422436E+03 -0.3839315E+02 > END > END > > ~ > > What would be the right polygon for Victoria? > > Noli > -- cheers, maning -- "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ -- ___ talk-ph mailing list talk-ph@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-ph
Re: [talk-ph] OSM, planet.pm (perl module installing), planetosm-excerpt-area.pl in Mac OS X
Maning, > For this process, just use osmosis: > http://wiki.openstreetmap.org/wiki/Osmosis OK. This is easier option. > You can even use a polygon instead of a simple -bbox: > http://wiki.openstreetmap.org/wiki/Polygon Now, how I figure out the right polygon for Victoria for this bbox? -39.4,140.2, -33.7,151.5 from planetosm-excerpt-area.pl -bbox -39.4,140.2,-33.7,151.5 australia.osm > VIC.osm Given this example for Australia http://wiki.openstreetmap.org/wiki/Polygon#Getting_polygon_files ~ australia_v 1 0.1446763E+03-0.3825659E+02 0.1446693E+03-0.3826255E+02 0.1446627E+03-0.3825661E+02 0.1446763E+03-0.3824465E+02 0.1446813E+03-0.3824343E+02 0.1446824E+03-0.3824484E+02 0.1446826E+03-0.3825356E+02 0.1446876E+03-0.3825210E+02 0.1446919E+03-0.3824719E+02 0.1447006E+03-0.3824723E+02 0.1447042E+03-0.3825078E+02 0.1446758E+03-0.3826229E+02 0.1446693E+03-0.3826255E+02 END !2 0.1422483E+03-0.3839481E+02 0.1422436E+03-0.3839315E+02 0.1422496E+03-0.3839070E+02 0.1422543E+03-0.3839025E+02 0.1422574E+03-0.3839155E+02 0.1422467E+03-0.3840065E+02 0.1422433E+03-0.3840048E+02 0.1422420E+03-0.3839857E+02 0.1422436E+03-0.3839315E+02 END END ~ What would be the right polygon for Victoria? Noli ___ talk-ph mailing list talk-ph@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-ph
Re: [talk-ph] OSM, planet.pm (perl module installing), planetosm-excerpt-area.pl in Mac OS X
Re-reading your message, the perl script simply extracts a bbox of the data. For this process, just use osmosis: http://wiki.openstreetmap.org/wiki/Osmosis You can even use a polygon instead of a simple -bbox: http://wiki.openstreetmap.org/wiki/Polygon On Fri, Jul 1, 2011 at 10:39 AM, Noli Sicad wrote: > Maning, > > OK. I will boot my laptop in Ubuntu 10.04. > > Any instruction, how to do OSM file excerpt-area in Ubuntu without Perl? > > I found this info as well. > http://triopter.com/archive/how-to-install-perl-modules-on-mac-os-x-in-4-easy-steps/ > > I run this command. > > ~ > sudo perl -MCPAN -e shell > localhost:~ root# sudo perl -MCPAN -e shell > > ~ > > Got a lot of questions in the output terminal. Probably more than 10 > questions to answer. > > I want easier way to do get Vic.osm from Australia.osm, then I can > convert Vic.osm to Spatialite (.db / .sqlite) file. > > Noli > > On 7/1/11, maning sambale 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 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 >>> >>> ___ >>> talk-ph mailing list >>> talk-ph@openstreetmap.org >>> http://lists.openstreetmap.org/listinfo/talk-ph >>> >> >> >> >> -- >> cheers, >> maning >> -- >> "Freedom is still the most radical idea of all" -N.Branden >> wiki: http://esambale.wikispaces.com/ >> blog: http://epsg4253.wordpress.com/ >> -- >> > -- cheers, maning -- "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ -- ___ talk-ph mailing list talk-ph@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-ph
Re: [talk-ph] OSM, planet.pm (perl module installing), planetosm-excerpt-area.pl in Mac OS X
Maning, OK. I will boot my laptop in Ubuntu 10.04. Any instruction, how to do OSM file excerpt-area in Ubuntu without Perl? I found this info as well. http://triopter.com/archive/how-to-install-perl-modules-on-mac-os-x-in-4-easy-steps/ I run this command. ~ sudo perl -MCPAN -e shell localhost:~ root# sudo perl -MCPAN -e shell ~ Got a lot of questions in the output terminal. Probably more than 10 questions to answer. I want easier way to do get Vic.osm from Australia.osm, then I can convert Vic.osm to Spatialite (.db / .sqlite) file. Noli On 7/1/11, maning sambale 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 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 >> >> ___ >> talk-ph mailing list >> talk-ph@openstreetmap.org >> http://lists.openstreetmap.org/listinfo/talk-ph >> > > > > -- > cheers, > maning > -- > "Freedom is still the most radical idea of all" -N.Branden > wiki: http://esambale.wikispaces.com/ > blog: http://epsg4253.wordpress.com/ > -- > ___ talk-ph mailing list talk-ph@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-ph
Re: [talk-ph] OSM, planet.pm (perl module installing), planetosm-excerpt-area.pl in Mac OS X
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 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 > > ___ > talk-ph mailing list > talk-ph@openstreetmap.org > http://lists.openstreetmap.org/listinfo/talk-ph > -- cheers, maning -- "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ -- ___ talk-ph mailing list talk-ph@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk-ph