Re: [postgis-users] user postgres fiasco(?) on Mac OS X 10.6.6
My PostGIS distribution is made for my Postgres distribution. It will not install for the EnterpriseDB distribution, and even if you could extract PostGIS and install it where EnterpriseDB wants it, it probably won't work. I think they have a build of PostGIS that works with their Postgres. On Mar 5, 2011, at 6:14 PM, Rosemary Alles wrote: > I believe I figured it out, the Mac OS X install wiz for postgresql defaults > to /Library/PostgreSQL/ (which I accepted) and the install wiz for postgis > appears to *only* look in /usr/local/ to determine if postgresql has > *already* been installed, hence one of two things must happen: > • postgresql installing *must* happen in /usr/local or > • create a symbolic link from /usr/local to where the preferred > installation location (for postgresql) and the installation for postgis > follows without a problem (without which it fails complaining it needs > postgresql.) > • Is this is a simple matter of un-tarring a compressed file, - then no > biggie anyway... > Thanks for your help, > rosemary. > > On Sat, Mar 5, 2011 at 3:30 PM, Rosemary Alles > wrote: > Thanks William. > > I redid the installation (by *actually* reading the readme -duh- and things > appear to be working). > > The installation, uses an install wiz which asks for the password, etc. > (system password for the user postgres vs the db password) - the installation > proceeds ok as long as shared mem has been set (as required) and the system > rebooted to register the change *prior* to installation. > > Anyway, I need to install PostGIS on top of this, and wonder where (which > directory under /Library/PostgreSQL/9.0/ I should untar the PostGIS binaries > from: http://www.kyngchaos.com/software:postgres? > > Thanks much, > rosemary. > > > On Sat, Mar 5, 2011 at 8:54 AM, William Kyngesburye > wrote: > On Mar 5, 2011, at 4:38 AM, Rosemary Alles wrote: > > > Hullo all, > > > > After running around in circles for a bit, I decide I would ask. The > > installation of PostgreSQL from > > http://www.enterprisedb.com/products-services-training/pgdownload#osx > > apparently created a user "postgres" (with no home directory - but that's > > ok) and if there's a password (maybe there isn't one?) then I have no idea > > what it is... I had to enable root to get into the data directory (su - > > postgress), now I'm assuming I have to edit pg_hba.conf (to change/set the > > password - authenticate users/roles) before I can do anything else? > > > This is normal. (I *do* have this info in my Postgres distribution) There > is no password, but it's a special null password, not an empty password, so > it can't be used to login to anything. It's a user solely used for running > Postgres. But you can force authentication (for editing the config files) > with root. > > > > Still, the current config is as follows, which appears to grant access to > > "all" w/trust? If so, why am I getting an error upon trying to create a DB > > as myself/admin? > > > > # TYPE DATABASEUSERCIDR-ADDRESSMETHOD > > # "local" is for Unix domain socket connections only > > local all all trust > > # IPv4 local connections: > > hostall all 127.0.0.1/32trust > > # IPv6 local connections: > > hostall all ::1/128 trust > > > > error: > > createdb: could not connect to database postgres: FATAL: role > > "whatever_name" does not > > > > exist > > > Have you set up any postgres users, "roles", yet? Postgres doesn't use > system users. A "postgres" role is created on initialization (independent of > the system postgres user). Use that to create other roles and to manage > other stuff. > > > Check the Postgres documentation and other help resources for more details. > My Postgres distribution has some basics, to get people started. > > > > Any help is good, > > rosemary. > > > > > > ___ > > postgis-users mailing list > > postgis-users@postgis.refractions.net > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > - > William Kyngesburye > http://www.kyngchaos.com/ > > The equator is so long, it could encircle the earth completely once. > > > > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users - William Kyngesburye http://www.kyngchaos.com/ All generalizations are dangerous, even this one. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] user postgres fiasco(?) on Mac OS X 10.6.6
I believe I figured it out, the Mac OS X install wiz for postgresql defaults to /Library/PostgreSQL/ (which I accepted) and the install wiz for postgis appears to *only* look in /usr/local/ to determine if postgresql has *already* been installed, hence one of two things must happen: 1. postgresql installing *must* happen in /usr/local or 2. create a symbolic link from /usr/local to where the preferred installation location (for postgresql) and the installation for postgis follows without a problem (without which it fails complaining it needs postgresql.) 3. Is this is a simple matter of un-tarring a compressed file, - then no biggie anyway... Thanks for your help, rosemary. On Sat, Mar 5, 2011 at 3:30 PM, Rosemary Alles wrote: > Thanks William. > > I redid the installation (by *actually* reading the readme -duh- and things > appear to be working). > > The installation, uses an install wiz which asks for the password, etc. > (system password for the user postgres vs the db password) - the > installation proceeds ok as long as shared mem has been set (as required) > and the system rebooted to register the change *prior* to installation. > > Anyway, I need to install PostGIS on top of this, and wonder where (which > directory under /Library/PostgreSQL/9.0/ I should untar the PostGIS binaries > from: http://www.kyngchaos.com/software:postgres? > > Thanks much, > rosemary. > > > On Sat, Mar 5, 2011 at 8:54 AM, William Kyngesburye > wrote: > >> On Mar 5, 2011, at 4:38 AM, Rosemary Alles wrote: >> >> > Hullo all, >> > >> > After running around in circles for a bit, I decide I would ask. The >> installation of PostgreSQL from >> http://www.enterprisedb.com/products-services-training/pgdownload#osxapparently >> created a user "postgres" (with no home directory - but that's >> ok) and if there's a password (maybe there isn't one?) then I have no idea >> what it is... I had to enable root to get into the data directory (su - >> postgress), now I'm assuming I have to edit pg_hba.conf (to change/set the >> password - authenticate users/roles) before I can do anything else? >> > >> This is normal. (I *do* have this info in my Postgres distribution) >> There is no password, but it's a special null password, not an empty >> password, so it can't be used to login to anything. It's a user solely used >> for running Postgres. But you can force authentication (for editing the >> config files) with root. >> >> >> > Still, the current config is as follows, which appears to grant access >> to "all" w/trust? If so, why am I getting an error upon trying to create a >> DB as myself/admin? >> > >> > # TYPE DATABASEUSERCIDR-ADDRESSMETHOD >> > # "local" is for Unix domain socket connections only >> > local all all trust >> > # IPv4 local connections: >> > hostall all 127.0.0.1/32trust >> > # IPv6 local connections: >> > hostall all ::1/128 trust >> > >> > error: >> > createdb: could not connect to database postgres: FATAL: role >> "whatever_name" does not >> > >> > exist >> > >> Have you set up any postgres users, "roles", yet? Postgres doesn't use >> system users. A "postgres" role is created on initialization (independent >> of the system postgres user). Use that to create other roles and to manage >> other stuff. >> >> >> Check the Postgres documentation and other help resources for more >> details. My Postgres distribution has some basics, to get people started. >> >> >> > Any help is good, >> > rosemary. >> > >> > >> > ___ >> > postgis-users mailing list >> > postgis-users@postgis.refractions.net >> > http://postgis.refractions.net/mailman/listinfo/postgis-users >> >> - >> William Kyngesburye >> http://www.kyngchaos.com/ >> >> The equator is so long, it could encircle the earth completely once. >> >> > ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] user postgres fiasco(?) on Mac OS X 10.6.6
Thanks William. I redid the installation (by *actually* reading the readme -duh- and things appear to be working). The installation, uses an install wiz which asks for the password, etc. (system password for the user postgres vs the db password) - the installation proceeds ok as long as shared mem has been set (as required) and the system rebooted to register the change *prior* to installation. Anyway, I need to install PostGIS on top of this, and wonder where (which directory under /Library/PostgreSQL/9.0/ I should untar the PostGIS binaries from: http://www.kyngchaos.com/software:postgres? Thanks much, rosemary. On Sat, Mar 5, 2011 at 8:54 AM, William Kyngesburye wrote: > On Mar 5, 2011, at 4:38 AM, Rosemary Alles wrote: > > > Hullo all, > > > > After running around in circles for a bit, I decide I would ask. The > installation of PostgreSQL from > http://www.enterprisedb.com/products-services-training/pgdownload#osxapparently > created a user "postgres" (with no home directory - but that's > ok) and if there's a password (maybe there isn't one?) then I have no idea > what it is... I had to enable root to get into the data directory (su - > postgress), now I'm assuming I have to edit pg_hba.conf (to change/set the > password - authenticate users/roles) before I can do anything else? > > > This is normal. (I *do* have this info in my Postgres distribution) There > is no password, but it's a special null password, not an empty password, so > it can't be used to login to anything. It's a user solely used for running > Postgres. But you can force authentication (for editing the config files) > with root. > > > > Still, the current config is as follows, which appears to grant access to > "all" w/trust? If so, why am I getting an error upon trying to create a DB > as myself/admin? > > > > # TYPE DATABASEUSERCIDR-ADDRESSMETHOD > > # "local" is for Unix domain socket connections only > > local all all trust > > # IPv4 local connections: > > hostall all 127.0.0.1/32trust > > # IPv6 local connections: > > hostall all ::1/128 trust > > > > error: > > createdb: could not connect to database postgres: FATAL: role > "whatever_name" does not > > > > exist > > > Have you set up any postgres users, "roles", yet? Postgres doesn't use > system users. A "postgres" role is created on initialization (independent > of the system postgres user). Use that to create other roles and to manage > other stuff. > > > Check the Postgres documentation and other help resources for more details. > My Postgres distribution has some basics, to get people started. > > > > Any help is good, > > rosemary. > > > > > > ___ > > postgis-users mailing list > > postgis-users@postgis.refractions.net > > http://postgis.refractions.net/mailman/listinfo/postgis-users > > - > William Kyngesburye > http://www.kyngchaos.com/ > > The equator is so long, it could encircle the earth completely once. > > ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] images in postgresql
Robert, Is there a reason why you have the points in a separate table or do you have points in both tables and you want to relate by a spatial join? If its a 1 to 1 relationship, we would just put them in the same table. As far as foreign keys go, you should have some identifier the same in the two tables. Do you? So it would be of the form SELECT wt.wt_id, wt.geom, p.picture FROM windturbines As wt INNER JOIN pictures As p ON wt.wt_id = p.wt_id or if they are spatially related by space SELECT wt.wt_id, wt.geom, p.picture FROM windturbines As wt INNER JOIN pictures As p ON ST_DWithin(wt.geom, pt.geom, 10) The 10 depends on the spatial reference system or if you are using geography type then it means 10 meters. So I'm treating the wind turbine location and picture location as the same if they are within 10 meters apart. BTW: you might want to read the first chapter of our upcoming book. It's a free download and answers this type of question with concrete examples. http://www.postgis.us/chapter_01 Leo http://www.postgis.us _ From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Robert Buckley Sent: Saturday, March 05, 2011 5:39 AM To: postgis-users@postgis.refractions.net Subject: [postgis-users] images in postgresql Hi, I am just experimenting at the moment with a project and could do with some advice. I have created a database which contains photos of Windturbines. I also have a postgis database with the locations (points) of the wind turbines and would like join the photos to the points via a link table or foreign key. As you can tell, I haven´t too much experience with postgresql and relational database design. But i can imagine that the task should not be too difficult. I am just a bit unsure how to go about it. The photos are on the linux server and the creation of the table and the insert of the image was successfull. But how do i get the join and how would I display this photo in a geoext project? thanks for any tips, Robert ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] user postgres fiasco(?) on Mac OS X 10.6.6
On Mar 5, 2011, at 4:38 AM, Rosemary Alles wrote: > Hullo all, > > After running around in circles for a bit, I decide I would ask. The > installation of PostgreSQL from > http://www.enterprisedb.com/products-services-training/pgdownload#osx > apparently created a user "postgres" (with no home directory - but that's ok) > and if there's a password (maybe there isn't one?) then I have no idea what > it is... I had to enable root to get into the data directory (su - > postgress), now I'm assuming I have to edit pg_hba.conf (to change/set the > password - authenticate users/roles) before I can do anything else? > This is normal. (I *do* have this info in my Postgres distribution) There is no password, but it's a special null password, not an empty password, so it can't be used to login to anything. It's a user solely used for running Postgres. But you can force authentication (for editing the config files) with root. > Still, the current config is as follows, which appears to grant access to > "all" w/trust? If so, why am I getting an error upon trying to create a DB as > myself/admin? > > # TYPE DATABASEUSERCIDR-ADDRESSMETHOD > # "local" is for Unix domain socket connections only > local all all trust > # IPv4 local connections: > hostall all 127.0.0.1/32trust > # IPv6 local connections: > hostall all ::1/128 trust > > error: > createdb: could not connect to database postgres: FATAL: role > "whatever_name" does not > > exist > Have you set up any postgres users, "roles", yet? Postgres doesn't use system users. A "postgres" role is created on initialization (independent of the system postgres user). Use that to create other roles and to manage other stuff. Check the Postgres documentation and other help resources for more details. My Postgres distribution has some basics, to get people started. > Any help is good, > rosemary. > > > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users - William Kyngesburye http://www.kyngchaos.com/ The equator is so long, it could encircle the earth completely once. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Error when importing raster table
2011/3/1 Andreas Forø Tollefsen : > Hi. As you say the sql file has been generated, and i can load it. > I was just curious why i got a warning? > Thanks for the reminder. I will update my PostGIS.. > Andreas > Hi Andreas, Honestly, I'm not sure. It may be related with the "pack" function of your python version... > 2011/3/1 Jorge Arévalo >> >> On Tue, Mar 1, 2011 at 9:38 AM, Andreas Forø Tollefsen >> wrote: >> > Hi. >> > As seen in a different post, I am working on some raster data. I have >> > recently experienced a problem with processing of raster to tables using >> > the >> > gdal2wktraster.py tool. >> > Any idea why this gives and error, and is it just a warning about >> > integer vs >> > float? >> > C:\Python25>python gdal2wktraster.py -r >> > c:\prio_grid\source\globcover\globlow.ti >> > f -t globlow -s 4326 -k 50x50 -I -M -o globlow.sql >> > gdal2wktraster.py:645: DeprecationWarning: integer argument expected, >> > got >> > float >> > hexstr = binascii.hexlify(struct.pack(fmt_little, data)).upper() >> > >> > Summary of GDAL to WKT Raster processing: >> > >> > Number of processed raster files: 1 >> > (c:\prio_grid\source\globcover\globlow.tif) >> > List of generated tables (number of tiles): >> > 1 globlow (45360) >> > C:\Python25> >> > >> > >> > >> > >> > >> > ___ >> > postgis-users mailing list >> > postgis-users@postgis.refractions.net >> > http://postgis.refractions.net/mailman/listinfo/postgis-users >> > >> > >> >> Hi Andreas, >> >> The SQL file has been generated. Could you load it into Postgres? >> >> Anyway, I strongly recommend you to use the new version of PostGIS >> Raster (WKTRaster was the old name). Now PostGIS Raster is part of >> PostGIS, and is packed with it (not official version yet, you need to >> check it out from repository). The old version you're using is no >> longer maintained >> >> Best regards, >> >> -- >> Jorge Arévalo >> Internet & Mobilty Division, DEIMOS >> jorge.arev...@deimos-space.com >> http://es.linkedin.com/in/jorgearevalo80 >> http://mobility.grupodeimos.com/ >> http://gis4free.wordpress.com >> http://geohash.org/ezjqgrgzz0g > > -- Jorge Arévalo Internet & Mobilty Division, DEIMOS jorge.arev...@deimos-space.com http://es.linkedin.com/in/jorgearevalo80 http://mobility.grupodeimos.com/ http://gis4free.wordpress.com http://geohash.org/ezjqgrgzz0g ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] images in postgresql
Hi, I am just experimenting at the moment with a project and could do with some advice. I have created a database which contains photos of Windturbines. I also have a postgis database with the locations (points) of the wind turbines and would like join the photos to the points via a link table or foreign key. As you can tell, I haven´t too much experience with postgresql and relational database design. But i can imagine that the task should not be too difficult. I am just a bit unsure how to go about it. The photos are on the linux server and the creation of the table and the insert of the image was successfull. But how do i get the join and how would I display this photo in a geoext project? thanks for any tips, Robert ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] user postgres fiasco(?) on Mac OS X 10.6.6
Hullo all, After running around in circles for a bit, I decide I would ask. The installation of PostgreSQL from http://www.enterprisedb.com/products-services-training/pgdownload#osxapparently created a user "postgres" (with no home directory - but that's ok) and if there's a password (maybe there isn't one?) then I have no idea what it is... I had to enable root to get into the data directory (su - postgress), now I'm assuming I have to edit pg_hba.conf (to change/set the password - authenticate users/roles) before I can do anything else? Still, the current config is as follows, which appears to grant access to "all" w/trust? If so, why am I getting an error upon trying to create a DB as myself/admin? # TYPE DATABASEUSERCIDR-ADDRESSMETHOD # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: hostall all 127.0.0.1/32trust # IPv6 local connections: hostall all ::1/128 trust error: createdb: could not connect to database postgres: FATAL: role "whatever_name" does not exist Any help is good, rosemary. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users