Opened 15 years ago

Closed 14 years ago

#542 closed task (fixed)

Postgis & pgRouting Icon

Reported by: wildintellect Owned by: live-demo@…
Priority: normal Milestone:
Component: OSGeoLive Keywords: 4.0, postgis, pgRouting
Cc:

Description

Right now we have a pgadmin shortcut but that might not be clear to people that don't realize that is the quickest tool to interact with postgis and pgrouting. Maybe we should rename the shortcut and/or create shortcuts for Postgis and pgRouting that go their documentation pages and include a pgadmin launch button in the docs.

Change History (12)

comment:1 by darkblueb, 15 years ago

I ran this update on a VM 4a4 with current patches.. sudo bin/install_pgrouting.sh

it installed a *lot* of packages.. an entire QT4 ? it ended with a createdb failure.. maybe another environment var missing on my part?

comment:2 by dkastl, 15 years ago

In the install script does it need to be sudo -u "user" createdb mydb or createdb -U "user" mydb ?

comment:3 by darkblueb, 15 years ago

Keywords: 4.0 added; 3.0 removed
Type: enhancementtask

in the install script, you can say

sudo -u user createdb test_db

and that will do what you want.. other scripts have a variable for user $USER_NAME $POSTGRES_USER etc

sudo -u $POSTGRES_USER createdb test_db

comment:4 by darkblueb, 14 years ago

maybe I am out-of-synch now, but there seems to be some confusion between

/usr/share/postgresql/8,4/contrib/postgis.sql

and

/usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql

whichever one is preferable, it has to match in the scripts...

comment:5 by dkastl, 14 years ago

I think it should be (if PostGIS version is used that is standard in Ubuntu 10.04)

/usr/share/postgresql/8.4/contrib/postgis.sql

browser/livedvd/gisvm/trunk/bin/install_pgrouting.sh

comment:6 by darkblueb, 14 years ago

I dont have the full build sequence going here.. but what I see so far is

/usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql

comment:7 by darkblueb, 14 years ago

4rc1 - the postgis.sql location is right, but load_postgis.sh does not complete. and install_pgrouting gets to the last line, then fails to connect also :-(

just now I added, in load_posgis

sudo -u $POSTGRES_USER to load_postgis.sh

in install_pgrouting.sh

sudo -u $USER_NAME osm2pgrouting

but this has to be tested...

in reply to:  7 comment:8 by hamish, 14 years ago

Replying to darkblueb:

but this has to be tested...

tested, it works AFAICT, thanks.

but I've run into another problem: Mapnik 0.7's PostGIS plugin fails. GpsDrive gives this error message:

Cannot init mapnik. Mapnik support DISABLED: Could not create
 datasource. No plugin found for type 'postgis' (encountered
 during parsing of layer 'leisure')

yet the /usr/lib/mapnik/0.7/input/postgis.input file is there..

maybe mapnik needs a recompile for postgis 1.5 as well? if so we've either got to put in another request to UbuntuGIS or drop back to the standard postgis 1.4.

I suggest someone with the latest VM may want to try to see if the 'Start Mapnik & TileLite' button still works.

further tests here:

http://live.osgeo.org/doc/mapnik_description.html

(and of course test pgRouting too)


Dane, the osm2pgsql svn checkout ended up with a 122mb svn-trunk/ dir (ouch), so I just made a .deb of the latest svn and threw it up on our download server. the .deb is 60kb. :) hopefully there are no dependency problems from this in the next build..

Hamish

comment:9 by dkastl, 14 years ago

pgRouting should work with PostGIS 1.5. At least it does on my computer. But documentation (in case of pgRouting the workshop manual and database creation dump) needs to be changed at some places according to the version of PostGIS. No big problem though.

comment:10 by hamish, 14 years ago

but I've run into another problem: Mapnik 0.7's PostGIS plugin fails.

nevermind, strace shows there was a hardcoded reference to mapnik/0.5 in there it couldn't find. A symlink later and it loads.

All I'm seeing in Barcelona is ocean though, no roads. (I skipped the OSM 300mb+ world boundaries shapefile, perhaps I should try linking against Natural Earth's in osm.xml) but that's another matter.

Mapnik & Tilelite installed and tested ok.

Hamish

in reply to:  10 comment:11 by hamish, 14 years ago

Keywords: postgis pgRouting added

Replying to hamish:

All I'm seeing in Barcelona is ocean though, no roads.

Ok got this working now. Usual story of half hardcoded constants which needed to be changed, half PBKAC. I created a second postgis DB called osm_local_smerc with the OSM data loaded as Google's silly mercator projection and connect to that. (just cloned Brian's earlier work: it seems to work ok without any of those extra commented-out SQL commands)

So now we have dynamic, rendering on the fly local street maps for all of Barcelona in scales from 1:1000 to city-wide available via PostGIS+Mapnik in GpsDrive. Thanks to Jorge and Oscar highlighted waypoints for the main conference/congress center, codesprint and workshops render on the map too.

I'd encourage any OSMers out there to go full out over the next three weeks to do all you can to enhance the area, but it's already in pretty good shape (building outlines, some relevant bus routes, etc already in place).

still some refinement to do, but at least now it's working..

include a pgadmin launch button in the docs.

there is an unused "Databases" section in the geo-menu which could contain things like pgadmin3, spatialitebrowser. ?

thanks, Hamish

comment:12 by darkblueb, 14 years ago

Resolution: fixed
Status: newclosed

fixed in rc9

Note: See TracTickets for help on using tickets.