Re: [postgis-users] AddGeometryColumn and Create Type

2009-07-15 Thread George Silva
Hello Gianvito, AddGeometryColumns does an additional operation, which is updating the table public.geometry_columns, used by most of OS GIS software to find out what is the column that contains the geometry, it's type and SRID. Also this function creates all the constraints necessary to use these

Re: [postgis-users] Creating a new table with geometry with different number of rows from another table: how to do this

2009-07-15 Thread Matthew Pettis
Thanks both for your answers... I'm going to try Leo's solution. Matt On Wed, Jul 15, 2009 at 2:29 PM, Matthew Pettis wrote: > Hi, > > I’m trying to find the right incantation on how to create a new table with > a geometry column from an old one efficiently. Here’s the essential query I > want t

Re: [postgis-users] Creating a new table with geometry with differentnumber of rows from another table: how to do this

2009-07-15 Thread Paragon Corporation
Matthew, You want to create the table first something like CREATE TABLE shp_mcd_centroid(gid SERIAL PRIMARY KEY, mcd_name varchar(100), type varchar(100)); then do the SELECT AddGeometryColumn (http://postgis.refractions.net/documentation/manual-1.4.0SVN/AddGeometryCol umn.html - w

Re: [postgis-users] Creating a new table with geometry with different number of rows from another table: how to do this

2009-07-15 Thread Eduin Carrillo
I think you must use a bidimensional field: ...'MULTIPOINT',2)... Eduin Yesid Carrillo Vega Ingeniero Civil, Esp. Sistemas de Información Geográfica Grupo IDE & GIG Centro de Investigación y Desarrollo en Información Geográfica Instituto Geográfico Agustín Codazzi - IGAC Cr 30 48-51 Tel +57 1 369

[postgis-users] Creating a new table with geometry with different number of rows from another table: how to do this

2009-07-15 Thread Matthew Pettis
Hi, I’m trying to find the right incantation on how to create a new table with a geometry column from an old one efficiently. Here’s the essential query I want to do... CREATE TABLE shp_mcd_centroids AS SELECT DISTINCT mcd_name, "t

[postgis-users] AddGeometryColumn and Create Type

2009-07-15 Thread Gianvito Pio
Hi all, I read on the PostGIS documentation that I should use AddGeometryColumn function to avoid software compatibility problems. Btw...I need to define a type that contains two varchars and a geometry column...how should I do it? Thanks___ postgis-us

Re: [postgis-users] KML Export

2009-07-15 Thread Eduin Carrillo
Hi Stefan. Geometry Outputs[1] functions (ST_As*) allow you output geometric fields as geometric representations. ST_AsKML do not return full KML documents, but descendant objects of [2] abstract object in KML. This is a best expression of your query: SELECT ST_AsKML(the_geom) FROM my_spatial_ta

Re: [postgis-users] KML Export

2009-07-15 Thread Steve . Toutant
I also use OGR to export, here is an example with PHP $query = sprintf('select * from %s%s as a;',$schema,$layerName); $result = pg_query($dbconn, $query); $ogr2ogr = 'CALL D:\\ms4w\\tools\\gdal-ogr\\ogr2ogr.exe'; //where the file goes $stock = 'd:\\ms4w\\Apache\\htdocs\\tmp\\'; $shellcommand =

Re: [postgis-users] Data modeling tool

2009-07-15 Thread Nicolas Ribot
I'm using Druid (http://druid.sourceforge.net/) allowing to generate ER views, HTML, PDF docs, to reverse existing database can also generate scripts for several targets (oracle, mysql, pg, etc) Nicolas Ribot ___ postgis-users mailing list postgis-users@

Re: [postgis-users] How install postgis 1.2.1 with PostgreSQL 7.3.7 ?

2009-07-15 Thread Mark Cave-Ayland
juapab...@tutopia.com wrote: Good day I would appreciate some guidance to install poistgis with postgreSQL7.3.7, I generate an error when configuring . / configure - with-psql = yes or. / configure - with-pgsql = / usr / local / pgsql / include configure and modify or edit PGCONFIG =

Re: [postgis-users] postgis newbie install

2009-07-15 Thread Mark Cave-Ayland
Michael Savarese wrote: PostgreSQL PostGIS newbie here. On windows XP box, I've installed postgresql 8.3.7 as server and followed with postgis 1.3.6 with application stack builder. didn't get any errors after several attempts. When using postgis manager plugin on QGIS version 1.0.2 Kore, it sa

Re: [postgis-users] Memory usage optimized for postgresql/postgis

2009-07-15 Thread Mark Cave-Ayland
Andreas Laggner wrote: Hello List, i have a server only running PostGIS with 32GB RAM (no other applications), but linux is swapping when i start more queries and has still 26GB memory cached!! In my experience PostGIS becomes very slow if linux swaps - so i put the maximum of RAM into the PC.

Re: [postgis-users] postgis newbie install

2009-07-15 Thread Sachin Srivastava
On 07/14/2009 08:42 PM, Michael Savarese wrote: PostgreSQL PostGIS newbie here. On windows XP box, I've installed postgresql 8.3.7 as server and followed with postgis 1.3.6 with application stack builder. didn't get any errors after several attempts. When using postgis manager plugin on QGIS ve

Re: [postgis-users] KML Export

2009-07-15 Thread Stefan Schwarzer
Ah, thanks a lot! That sounds great! However, when inserting the function and executing this: SELECT askml('my_title', 'description', collect(the_geom)) FROM (SELECT c.the_geom FROM countries_view AS c) AS foo I get this error: ERROR: geometry_to_kml: 'GeometryCollection' geometry type no