Re: [postgis-users] Calculating Attributes

2009-04-03 Thread Aurora Geomatics
Ah the heart of all knowledge... Philosophy! On 3-Apr-09, at 10:24 AM, Paul Ramsey wrote: Philosophical point: Creating a column and filling it with a property of GEOMETRY like ST_Area() or ST_Length() is something which makes sense in a legacy GIS like Arc* or GRASS, where attributes are hand

Re: [postgis-users] Calculating Attributes

2009-04-03 Thread Paul Ramsey
Philosophical point: Creating a column and filling it with a property of GEOMETRY like ST_Area() or ST_Length() is something which makes sense in a legacy GIS like Arc* or GRASS, where attributes are handled separately from spatial. In a spatial database, where the GEOMETRY is co-equal to the othe

Re: [postgis-users] Calculating Attributes

2009-04-03 Thread George Silva
PgAdmin can do it. The terminal can do it too, but i find pgAdmin more easy to work with. Just go to the database you are working, open a query editor and try it. Dont forget about the considerations all the other made. The value returned will depend on your projection. george On Fri, Apr 3, 20

Re: [postgis-users] Calculating Attributes

2009-04-03 Thread Aurora Geomatics
Thank you George, On 3-Apr-09, at 9:22 AM, George Silva wrote: Hello Aurora, In ArcGIS it's all different. In PostGIS you can use simple/complex SQL queries to "calculate values" in a similar fashion of arcgis. The simplest of them all would be, in your case: ALTER TABLE table1 ADD COLUMN

Re: [postgis-users] Calculating Attributes

2009-04-03 Thread Luigi Castro Cardeles
Hi be careful with units. This formula returns the area using projection's units (degrees, meters, kilometers etc). If that's the case maybe convert to some metric projetion UPDATE table1 SET area_column = ST_AREA(ST_TRANSFORM(the_geom, srid-of-metric-projection)); -- this returns, normally, squa

Re: [postgis-users] Error using PostGIS and GEOM

2009-04-03 Thread Giri
HI Kevin, Sorry for this delayed response, when I tried the query, I am getting the following error: processdb=# select public.extent('POINT(0 0)'); ERROR: function public.extent("unknown") does not exist HINT: No function matches the given name and argument types.

Re: [postgis-users] Calculating Attributes

2009-04-03 Thread Stephen Woodbridge
Aurora Geomatics wrote: Hello PostGIS users, I have just installed William Kyng's PostgeSQ/PostGIS packages for Mac OS X.5 I have been playing with pgAdmin and QGIS with importing shapefiles into PostGIS. Works dandy. Now I am wondering how to solve Attribute Calculations. Years of using

Re: [postgis-users] Calculating Attributes

2009-04-03 Thread George Silva
Hello Aurora, In ArcGIS it's all different. In PostGIS you can use simple/complex SQL queries to "calculate values" in a similar fashion of arcgis. The simplest of them all would be, in your case: ALTER TABLE table1 ADD COLUMN area_column double precision; UPDATE table1 SET area_column = ST_AREA

[postgis-users] Calculating Attributes

2009-04-03 Thread Aurora Geomatics
Hello PostGIS users, I have just installed William Kyng's PostgeSQ/PostGIS packages for Mac OS X.5 I have been playing with pgAdmin and QGIS with importing shapefiles into PostGIS. Works dandy. Now I am wondering how to solve Attribute Calculations. Years of using ArcGIS and GRASS it is

Re: [postgis-users] Shp2Pgsql - how to handle carriage returns ?

2009-04-03 Thread Ivan Mincik
On Friday 03 April 2009, Stefan Schwarzer wrote: > Hi there, > > I have a shapefile I would like to import into my database, but the > shp2pgsql seems to have problems with carriage returns in the DBF: > > ERROR: literal carriage return found in data > HINT: Use "\r" to represent

[postgis-users] Shp2Pgsql - how to handle carriage returns ?

2009-04-03 Thread Stefan Schwarzer
Hi there, I have a shapefile I would like to import into my database, but the shp2pgsql seems to have problems with carriage returns in the DBF: ERROR: literal carriage return found in data HINT: Use "\r" to represent carriage return. What can I do about it? I don't see any