Re: [postgis-users] How to update (replace) a Postgis table?
On Fri, Feb 8, 2013 at 7:34 AM, Stefan Schwarzer stefan.schwar...@unep.org wrote: Hi there, I would like to update a countries of the world-postgis-table, by replacing it with another one which comes in form of a shapefile (dumped from a Postgis database) from my development server. Now, I can't just do a pgsql2shp, as this would throw an error as the table already exists. And renaming the existing table into something like xx_original doesn't work either (xx_geom_gist already exists, is then the error message). I don't want to delete the (old) table directly, as I would like to keep it as a backup. So, what is the right way to solve this? Thanks for any hints! Using the pgsql2shp -d option will drop and recreate the table regards -- Paolo Corti Geospatial software developer web: http://www.paolocorti.net twitter: @capooti skype: capooti ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Re: [postgis-users] Is it worth to load background raster into postgis?
Hi Thanks Paolo How can I store my images to be served as WMS? @Pierre The advantages are a lot considering our situation. At first, all our base offical regional data are in dxf format, crazy but true.. These are 983 dxf that I converted into three postgis tables, 3D polylines, block and text placeholders, with indexes on geometry and layer names. All these data are read only and they are used mainly for background and/or for data extraction for various pourposes. They can be all queried by spatial relationship and extracted by layer name. There is advantage on extraction performance and disk space (14Gb db space against 90Gb dxf).. Besides these data there are administrative vectorial data, data on land use, wells, lots of data that can be modified. The performance over the network is good, expecially when you extract data for small areas. I don't know if these performances could be the same with raster... I mean, if I load the ecw's on a postgis database, which could be the ratio on disk space between ecw compressed image and raster table? The refreshing of views are as fast as with ecw? Does the postgis database grow up too much with raster? I don't know.. I'm just testing these possibility but I'm not an IT expert Thank you all Pietro 2013/2/6 Pierre Racine-2 [via PostGIS] ml-node+s17n5002528...@n6.nabble.com Pietro, Just two questions: -What advantages did you find in storing vector data in the DB? -Why each of those advantages do not apply to raster? Pierre -Original Message- From: [hidden email]http://user/SendEmail.jtp?type=nodenode=5002528i=0[mailto: postgis-users- [hidden email] http://user/SendEmail.jtp?type=nodenode=5002528i=1] On Behalf Of Pietro Rossin Sent: Wednesday, February 06, 2013 7:21 AM To: [hidden email]http://user/SendEmail.jtp?type=nodenode=5002528i=2 Subject: [postgis-users] Is it worth to load background raster into postgis? Hi all we are building a postgis db to store shared data to e used in my agency. While for the vectorial part of our data I'm convinced of the advantage to store them into a geodb, for the raster part of data I'm not so convinced. I took a look at postgis raster reference page and I realized that postgis raster is good if the raster is used to make analysis. So, let's say it's ok for dtm raster data, to obtain slope/hillshade/aspect on the fly.. But If the raster we use is only for base/coreographic pourpose, to be loaded mainly in desktop mapping applications, is it worth to use postgis? Right now most of our raster are in ecw format and I'm searching a way to distribute them over LAN.. May be a mosaic/vrt.. Ay suggestion? Thank you Pietro -- View this message in context: http://postgis.17.n6.nabble.com/Is-it-worth-to- load-background-raster-into-postgis-tp5002525.html Sent from the PostGIS - User mailing list archive at Nabble.com. ___ postgis-users mailing list [hidden email] http://user/SendEmail.jtp?type=nodenode=5002528i=3 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users ___ postgis-users mailing list [hidden email] http://user/SendEmail.jtp?type=nodenode=5002528i=4 http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users -- If you reply to this email, your message will be added to the discussion below: http://postgis.17.n6.nabble.com/Is-it-worth-to-load-background-raster-into-postgis-tp5002525p5002528.html To unsubscribe from Is it worth to load background raster into postgis?, click herehttp://postgis.17.n6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=5002525code=cGllcmlnaXNAZ21haWwuY29tfDUwMDI1MjV8MjMwODY1MTQ5 . NAMLhttp://postgis.17.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://postgis.17.n6.nabble.com/Is-it-worth-to-load-background-raster-into-postgis-tp5002525p5002546.html Sent from the PostGIS - User mailing list archive at Nabble.com.___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Re: [postgis-users] How to update (replace) a Postgis table?
On 2/8/2013 1:34 AM, Stefan Schwarzer wrote: Hi there, I would like to update a countries of the world-postgis-table, by replacing it with another one which comes in form of a shapefile (dumped from a Postgis database) from my development server. Now, I can't just do a pgsql2shp, as this would throw an error as the table already exists. And renaming the existing table into something like xx_original doesn't work either (xx_geom_gist already exists, is then the error message). I don't want to delete the (old) table directly, as I would like to keep it as a backup. So, what is the right way to solve this? Thanks for any hints! Stefan, Load the table to something like table_new then in a transaction begin; alter table rename table_old to table_bak; alter table rename table_new to table_old; end; Another way to do this is: create schema new; -- shp2pgsql new.my_table create schema tmp; begin; alter table current_schema.my_table set schema tmp; alter table new.my_table set schema current_schema; end; Now your original table and related indexes are in schema tmp and your new table is in current_schema. If you do this on a live database using the transactions are atomic and anybody using that table will not be impacted by the change other than they they will magically be working with the new data. -Steve ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
[postgis-users] rtpostgis.sql
I recently changed my installation process and allowed one of my company admins to install postgis 2.0 with the RHEL 5.9 installation, but I noticed when he finished that the rtpostgis.sql file was no longer in the installation. Has rtpostgis.sql been removed? Is it not part of the rpm? [cid:image001.jpg@01CE05EC.C99AA8E0] inline: image001.jpgattachment: Jack Gold.vcf___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Re: [postgis-users] Is it worth to load background raster into postgis?
Il 08/02/2013 14:19, Pietro Rossin ha scritto: Hi Thanks Paolo How can I store my images to be served as WMS? any format that can by read by your WMS server; most probably gdalinfo --formats I don't know if these performances could be the same with raster... I mean, if I load the ecw's on a postgis database, which could be the ratio on disk space between ecw compressed image and raster table? certainly unfavourable for PG The refreshing of views are as fast as with ecw? no Does the postgis database grow up too much with raster? I do not know what is too much for you, certainly it will increase a lot. All the best. -- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Re: [postgis-users] Is it worth to load background raster into postgis?
Il 08/02/2013 20:27, Pietro Rossin ha scritto: We don't have a WMS server yet, any suggestion for a not too difficult to configure solution? OT here, but cetainly the easiest is aptitude install qgis-mapserver All the best. -- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users