[postgis-users] migrating mysql database with skt geometries into a postgis db?
Hi, I have this taskanyone got any tips on how to acheive thisß yors, Rob___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] GDALFPolygonize undefined in rtpostgis-2.0
The "result: none required" indicates that the GDALFPolygonize function was found in whatever GDAL library the configure ran against. If GDALFPolygonize was not found, polgonization of rasters is treated differently and uses the function GDALPolygonize instead. Since you are using GDAL 1.9, we know that it has GDALFPolygonize. If possible, can you go into raster/test/core and run "make check". That'll test the C API for PostGIS Raster. Completely a wild shot, can you run "ldconfig". I sometimes find refreshing the shared libraries cache helps. -bborie On 04/19/2012 02:33 PM, Gold, Jack L (US SSA) wrote: > BBorie, > > The config.log indicates "result: none required". I know this is for the > ac_cv_search, but does that have any effect on the symbol being compiled in? > I searched my system for alternate gdal installs and found none. > > --Jack > > -Original Message- > From: postgis-users-boun...@postgis.refractions.net > [mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Bborie > Park > Sent: Thursday, April 19, 2012 5:10 PM > To: postgis-users@postgis.refractions.net > Subject: Re: [postgis-users] GDALFPolygonize undefined in rtpostgis-2.0 > > Jack, > > My guess is that there are more than one GDAL libraries on your system and > the GDAL library used for testing the presence of GDAFPolygonize is different > than the GDAL library attempting to be loaded. Since you built postgis from > source, you should be able to check config.log and inspect the lines > regarding the GDALFPolygonize test. > > -bborie > > On 04/19/2012 02:02 PM, Gold, Jack L (US SSA) wrote: >> I am building and installing PostGIS 2.0.1SVN. Whenever I attempt to load >> rtpostgis.sql I receive the following error: >> >> ERROR: could not load library "/usr/local/pgsql/lib/rtpostgis-2.0": >> /usr/local/pgsql/lib/rtpostgis-2.0: undefined symbol: GDALFPolygonize >> >> >> ** Error ** >> >> ERROR: could not load library "/usr/local/pgsql/lib/rtpostgis-2.0": >> /usr/local/pgsql/lib/rtpostgis-2.0: undefined symbol: GDALFPolygonize >> SQL state: XX000 >> >> >> I built and installed postgresql-9.1.3 (--with-python), proj-4.8.0 >> (--without-jni), geos-3.3.2 (--enable-python), and gdal-1.9.0 (--with-python >> --with-java=/opt/jdk1.6.0_26 --with-geos=../geos-3.3.2/tools/geos-config). >> >> Finally, I built PostGIS-2.0.1SVN --with-raster >> -with-pgconfig=/usr/local/pgsql/bin/pg_config >> -with-geosconfig=../geos-3.3.2/tools/geos-config. >> >> /etc/ld.so.conf.d contains postgresql.conf: >> >> /usr/local/pgsql/lib >> /usr/local/lib >> /usr/lib >> >> All libraries are stored in one of these locations. >> >> $nm -u /usr/local/pgsql/lib/rtpostgis-2.0 | grep GDALFPolygonize U >> GDALFPolygonize >> >> $ nm --dynamic /usr/local/lib/libgdal.so.1.16.0 | grep GDALFPolygonize >> 004b4a40 T GDALFPolygonize >> >> Any idea why the symbol is undefined in rtpostgis-2.0? >> >> --Jack Gold >> >> >> >> >> >> >> >> >> >> >> ___ >> postgis-users mailing list >> postgis-users@postgis.refractions.net >> http://postgis.refractions.net/mailman/listinfo/postgis-users > > -- > Bborie Park > Programmer > Center for Vectorborne Diseases > UC Davis > 530-752-8380 > bkp...@ucdavis.edu > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users > -- Bborie Park Programmer Center for Vectorborne Diseases UC Davis 530-752-8380 bkp...@ucdavis.edu ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] GDALFPolygonize undefined in rtpostgis-2.0
BBorie, The config.log indicates "result: none required". I know this is for the ac_cv_search, but does that have any effect on the symbol being compiled in? I searched my system for alternate gdal installs and found none. --Jack -Original Message- From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Bborie Park Sent: Thursday, April 19, 2012 5:10 PM To: postgis-users@postgis.refractions.net Subject: Re: [postgis-users] GDALFPolygonize undefined in rtpostgis-2.0 Jack, My guess is that there are more than one GDAL libraries on your system and the GDAL library used for testing the presence of GDAFPolygonize is different than the GDAL library attempting to be loaded. Since you built postgis from source, you should be able to check config.log and inspect the lines regarding the GDALFPolygonize test. -bborie On 04/19/2012 02:02 PM, Gold, Jack L (US SSA) wrote: > I am building and installing PostGIS 2.0.1SVN. Whenever I attempt to load > rtpostgis.sql I receive the following error: > > ERROR: could not load library "/usr/local/pgsql/lib/rtpostgis-2.0": > /usr/local/pgsql/lib/rtpostgis-2.0: undefined symbol: GDALFPolygonize > > > ** Error ** > > ERROR: could not load library "/usr/local/pgsql/lib/rtpostgis-2.0": > /usr/local/pgsql/lib/rtpostgis-2.0: undefined symbol: GDALFPolygonize > SQL state: XX000 > > > I built and installed postgresql-9.1.3 (--with-python), proj-4.8.0 > (--without-jni), geos-3.3.2 (--enable-python), and gdal-1.9.0 (--with-python > --with-java=/opt/jdk1.6.0_26 --with-geos=../geos-3.3.2/tools/geos-config). > > Finally, I built PostGIS-2.0.1SVN --with-raster > -with-pgconfig=/usr/local/pgsql/bin/pg_config > -with-geosconfig=../geos-3.3.2/tools/geos-config. > > /etc/ld.so.conf.d contains postgresql.conf: > > /usr/local/pgsql/lib > /usr/local/lib > /usr/lib > > All libraries are stored in one of these locations. > > $nm -u /usr/local/pgsql/lib/rtpostgis-2.0 | grep GDALFPolygonize U > GDALFPolygonize > > $ nm --dynamic /usr/local/lib/libgdal.so.1.16.0 | grep GDALFPolygonize > 004b4a40 T GDALFPolygonize > > Any idea why the symbol is undefined in rtpostgis-2.0? > > --Jack Gold > > > > > > > > > > > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users -- Bborie Park Programmer Center for Vectorborne Diseases UC Davis 530-752-8380 bkp...@ucdavis.edu ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] GDALFPolygonize undefined in rtpostgis-2.0
Jack, My guess is that there are more than one GDAL libraries on your system and the GDAL library used for testing the presence of GDAFPolygonize is different than the GDAL library attempting to be loaded. Since you built postgis from source, you should be able to check config.log and inspect the lines regarding the GDALFPolygonize test. -bborie On 04/19/2012 02:02 PM, Gold, Jack L (US SSA) wrote: > I am building and installing PostGIS 2.0.1SVN. Whenever I attempt to load > rtpostgis.sql I receive the following error: > > ERROR: could not load library "/usr/local/pgsql/lib/rtpostgis-2.0": > /usr/local/pgsql/lib/rtpostgis-2.0: undefined symbol: GDALFPolygonize > > > ** Error ** > > ERROR: could not load library "/usr/local/pgsql/lib/rtpostgis-2.0": > /usr/local/pgsql/lib/rtpostgis-2.0: undefined symbol: GDALFPolygonize > SQL state: XX000 > > > I built and installed postgresql-9.1.3 (--with-python), proj-4.8.0 > (--without-jni), geos-3.3.2 (--enable-python), and gdal-1.9.0 (--with-python > --with-java=/opt/jdk1.6.0_26 --with-geos=../geos-3.3.2/tools/geos-config). > > Finally, I built PostGIS-2.0.1SVN --with-raster > -with-pgconfig=/usr/local/pgsql/bin/pg_config > -with-geosconfig=../geos-3.3.2/tools/geos-config. > > /etc/ld.so.conf.d contains postgresql.conf: > > /usr/local/pgsql/lib > /usr/local/lib > /usr/lib > > All libraries are stored in one of these locations. > > $nm -u /usr/local/pgsql/lib/rtpostgis-2.0 | grep GDALFPolygonize > U GDALFPolygonize > > $ nm --dynamic /usr/local/lib/libgdal.so.1.16.0 | grep GDALFPolygonize > 004b4a40 T GDALFPolygonize > > Any idea why the symbol is undefined in rtpostgis-2.0? > > --Jack Gold > > > > > > > > > > > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users -- Bborie Park Programmer Center for Vectorborne Diseases UC Davis 530-752-8380 bkp...@ucdavis.edu ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] GDALFPolygonize undefined in rtpostgis-2.0
I am building and installing PostGIS 2.0.1SVN. Whenever I attempt to load rtpostgis.sql I receive the following error: ERROR: could not load library "/usr/local/pgsql/lib/rtpostgis-2.0": /usr/local/pgsql/lib/rtpostgis-2.0: undefined symbol: GDALFPolygonize ** Error ** ERROR: could not load library "/usr/local/pgsql/lib/rtpostgis-2.0": /usr/local/pgsql/lib/rtpostgis-2.0: undefined symbol: GDALFPolygonize SQL state: XX000 I built and installed postgresql-9.1.3 (--with-python), proj-4.8.0 (--without-jni), geos-3.3.2 (--enable-python), and gdal-1.9.0 (--with-python --with-java=/opt/jdk1.6.0_26 --with-geos=../geos-3.3.2/tools/geos-config). Finally, I built PostGIS-2.0.1SVN --with-raster -with-pgconfig=/usr/local/pgsql/bin/pg_config -with-geosconfig=../geos-3.3.2/tools/geos-config. /etc/ld.so.conf.d contains postgresql.conf: /usr/local/pgsql/lib /usr/local/lib /usr/lib All libraries are stored in one of these locations. $nm -u /usr/local/pgsql/lib/rtpostgis-2.0 | grep GDALFPolygonize U GDALFPolygonize $ nm --dynamic /usr/local/lib/libgdal.so.1.16.0 | grep GDALFPolygonize 004b4a40 T GDALFPolygonize Any idea why the symbol is undefined in rtpostgis-2.0? --Jack Gold ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Raster import is causing Postgres to close
If by a pop-up saying "PostgreSQL Tools has stopped RESPONDING", it may be the shear size of your file. On windows, I have observed such a phenomenon when trying to import fairly large postgresql files (the size of yours ranks up there as fairly large). To verify if this was the cause, excerpt your file, extracting the first 20 or so inserts and see if that will run successfully. If so, you can try ignorning the "not responding" message and hope that it completes, or split the file manually, or by some other means into several smaller files. HTH, r.b. From: postgis-users-boun...@postgis.refractions.net [postgis-users-boun...@postgis.refractions.net] on behalf of JamesH [james.hol...@newcastle.ac.uk] Sent: Thursday, April 19, 2012 11:05 AM To: postgis-users@postgis.refractions.net Subject: Re: [postgis-users] Raster import is causing Postgres to close "When you say " I open the sql file in Postgres ", what do you mean exactly? How do you load the file in the db?" In the SQL query window for the database, I select File > Open and then select the sql file. Normally, once I've done this the code displays in the window and I then Execute the query to create the new table. "Any error message?" Yes, a pop-up that says 'pgAdmin III - PostgreSQL Tools has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.' James - GIS Undergraduate -- View this message in context: http://postgis.17.n6.nabble.com/Raster-import-is-causing-Postgres-to-close-tp4897915p4898506.html Sent from the PostGIS - User mailing list archive at Nabble.com. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Raster import is causing Postgres to close
> "When you say " I open the sql file in Postgres ", what do you mean exactly? > How do you load the file in the db?" > In the SQL query window for the database, I select File > Open and then > select the sql file. Normally, once I've done this the code displays in the > window and I then Execute the query to create the new table. > > "Any error message?" > Yes, a pop-up that says 'pgAdmin III - PostgreSQL Tools has stopped working. > A problem > caused the program to stop working correctly. Windows will close the program > and notify you if a solution is available.' First you have to differentiate pgAdmin from PostgreSQL. The problem does not occur in PostgreSQL. It occurs in pgAdmin... Your SQL file is too big to be handled by pgAdmin. Just go back to your shell where you did raster2pgsql and do (replacing yourpostgresrole and yourDatabase with the correct values) psql -U yourpostgresrole -f "C:\Users\Data\Thermal.sql" yourDatabase That's the way to load (or execute) large sql files into PostgreSQL. Pierre ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Raster import is causing Postgres to close
"When you say " I open the sql file in Postgres ", what do you mean exactly? How do you load the file in the db?" In the SQL query window for the database, I select File > Open and then select the sql file. Normally, once I've done this the code displays in the window and I then Execute the query to create the new table. "Any error message?" Yes, a pop-up that says 'pgAdmin III - PostgreSQL Tools has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.' James - GIS Undergraduate -- View this message in context: http://postgis.17.n6.nabble.com/Raster-import-is-causing-Postgres-to-close-tp4897915p4898506.html Sent from the PostGIS - User mailing list archive at Nabble.com. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Raster import is causing Postgres to close
When you say " I open the sql file in Postgres ", what do you mean exactly? How do you load the file in the db? Any error message? Pierre > -Original Message- > From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users- > boun...@postgis.refractions.net] On Behalf Of JamesH > Sent: Thursday, April 19, 2012 7:51 AM > To: postgis-users@postgis.refractions.net > Subject: [postgis-users] Raster import is causing Postgres to close > > Hi all, > > I am trying to import a Thermal Imagery 3-Band TIFF (approx. 27MB). > > Currently in raster2pgsql I am using: > raster2pgsql -s 27700 -I -C C:\Users\Data\thermal.tif > > C:\Users\Data\Thermal.sql > > This executes fine in CMD, but when I open the sql file in Postgres it > doesn't load and causes Postgres to stop working and close. > I thought perhaps I needed to tile it, so I tried breaking it into 64x64 > tiles but this had the same result. > > Can anyone advise on what could be causing this? > > Kind Regards, > James > > - > GIS Undergraduate > -- > View this message in context: http://postgis.17.n6.nabble.com/Raster-import- > is-causing-Postgres-to-close-tp4897915p4897915.html > Sent from the PostGIS - User mailing list archive at Nabble.com. > ___ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] Raster import is causing Postgres to close
Hi all, I am trying to import a Thermal Imagery 3-Band TIFF (approx. 27MB). Currently in raster2pgsql I am using: raster2pgsql -s 27700 -I -C C:\Users\Data\thermal.tif > C:\Users\Data\Thermal.sql This executes fine in CMD, but when I open the sql file in Postgres it doesn't load and causes Postgres to stop working and close. I thought perhaps I needed to tile it, so I tried breaking it into 64x64 tiles but this had the same result. Can anyone advise on what could be causing this? Kind Regards, James - GIS Undergraduate -- View this message in context: http://postgis.17.n6.nabble.com/Raster-import-is-causing-Postgres-to-close-tp4897915p4897915.html Sent from the PostGIS - User mailing list archive at Nabble.com. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Restrict values entered in a shapefile in postgis/postgres
On Thu, Apr 19, 2012 at 03:40:48PM +0530, MaheshKrishnan wrote: > So the problem is I want to restrict the values that can be entered in a > specific column of a specific shape file but haven't been able to do it. You mean ".. of a specific table", not "shape file". > For example if there is a shapefile called Hydro_points and it has an > attribute column call Hydro_type I want only the values 1, 2 or 3 to be > entered here. ... > That table should not accept any other values You can use CHECK constraints on the table, with something like: ALTER TABLE mytable ADD CONSTRAINT only_one_two_three CHECK "Hydro_type" IN (1,2,3); (check the PostgreSQL reference manual to tweak and lear more) --strk; ,--o-. | __/ |Delivering high quality PostGIS 2.0 ! | / 2.0 |http://strk.keybit.net - http://vizzuality.com `-o--' ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] Restrict values entered in a shapefile in postgis/postgres
Hi All, I am new to this so forgive me if the question is stupid. I am trying to migrate my companies GIS production to PostGIS/postGres SQL. We were using ESRI File Geodatabase with SDE before this. So the problem is I want to restrict the values that can be entered in a specific column of a specific shape file but haven't been able to do it. For example if there is a shapefile called Hydro_points and it has an attribute column call Hydro_type I want only the values 1, 2 or 3 to be entered here. That table should not accept any other values and if these 3 values can be shown as a drop down box even better. We plan on using QGIS to do the production and I have gone through every inch of setting available in pgadmin III as well Please help, MaheshKrishnan ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] help needed
On Thu, Apr 19, 2012 at 02:42:11PM +0530, milon bhattacharya wrote: > I recently installed PostGIS 2.0 . Using tool rastertopgsql converted a > geotiff into sql. While executing the SQL using psql tool I am getting an > error > "type raster does not exists", please help. It looks like you didn't correctly install PostGIS 2.0. What documentation did you follow ? Run: SELECT postgis_full_version(); against your target database to verify. --strk; ,--o-. | __/ |Delivering high quality PostGIS 2.0 ! | / 2.0 |http://strk.keybit.net - http://vizzuality.com `-o--' ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] help needed
I recently installed PostGIS 2.0 . Using tool rastertopgsql converted a geotiff into sql. While executing the SQL using psql tool I am getting an error "type raster does not exists", please help. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users