Re: [postgis-users] AddGeometryColumn fails in PostGIS 2.0
On Thu, Jul 19, 2012 at 06:01:33PM +0100, Paul Michell wrote: > Hello all, > > We have a PostGIS 2.0 system that was upgraded from 1.5 and now > AddGeometryColumn fails when we call it from the SQL window of PGAdmin > with the following error: > > ERROR: function addgeometrycolumn(unknown, unknown, unknown, unknown, > unknown, integer) is not unique > LINE 3: SELECT AddGeometryColumn('','TestTable','geom','27700','MULT... >^ I suspect you didn't upgrade properly. Did you follow the "hard upgrade" instructions in the PostGIS manual ? Try running postgis_upgrade_minor_20.sql and see if it fixes your issue. --strk; ,--o-. | __/ |Delivering high quality PostGIS 2.1 | / 2.1 |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] AddGeometryColumn fails in PostGIS 2.0
Hello all, We have a PostGIS 2.0 system that was upgraded from 1.5 and now AddGeometryColumn fails when we call it from the SQL window of PGAdmin with the following error: ERROR: function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) is not unique LINE 3: SELECT AddGeometryColumn('','TestTable','geom','27700','MULT... ^ This sample query causes this error: CREATE TABLE "TestTable" (gid serial, "name" varchar(50)); ALTER TABLE "TestTable" ADD PRIMARY KEY (gid); SELECT AddGeometryColumn('','TestTable','geom','27700','MULTIPOLYGON',2); Thanks, Paul -- Paul Michell MSc BA MBCS Michell Computing ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn
Vittoriano, Try it without the empty '' for the schema (or specify the schema - probably 'public'), and the SRID should be an integer. SELECT AddGeometryColumn('particelle','the_geom',3003,'MULTIPOLYGON',2); might work. (Assuming that you have loaded the postgis.sql functions into your database first?) cheers Ben On 26/05/2011, at 4:37 PM, vittoriano.aure...@libero.it wrote: > PostgreSQL 9.0 > PostGIS 1.5 > > > what is my problem? > > > SET CLIENT_ENCODING TO UTF8; > SET STANDARD_CONFORMING_STRINGS TO ON; > BEGIN; > CREATE TABLE "particelle" (gid serial PRIMARY KEY, > "comune" varchar(4), > "sezione" varchar(1), > "foglio" varchar(4), > "allegato" varchar(1), > "sviluppo" varchar(1), > "numero" varchar(9), > "livello" varchar(11)); > SELECT AddGeometryColumn('','particelle','the_geom','3003','MULTIPOLYGON',2); > > > > NOTICE: CREATE TABLE will create implicit sequence "particelle_gid_seq" for > serial column "particelle.gid" > NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index > "particelle_pkey" for table "particelle" > ERROR: function addgeometrycolumn(unknown, unknown, unknown, unknown, > unknown, integer) does not exist > LINE 12: SELECT AddGeometryColumn('','particelle','the_geom','3003','... >^ > HINT: No function matches the given name and argument types. You might need > to add explicit type casts. > > ** Error ** > > ERROR: function addgeometrycolumn(unknown, unknown, unknown, unknown, > unknown, > integer) does not exist > SQL state: 42883 > Hint: No function matches the given name and argument types. You might need > to > add explicit type casts. > Character: 289 > > > best regards > > > Vittoriano Aurelio > ___ > 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] AddGeometryColumn
On Thu, May 26, 2011 at 10:37:49AM +0200, vittoriano.aure...@libero.it wrote: > PostgreSQL 9.0 > PostGIS 1.5 > > what is my problem? > LINE 12: SELECT AddGeometryColumn('','particelle','the_geom','3003','... > ^ The function was renamed to ST_AddGeometryColumn. You can get the old name using the postgis/legacy.sql but you'd better change the script to use the new syntax. --strk; () Free GIS & Flash consultant/developer /\ http://strk.keybit.net/services.html ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] AddGeometryColumn
PostgreSQL 9.0 PostGIS 1.5 what is my problem? SET CLIENT_ENCODING TO UTF8; SET STANDARD_CONFORMING_STRINGS TO ON; BEGIN; CREATE TABLE "particelle" (gid serial PRIMARY KEY, "comune" varchar(4), "sezione" varchar(1), "foglio" varchar(4), "allegato" varchar(1), "sviluppo" varchar(1), "numero" varchar(9), "livello" varchar(11)); SELECT AddGeometryColumn('','particelle','the_geom','3003','MULTIPOLYGON',2); NOTICE: CREATE TABLE will create implicit sequence "particelle_gid_seq" for serial column "particelle.gid" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "particelle_pkey" for table "particelle" ERROR: function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist LINE 12: SELECT AddGeometryColumn('','particelle','the_geom','3003','... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. ** Error ** ERROR: function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You might need to add explicit type casts. Character: 289 best regards Vittoriano Aurelio ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn BOX3D
Hi Jan, Here is a wrapper function to directly pass the double precision values to minimize any precision error due to text conversion: CREATE OR REPLACE FUNCTION ST_MakeBox3D(minx double precision, miny double precision, minz double precision, maxx double precision, maxy double precision, maxz double precision) RETURNS box3d AS 'SELECT ST_MakeBox3D(ST_MakePoint($1, $2, $3), ST_MakePoint($4, $5, $6))' LANGUAGE 'sql' IMMUTABLE STRICT COST 10; -- E.g. a cube: SELECT ST_MakeBox3D(3421250, 5968415, -22.96, 3427355, 5971725, -15.15); or from Python or other environment with parameter support, this will look more like: SELECT ST_MakeBox3D($1, $2, $3, $4, $5, $6); using all six inputs of double precision. -Mike On 19 October 2010 05:48, Jan Saalbach wrote: > will I lose data/precision if I save the box3ds as text first and once they > are all in the column cast them to box3d? That operation would be purely > inside the database and should work. should it? > > Regards > Jan > > ___ > 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] AddGeometryColumn BOX3D
will I lose data/precision if I save the box3ds as text first and once they are all in the column cast them to box3d? That operation would be purely inside the database and should work. should it? Regards Jan ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn BOX3D
Thank you Mike, you were absolutely right. Now I am running into yet another problem with the box3d objects. This command works fine: INSERT INTO metadaten(box) VALUES('BOX3D(3435970 5962930 -16.45,3439110 5967300 -3.28)'::BOX3D) WHERE id=111; When I try to do the same thing from within a python-script I get a "no binary input-function available for type box3d" error. The original error message is below this text, I took the liberty of translating it into english. I do not know whether it is the python-postgresql connector or a database issue. To me it looks like the python connector can not handle the box3d data-type. DRIVER: postgresql.driver.pq3.Driver http://pypi.python.org/pypi/py-postgresql/1.0.1 What I need to do is compute the box3d for about 150 datasets (point3d) and save the boxes in a metadata table for fast access for later. Any ideas how I could avoid doing this manually? It is just 2 commands, the "get box" and the "save box" command but over and over again... Regards Jan postgresql.exceptions.UndefinedFunctionError: keine binäre Eingabefunktion verfügbar für Typ box3d CODE: 42883 LOCATION: File 'lsyscache.c', line 2353, in getTypeBinaryInputInfo from SERVER RESULT: type: SingleXactCopy parameters: ('BOX3D(3421250 5968415 -22.96,3427355 5971725 -15.15)', 1) STATEMENT: [prepared] sql_parameter_types: ['public.box3d', 'INTEGER'] statement_id: py:0xb6eed3ac string: Update metadaten SET box=$1::BOX3D WHERE id=$2 CONNECTION: [closed] On 18.10.2010 17:14, Mike Toews wrote: Hi Jan, box3d is not a geometry, but it is it's very own type (along with box2d). If you have pgAdminIII, you can browse these types (you may need to enable visibility of "types" in the options), or if you use psql then the command "\dT" will show all types. Since it isn't a geometry, you can directly create it, e.g.: create table foo( id serial primary key, box box3d ); insert into foo(box) values('BOX3D(0 0 0, 10 10 10)'::box3d); -Mike ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn BOX3D
Hi Jan, box3d is not a geometry, but it is it's very own type (along with box2d). If you have pgAdminIII, you can browse these types (you may need to enable visibility of "types" in the options), or if you use psql then the command "\dT" will show all types. Since it isn't a geometry, you can directly create it, e.g.: create table foo( id serial primary key, box box3d ); insert into foo(box) values('BOX3D(0 0 0, 10 10 10)'::box3d); -Mike On 18 October 2010 02:34, Jan Saalbach wrote: > Hi all, > what is the geometry type to chose when storing BOX3D type geometries? Of > what type does the column need to be? I mean how do I phrase this correctly? > > --- > postgisdb=# SELECT AddGeometryColumn('boxes','box3d',31467,'BOX',3); > > FEHLER: Invalid type name - valid ones are: >POINT, MULTIPOINT, >LINESTRING, MULTILINESTRING, >POLYGON, MULTIPOLYGON, >CIRCULARSTRING, COMPOUNDCURVE, MULTICURVE, >CURVEPOLYGON, MULTISURFACE, >GEOMETRY, GEOMETRYCOLLECTION, >POINTM, MULTIPOINTM, >LINESTRINGM, MULTILINESTRINGM, >POLYGONM, MULTIPOLYGONM, >CIRCULARSTRINGM, COMPOUNDCURVEM, MULTICURVEM >CURVEPOLYGONM, MULTISURFACEM, >or GEOMETRYCOLLECTIONM > --- > > The reason I need to do this is I would like to use the &&-operator on 2 > boxes. And comparing the boxes from point3d-sets directly gives me a "not > enough memory error". > > Regards, > Jan > ___ > 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] AddGeometryColumn BOX3D
Hi all, what is the geometry type to chose when storing BOX3D type geometries? Of what type does the column need to be? I mean how do I phrase this correctly? --- postgisdb=# SELECT AddGeometryColumn('boxes','box3d',31467,'BOX',3); FEHLER: Invalid type name - valid ones are: POINT, MULTIPOINT, LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, CIRCULARSTRING, COMPOUNDCURVE, MULTICURVE, CURVEPOLYGON, MULTISURFACE, GEOMETRY, GEOMETRYCOLLECTION, POINTM, MULTIPOINTM, LINESTRINGM, MULTILINESTRINGM, POLYGONM, MULTIPOLYGONM, CIRCULARSTRINGM, COMPOUNDCURVEM, MULTICURVEM CURVEPOLYGONM, MULTISURFACEM, or GEOMETRYCOLLECTIONM --- The reason I need to do this is I would like to use the &&-operator on 2 boxes. And comparing the boxes from point3d-sets directly gives me a "not enough memory error". Regards, Jan ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn failing in SQL Script
Thanks that worked :) Should of spotted that, thanks. -Original Message- From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Arnaud Lesauvage Sent: 01 July 2010 13:37 To: postgis-users@postgis.refractions.net Subject: Re: [postgis-users] AddGeometryColumn failing in SQL Script Le 1/07/2010 14:23, Steve Davies a écrit : > I've been having lots of problems with AddGeometryColumn function not > working, firstly it wouldn't recognise the correct number of parameters, > I got around this by putting in all the optional parameters and > prefixing the function with public. However now it doesn't recognise the > geometry data type - however if I run the same command in psql its fine > - any ideas? My first guess, knowing that adding the 'public' schema name in front of the function partially solved the problem, is that you changed your search path and didi not include the public schema in it. So I would first check that the public schema is part of the search_path, and if not add it (at the end of you search_path). Regards -- Arnaud Lesauvage ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users Incoming e-mail scanned by Altman Technologies Dotted Eyes Hanbury Court, Harris Business Park, Stoke Prior, Bromsgrove, B60 4JJ, UK Join us at our events: www.dottedeyes.com/events/index.php Sign up for support from £99 p.a.: www.dottedeyes.com/support Ready-to-use digital maps & data: www.dottedeyes.com/data For a sales enquiry email: sa...@dottedeyes.com For a software code/licence enquiry email: co...@dottedeyescom For technical support login to: http://dottedeyes.helpserve.com Dotted Eyes Ltd is registered in England and Wales, reg no 4471760. This email may contain confidential information, not to be disclosed. Contents are personal and not necessarily the views of Dotted Eyes. Emails and attachments may be monitored without notice in advance. Email has been scanned for viruses and spam by Altman Technologies Simplify. Automate. Integrate ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn failing in SQL Script
Le 1/07/2010 14:23, Steve Davies a écrit : I've been having lots of problems with AddGeometryColumn function not working, firstly it wouldn't recognise the correct number of parameters, I got around this by putting in all the optional parameters and prefixing the function with public. However now it doesn't recognise the geometry data type - however if I run the same command in psql its fine - any ideas? My first guess, knowing that adding the 'public' schema name in front of the function partially solved the problem, is that you changed your search path and didi not include the public schema in it. So I would first check that the public schema is part of the search_path, and if not add it (at the end of you search_path). Regards -- Arnaud Lesauvage ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] AddGeometryColumn failing in SQL Script
Hi, I need to create a number of spatial tables and have written a script to achieve this. I've been having lots of problems with AddGeometryColumn function not working, firstly it wouldn't recognise the correct number of parameters, I got around this by putting in all the optional parameters and prefixing the function with public. However now it doesn't recognise the geometry data type - however if I run the same command in psql its fine - any ideas? Thanks Steve _ Steve Davies Software Engineer, Development Team, Dotted Eyes Ltd Switchboard: +44(0)1527 556920 Email: steve.dav...@dottedeyes.com _ Dotted Eyes Hanbury Court, Harris Business Park, Stoke Prior, Bromsgrove, B60 4JJ, UK Join us at our events: www.dottedeyes.com/events/index.php Sign up for support from £99 p.a.: www.dottedeyes.com/support Ready-to-use digital maps & data: www.dottedeyes.com/data For a sales enquiry email: sa...@dottedeyes.com For a software code/licence enquiry email: co...@dottedeyescom For technical support login to: http://dottedeyes.helpserve.com Dotted Eyes Ltd is registered in England and Wales, reg no 4471760. This email may contain confidential information, not to be disclosed. Contents are personal and not necessarily the views of Dotted Eyes. Emails and attachments may be monitored without notice in advance. Email has been scanned for viruses and spam by Altman Technologies Simplify. Automate. Integrate ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn and Create Type
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 softwares and edit these geometries in an error free way. Well you should create your type in a normal way, but it will be impossible (i'm not 100% sure, just 95%) to use GIS software to edit geometries. You will need to use another way to acess your geometries and insert/edit them. If the type is for other purposes, i guess you should be fine. I'll let others more experienced to give their toughts. George -- George R. C. Silva Desenvolvimento em GIS www.sextantegeo2.blogspot.com ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] AddGeometryColumn and Create Type
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-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryCOlumn error on View
Fred thanks for help Fred Lehodey wrote: you can try: 1) CREATE SEQUENCE my_seq START 1 2) CREATE VIEW my_view AS SELECT nextval('my_seq'), otherfield, ... FROM mytable1, mytable2 it worked :) CREATE SEQUENCE final_sps_elevation_seq START 1; CREATE OR REPLACE VIEW "final_sps_elevation" ( id, geom_field, elevation) AS SELECT nextval('final_sps_elevation_seq') AS id, geom_field, elevation FROM final_sps_s UNION ALL SELECT nextval('final_sps_elevation_seq') AS id, geom_field,elevation FROM final_sps_r; But QGIS still complains :( The view 'public.final_sps_elevation' has no column suitable for use as a unique key. Qgis requires that the view has a column that can be used as a unique key. Such a column should be derived from a table column of type int4 and be a primary key, have a unique constraint on it, or be a PostgreSQL oid column. To improve performance the column should also be indexed. The view you selected has the following columns, none of which satisfy the above conditions: 'elevation' derives from 'public.final_sps_r.elevation' and is not suitable (type is float4 and does not have a suitable constraint) 'geom_field' derives from 'public.final_sps_r.geom_field' and is not suitable (type is geometry and does not have a suitable constraint) I tried to create INDEX on VIEW but this failed. I wonder if there is any other way to create VIEW so it can be visible in QGIS. It is just academic as I'm using mainly Manifold. Regards Piotr ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryCOlumn error on View
Hi Piotr, you can try: 1) CREATE SEQUENCE my_seq START 1 2) CREATE VIEW my_view AS SELECT nextval('my_seq'), otherfield, ... FROM mytable1, mytable2 HTH, Fred 2009/5/29 Piotr Synowiec > Kevin Neufeld wrote: > >> Piotr Synowiec wrote: >> > Is there any particular reason why AddGeoemtryColumn doesn't work on >> >>> Views ? >>> >>> >> AddGeometryColumn adds a column to a table and registers the column with >> the geometry_columns. If you want to add a geometry column to your VIEW, >> alter your VIEW to select the column from an appropriate underlying table. >> > I have done it > >> >> You're right that you will have to manually add or register the view with >> geometry_columns for some applications to detect the view. >> > maybe I expressed myself not clearly. > The thing is that AddGeometryColumn function complains that View is not a > Table and it will not add geometry column to > geometry_columns table > > It works after I insert data with INSERT > > Just didn't figure it out how to add unique ID field to my VIEW. > The ID I have in my tables merged to the VIEW have repeating IDs > > Piotr > > ___ > 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] AddGeometryCOlumn error on View
Kevin Neufeld wrote: Piotr Synowiec wrote: > Is there any particular reason why AddGeoemtryColumn doesn't work on Views ? AddGeometryColumn adds a column to a table and registers the column with the geometry_columns. If you want to add a geometry column to your VIEW, alter your VIEW to select the column from an appropriate underlying table. I have done it You're right that you will have to manually add or register the view with geometry_columns for some applications to detect the view. maybe I expressed myself not clearly. The thing is that AddGeometryColumn function complains that View is not a Table and it will not add geometry column to geometry_columns table It works after I insert data with INSERT Just didn't figure it out how to add unique ID field to my VIEW. The ID I have in my tables merged to the VIEW have repeating IDs Piotr ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryCOlumn error on View
Piotr Synowiec wrote: > Is there any particular reason why AddGeoemtryColumn doesn't work on Views ? AddGeometryColumn adds a column to a table and registers the column with the geometry_columns. If you want to add a geometry column to your VIEW, alter your VIEW to select the column from an appropriate underlying table. You're right that you will have to manually add or register the view with geometry_columns for some applications to detect the view. -- Kevin ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] AddGeometryCOlumn error on View
Hi I have view created from 2 tables to select and combine data I need. I tried to add geometry column with below command but it failed. SELECT AddGeometryColumn( 'my_view', 'geom_field', -1, 'GEOMETRY',2); Instead I used INSERT INTO geometry_columns (f_table_catalog,f_table_schema,f_table_name,f_geometry_column,coord_dimension,srid,type) VALUES ('','public','my_view','geom_field',2,-1,'GEOMETRY') and it worked, why shouldn't. I can use this view as geometry drawing in Manifold. I can't use it in QGIS, as QGIS complains that view doesn't have a unique ID column. Is there any particular reason why AddGeoemtryColumn doesn't work on Views ? Another question is how to create unique ID for a View ? Regards Piotr ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn error
Thank you very much for all. Now everything is OK. I load PostGIS functions with 'lwpostgis.sql' into my DB, and all it's OK. Now, I have created a geometric column and using geometryfromtext I have introduced all the POINTS. Thanks again... Javier Estévez > ¡Hola Javier! > > Maybe you did not create your database properly... > > from http://www.postgis.org/documentation/ > > createlang plpgsql postgres > psql -d postgres -f lwpostgis.sql > psql -d postgres -f spatial_ref_sys.sql > > the two scripts could be in a number of places on your system: if you > built postgis from source, in your build directory, or maybe in > /usr/share/postgresql/8.3/contrib, or... you might have to look around a > bit :-) > > [EMAIL PROTECTED] wrote: >> I tried one thing: >> >> I create a new table in the database including PostGIS functions. This query >> is CORRECT now: >> >> SELECT addgeometrycolumn('public','tablenew','the_geom',23030,'POINT',2) >> >> The problem right now is... How can I import the PostGIS functions into my >> DATABASE?? >> >> >>> The function is there and executing, however it is complaining that it >>> cannot find the table name in the public schema. >>> >>> What was your original table create statement for the "estac_aemet" >>> table? "CREATE TABLE public.estac_aemet (field type, etc... " >>> Did you use special accent characters in its creation? >>> >>> >>> >>>> -Original Message- >>>> From: [EMAIL PROTECTED] >>>> [mailto:[EMAIL PROTECTED] On >>>> Behalf Of [EMAIL PROTECTED] >>>> Sent: Wednesday, August 27, 2008 8:13 AM >>>> To: PostGIS Users Discussion >>>> Cc: PostGIS Users Discussion >>>> Subject: Re: [postgis-users] AddGeometryColumn error >>>> >>>> >>>> Correctly, I have 3 databases: postgres (This my DB), >>>> demo_postgis and template_postgis >>>> >>>> In my DB there is no FUNCTIONS >>>> In template_postgis there are all the POSTGIS functions. >>>> >>>> Can I import from 'my DB' all PostGIS functions that are in other DB >>>> (template_postgis) >>>> >>>> Thanks. >>>> >>>> >>>>> Hi, >>>>> >>>>> maybe your instalation of postgis functions and etc are not in >>>>> postgres db. If you are using windwos search for others databases, >>>>> maybe a postgis or postgis_template. At that databases you >>>>> >>>> will find >>>> >>>>> the the functions. >>>>> >>>>> If you are using linux then you will have to add that functions to >>>>> some database, see the docs for a how-to. >>>>> >>>>> A good policy is to create a new database using a template with the >>>>> postgis stuff. Leave the postgres db for maintenance. >>>>> >>>>> Best regards, >>>>> >>>>> 2008/8/27 <[EMAIL PROTECTED]> >>>>> >>>>> >>>>>> No, is correct like 'estac_aemet' >>>>>> >>>>>> How do I know if my POSTGIS functions are installed ok? >>>>>> >>>>>> In my DB called 'postgres' I have no Functions. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>>> Yes, the tabla estac_aemet exists. The schema is public >>>>>>>> >>>>>>>> >>>>>>> Did you create the table using double quotes to name it ? >>>>>>> "ESTAC_AEMET" >>>>>>> >>>>>> maybe >>>>>> >>>>>>> ? >>>>>>> If so, then you have to respect the case in the table name when >>>>>>> naming >>>>>>> >>>>>> it: >>>>>> >>>>>>> SELECT addgeometrycolumn('public','ESTAC_AEMET', 'the_geom', >>>>>>> >>>>>> 23030,'POINT',2) >>>>>> >>>>>>> You can check the table name by launching psql and typing \d to >>>>>>> list all tables. >>>>>>> >>>>>>> >>>>&
Re: [postgis-users] AddGeometryColumn error
¡Hola Javier! Maybe you did not create your database properly... from http://www.postgis.org/documentation/ createlang plpgsql postgres psql -d postgres -f lwpostgis.sql psql -d postgres -f spatial_ref_sys.sql the two scripts could be in a number of places on your system: if you built postgis from source, in your build directory, or maybe in /usr/share/postgresql/8.3/contrib, or... you might have to look around a bit :-) [EMAIL PROTECTED] wrote: > I tried one thing: > > I create a new table in the database including PostGIS functions. This query > is CORRECT now: > > SELECT addgeometrycolumn('public','tablenew','the_geom',23030,'POINT',2) > > The problem right now is... How can I import the PostGIS functions into my > DATABASE?? > > >> The function is there and executing, however it is complaining that it >> cannot find the table name in the public schema. >> >> What was your original table create statement for the "estac_aemet" >> table? "CREATE TABLE public.estac_aemet (field type, etc... " >> Did you use special accent characters in its creation? >> >> >> >>> -Original Message- >>> From: [EMAIL PROTECTED] >>> [mailto:[EMAIL PROTECTED] On >>> Behalf Of [EMAIL PROTECTED] >>> Sent: Wednesday, August 27, 2008 8:13 AM >>> To: PostGIS Users Discussion >>> Cc: PostGIS Users Discussion >>> Subject: Re: [postgis-users] AddGeometryColumn error >>> >>> >>> Correctly, I have 3 databases: postgres (This my DB), >>> demo_postgis and template_postgis >>> >>> In my DB there is no FUNCTIONS >>> In template_postgis there are all the POSTGIS functions. >>> >>> Can I import from 'my DB' all PostGIS functions that are in other DB >>> (template_postgis) >>> >>> Thanks. >>> >>> >>>> Hi, >>>> >>>> maybe your instalation of postgis functions and etc are not in >>>> postgres db. If you are using windwos search for others databases, >>>> maybe a postgis or postgis_template. At that databases you >>>> >>> will find >>> >>>> the the functions. >>>> >>>> If you are using linux then you will have to add that functions to >>>> some database, see the docs for a how-to. >>>> >>>> A good policy is to create a new database using a template with the >>>> postgis stuff. Leave the postgres db for maintenance. >>>> >>>> Best regards, >>>> >>>> 2008/8/27 <[EMAIL PROTECTED]> >>>> >>>> >>>>> No, is correct like 'estac_aemet' >>>>> >>>>> How do I know if my POSTGIS functions are installed ok? >>>>> >>>>> In my DB called 'postgres' I have no Functions. >>>>> >>>>> >>>>> >>>>> >>>>>>> Yes, the tabla estac_aemet exists. The schema is public >>>>>>> >>>>>>> >>>>>> Did you create the table using double quotes to name it ? >>>>>> "ESTAC_AEMET" >>>>>> >>>>> maybe >>>>> >>>>>> ? >>>>>> If so, then you have to respect the case in the table name when >>>>>> naming >>>>>> >>>>> it: >>>>> >>>>>> SELECT addgeometrycolumn('public','ESTAC_AEMET', 'the_geom', >>>>>> >>>>> 23030,'POINT',2) >>>>> >>>>>> You can check the table name by launching psql and typing \d to >>>>>> list all tables. >>>>>> >>>>>> >>>>>> Nicolas >>>>>> ___ >>>>>> 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 >>>>> >>>>> >>>> >>>> -- >>>> Luigi Castro Cardeles >>>> >>> ___ >>> >>>> 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 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 > -- Regards, Chris Hermansen mailto:[EMAIL PROTECTED] tel+1.604.714.2878 · fax+1.604.733.0631 · mob+1.778.232.0644 Timberline Natural Resource Group · http://www.timberline.ca 401 · 958 West 8th Avenue · Vancouver BC · Canada · V5Z 1E5 ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
RE: [postgis-users] AddGeometryColumn error
The easiest way is to create your database using the template_postgis as the template database. The "after the fact" way is to execute the SQL script located at \Program Files\PostgreSQL\8.3\share\contrib\lwpostgis.sql (For windows installations) > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Wednesday, August 27, 2008 10:23 AM > To: PostGIS Users Discussion > Cc: PostGIS Users Discussion > Subject: RE: [postgis-users] AddGeometryColumn error > > > I tried one thing: > > I create a new table in the database including PostGIS > functions. This query is CORRECT now: > > SELECT > addgeometrycolumn('public','tablenew','the_geom',23030,'POINT',2) > > The problem right now is... How can I import the PostGIS > functions into my DATABASE?? > > > The function is there and executing, however it is > complaining that it > > cannot find the table name in the public schema. > > > > What was your original table create statement for the "estac_aemet" > > table? "CREATE TABLE public.estac_aemet (field type, etc... > " Did you > > use special accent characters in its creation? > > > > > >> -Original Message- > >> From: [EMAIL PROTECTED] > >> [mailto:[EMAIL PROTECTED] On > Behalf Of > >> [EMAIL PROTECTED] > >> Sent: Wednesday, August 27, 2008 8:13 AM > >> To: PostGIS Users Discussion > >> Cc: PostGIS Users Discussion > >> Subject: Re: [postgis-users] AddGeometryColumn error > >> > >> > >> Correctly, I have 3 databases: postgres (This my DB), demo_postgis > >> and template_postgis > >> > >> In my DB there is no FUNCTIONS > >> In template_postgis there are all the POSTGIS functions. > >> > >> Can I import from 'my DB' all PostGIS functions that are > in other DB > >> (template_postgis) > >> > >> Thanks. > >> > >> > Hi, > >> > > >> > maybe your instalation of postgis functions and etc are not in > >> > postgres db. If you are using windwos search for others > databases, > >> > maybe a postgis or postgis_template. At that databases you > >> will find > >> > the the functions. > >> > > >> > If you are using linux then you will have to add that > functions to > >> > some database, see the docs for a how-to. > >> > > >> > A good policy is to create a new database using a > template with the > >> > postgis stuff. Leave the postgres db for maintenance. > >> > > >> > Best regards, > >> > > >> > 2008/8/27 <[EMAIL PROTECTED]> > >> > > >> >> No, is correct like 'estac_aemet' > >> >> > >> >> How do I know if my POSTGIS functions are installed ok? > >> >> > >> >> In my DB called 'postgres' I have no Functions. > >> >> > >> >> > >> >> > >> >> >> Yes, the tabla estac_aemet exists. The schema is public > >> >> >> > >> >> > > >> >> > Did you create the table using double quotes to name it ? > >> >> > "ESTAC_AEMET" > >> >> maybe > >> >> > ? > >> >> > If so, then you have to respect the case in the table > name when > >> >> > naming > >> >> it: > >> >> > > >> >> > SELECT addgeometrycolumn('public','ESTAC_AEMET', 'the_geom', > >> >> 23030,'POINT',2) > >> >> > > >> >> > You can check the table name by launching psql and > typing \d to > >> >> > list all tables. > >> >> > > >> >> > > >> >> > Nicolas > >> >> > ___ > >> >> > 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 > >> >> > >> > > >> > > >> > > >> > -- > >> > Luigi Castro Cardeles > >> ___ > >> > 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 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 mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
RE: [postgis-users] AddGeometryColumn error
I tried one thing: I create a new table in the database including PostGIS functions. This query is CORRECT now: SELECT addgeometrycolumn('public','tablenew','the_geom',23030,'POINT',2) The problem right now is... How can I import the PostGIS functions into my DATABASE?? > The function is there and executing, however it is complaining that it > cannot find the table name in the public schema. > > What was your original table create statement for the "estac_aemet" > table? "CREATE TABLE public.estac_aemet (field type, etc... " > Did you use special accent characters in its creation? > > >> -Original Message- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On >> Behalf Of [EMAIL PROTECTED] >> Sent: Wednesday, August 27, 2008 8:13 AM >> To: PostGIS Users Discussion >> Cc: PostGIS Users Discussion >> Subject: Re: [postgis-users] AddGeometryColumn error >> >> >> Correctly, I have 3 databases: postgres (This my DB), >> demo_postgis and template_postgis >> >> In my DB there is no FUNCTIONS >> In template_postgis there are all the POSTGIS functions. >> >> Can I import from 'my DB' all PostGIS functions that are in other DB >> (template_postgis) >> >> Thanks. >> >> > Hi, >> > >> > maybe your instalation of postgis functions and etc are not in >> > postgres db. If you are using windwos search for others databases, >> > maybe a postgis or postgis_template. At that databases you >> will find >> > the the functions. >> > >> > If you are using linux then you will have to add that functions to >> > some database, see the docs for a how-to. >> > >> > A good policy is to create a new database using a template with the >> > postgis stuff. Leave the postgres db for maintenance. >> > >> > Best regards, >> > >> > 2008/8/27 <[EMAIL PROTECTED]> >> > >> >> No, is correct like 'estac_aemet' >> >> >> >> How do I know if my POSTGIS functions are installed ok? >> >> >> >> In my DB called 'postgres' I have no Functions. >> >> >> >> >> >> >> >> >> Yes, the tabla estac_aemet exists. The schema is public >> >> >> >> >> > >> >> > Did you create the table using double quotes to name it ? >> >> > "ESTAC_AEMET" >> >> maybe >> >> > ? >> >> > If so, then you have to respect the case in the table name when >> >> > naming >> >> it: >> >> > >> >> > SELECT addgeometrycolumn('public','ESTAC_AEMET', 'the_geom', >> >> 23030,'POINT',2) >> >> > >> >> > You can check the table name by launching psql and typing \d to >> >> > list all tables. >> >> > >> >> > >> >> > Nicolas >> >> > ___ >> >> > 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 >> >> >> > >> > >> > >> > -- >> > Luigi Castro Cardeles >> ___ >> > 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 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] AddGeometryColumn error
The function is there and executing, however it is complaining that it cannot find the table name in the public schema. What was your original table create statement for the "estac_aemet" table? "CREATE TABLE public.estac_aemet (field type, etc... " Did you use special accent characters in its creation? > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Wednesday, August 27, 2008 8:13 AM > To: PostGIS Users Discussion > Cc: PostGIS Users Discussion > Subject: Re: [postgis-users] AddGeometryColumn error > > > Correctly, I have 3 databases: postgres (This my DB), > demo_postgis and template_postgis > > In my DB there is no FUNCTIONS > In template_postgis there are all the POSTGIS functions. > > Can I import from 'my DB' all PostGIS functions that are in other DB > (template_postgis) > > Thanks. > > > Hi, > > > > maybe your instalation of postgis functions and etc are not in > > postgres db. If you are using windwos search for others databases, > > maybe a postgis or postgis_template. At that databases you > will find > > the the functions. > > > > If you are using linux then you will have to add that functions to > > some database, see the docs for a how-to. > > > > A good policy is to create a new database using a template with the > > postgis stuff. Leave the postgres db for maintenance. > > > > Best regards, > > > > 2008/8/27 <[EMAIL PROTECTED]> > > > >> No, is correct like 'estac_aemet' > >> > >> How do I know if my POSTGIS functions are installed ok? > >> > >> In my DB called 'postgres' I have no Functions. > >> > >> > >> > >> >> Yes, the tabla estac_aemet exists. The schema is public > >> >> > >> > > >> > Did you create the table using double quotes to name it ? > >> > "ESTAC_AEMET" > >> maybe > >> > ? > >> > If so, then you have to respect the case in the table name when > >> > naming > >> it: > >> > > >> > SELECT addgeometrycolumn('public','ESTAC_AEMET', 'the_geom', > >> 23030,'POINT',2) > >> > > >> > You can check the table name by launching psql and typing \d to > >> > list all tables. > >> > > >> > > >> > Nicolas > >> > ___ > >> > 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 > >> > > > > > > > > -- > > Luigi Castro Cardeles > ___ > > 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 mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn error
Correctly, I have 3 databases: postgres (This my DB), demo_postgis and template_postgis In my DB there is no FUNCTIONS In template_postgis there are all the POSTGIS functions. Can I import from 'my DB' all PostGIS functions that are in other DB (template_postgis) Thanks. > Hi, > > maybe your instalation of postgis functions and etc are not in postgres db. > If you are using windwos search for others databases, maybe a postgis or > postgis_template. At that databases you will find the the functions. > > If you are using linux then you will have to add that functions to some > database, see the docs for a how-to. > > A good policy is to create a new database using a template with the postgis > stuff. Leave the postgres db for maintenance. > > Best regards, > > 2008/8/27 <[EMAIL PROTECTED]> > >> No, is correct like 'estac_aemet' >> >> How do I know if my POSTGIS functions are installed ok? >> >> In my DB called 'postgres' I have no Functions. >> >> >> >> >> Yes, the tabla estac_aemet exists. The schema is public >> >> >> > >> > Did you create the table using double quotes to name it ? "ESTAC_AEMET" >> maybe >> > ? >> > If so, then you have to respect the case in the table name when naming >> it: >> > >> > SELECT addgeometrycolumn('public','ESTAC_AEMET', 'the_geom', >> 23030,'POINT',2) >> > >> > You can check the table name by launching psql and typing \d to list all >> > tables. >> > >> > >> > Nicolas >> > ___ >> > 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 >> > > > > -- > Luigi Castro Cardeles > ___ > 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] AddGeometryColumn error
Hi, maybe your instalation of postgis functions and etc are not in postgres db. If you are using windwos search for others databases, maybe a postgis or postgis_template. At that databases you will find the the functions. If you are using linux then you will have to add that functions to some database, see the docs for a how-to. A good policy is to create a new database using a template with the postgis stuff. Leave the postgres db for maintenance. Best regards, 2008/8/27 <[EMAIL PROTECTED]> > No, is correct like 'estac_aemet' > > How do I know if my POSTGIS functions are installed ok? > > In my DB called 'postgres' I have no Functions. > > > > >> Yes, the tabla estac_aemet exists. The schema is public > >> > > > > Did you create the table using double quotes to name it ? "ESTAC_AEMET" > maybe > > ? > > If so, then you have to respect the case in the table name when naming > it: > > > > SELECT addgeometrycolumn('public','ESTAC_AEMET', 'the_geom', > 23030,'POINT',2) > > > > You can check the table name by launching psql and typing \d to list all > > tables. > > > > > > Nicolas > > ___ > > 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 > -- Luigi Castro Cardeles ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn error
No, is correct like 'estac_aemet' How do I know if my POSTGIS functions are installed ok? In my DB called 'postgres' I have no Functions. >> Yes, the tabla estac_aemet exists. The schema is public >> > > Did you create the table using double quotes to name it ? "ESTAC_AEMET" maybe > ? > If so, then you have to respect the case in the table name when naming it: > > SELECT addgeometrycolumn('public','ESTAC_AEMET', 'the_geom', 23030,'POINT',2) > > You can check the table name by launching psql and typing \d to list all > tables. > > > Nicolas > ___ > 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] AddGeometryColumn error
> Yes, the tabla estac_aemet exists. The schema is public > Did you create the table using double quotes to name it ? "ESTAC_AEMET" maybe ? If so, then you have to respect the case in the table name when naming it: SELECT addgeometrycolumn('public','ESTAC_AEMET', 'the_geom', 23030,'POINT',2) You can check the table name by launching psql and typing \d to list all tables. Nicolas ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn error
Yes, the tabla estac_aemet exists. The schema is public >> Now, with you purpose, this error: >> >> >> ERROR: no existe la relación «public.estac_aemet» > > Is the estac_aemet table exists ? If so, in which schema was it created ? > ___ > 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] AddGeometryColumn error
> Now, with you purpose, this error: > > > ERROR: no existe la relación «public.estac_aemet» Is the estac_aemet table exists ? If so, in which schema was it created ? ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn error
Now, with you purpose, this error: ERROR: no existe la relación «public.estac_aemet» CONTEXTO: sentencia SQL: «ALTER TABLE public.estac_aemet ADD COLUMN the_geom geometry » PL/pgSQL function "addgeometrycolumn" line 90 at EXECUTE statement sentencia SQL: «SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 , $6 )» PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement >> First of all, Postgres display me the next error with this query: >> >> My database is named postgres >> My table is named estac_aemet >> The name of the new column I want to create is the_geom >> 23030 is UTM-ED50 huso 30 (Proyection I want) >> >> SELECT addgeometrycolumn('postgres','estac_aemet', 'the_geom', >> 23030,'POINT',2) >> > > the first parameter is expected to be the schema name (default > 'public' schema in your case, probably). > command should be: > > SELECT addgeometrycolumn('public','estac_aemet', 'the_geom', 23030,'POINT',2) > > nicolas > ___ > 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] AddGeometryColumn error
> First of all, Postgres display me the next error with this query: > > My database is named postgres > My table is named estac_aemet > The name of the new column I want to create is the_geom > 23030 is UTM-ED50 huso 30 (Proyection I want) > > SELECT addgeometrycolumn('postgres','estac_aemet', 'the_geom', > 23030,'POINT',2) > the first parameter is expected to be the schema name (default 'public' schema in your case, probably). command should be: SELECT addgeometrycolumn('public','estac_aemet', 'the_geom', 23030,'POINT',2) nicolas ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn error
First of all, Postgres display me the next error with this query: My database is named postgres My table is named estac_aemet The name of the new column I want to create is the_geom 23030 is UTM-ED50 huso 30 (Proyection I want) SELECT addgeometrycolumn('postgres','estac_aemet', 'the_geom', 23030,'POINT',2) NOTICE: Invalid schema name - using current_schema() CONTEXTO: sentencia SQL: «SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 , $6 )» PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement ERROR: no existe la relación «public.estac_aemet» CONTEXTO: sentencia SQL: «ALTER TABLE public.estac_aemet ADD COLUMN the_geom geometry » PL/pgSQL function "addgeometrycolumn" line 90 at EXECUTE statement sentencia SQL: «SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 , $6 )» PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement >> Hi everyone! >> >> I have installed PostgreSQL 8.3 and PostGIS (postgis_1_3_3_pg83). I have a >> table with many stations in Southern Spain (POINT) and their coordinates >> LATITUDE, LONGITUDE and ELEVATION. >> >> How can I create a geometry column? I try with AddGeometryColumn but I >> couldn't. >> > > Hi, > > What is the error message ? > How did you create the table ? > > AddgeometryColumn will add an extra column to your table (and register > it into the metadata) but will not populate it. > You will need to update your table, building the Points from the LAT, > LON, ELEVATION columns (something like -: > update set the_geom = set_srid(st_makePoint(longitude, > latitude, elevation), ); > > Nicolas > ___ > 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] AddGeometryColumn error
> Hi everyone! > > I have installed PostgreSQL 8.3 and PostGIS (postgis_1_3_3_pg83). I have a > table with many stations in Southern Spain (POINT) and their coordinates > LATITUDE, LONGITUDE and ELEVATION. > > How can I create a geometry column? I try with AddGeometryColumn but I > couldn't. > Hi, What is the error message ? How did you create the table ? AddgeometryColumn will add an extra column to your table (and register it into the metadata) but will not populate it. You will need to update your table, building the Points from the LAT, LON, ELEVATION columns (something like -: update set the_geom = set_srid(st_makePoint(longitude, latitude, elevation), ); Nicolas ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] AddGeometryColumn error
Hi everyone! I have installed PostgreSQL 8.3 and PostGIS (postgis_1_3_3_pg83). I have a table with many stations in Southern Spain (POINT) and their coordinates LATITUDE, LONGITUDE and ELEVATION. How can I create a geometry column? I try with AddGeometryColumn but I couldn't. Thanks. Javier EstirpE www.estirpe.net ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
RE: [postgis-users] Addgeometrycolumn() for already created columns
Webb, Well actually when you do the below iyour centroid(the_geom) would be created as a geometry field I think. What AddGeometryColumn would do for you in addition to creating the geometry field would be to add a record to the geometry_columns table and also add constraints to the field to insure that say only points would go in this field and they are of a particular SRID. I think there was some talk of in later versions making geometry_columns a view or alternatively putting in a trigger at the creation of any field that would automagically put in entries in geometry_columns. I think making these work in a fairly reliable and speedy way will be tricky. Hope that helps, Regina -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Webb Sprague Sent: Saturday, September 01, 2007 2:02 PM To: PostGIS Users Discussion Subject: [postgis-users] Addgeometrycolumn() for already created columns Is there any plans to write a function to add a geometry column after it has been created, say with a "create table as select centroid(the_geom) from foo" ? Is there a reason why not? Is this a silly or redundant question? Tx -W ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users - The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] Addgeometrycolumn() for already created columns
Is there any plans to write a function to add a geometry column after it has been created, say with a "create table as select centroid(the_geom) from foo" ? Is there a reason why not? Is this a silly or redundant question? Tx -W ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] AddGeometryColumn does not exist
Dear Regina, I tried the second solution and now it works perfectly! I found your guide really useful. Thank you very much for your help, -Elena On 8/3/07, Obe, Regina <[EMAIL PROTECTED]> wrote: > > It sounds like you probably don't have the postgis functions installed in > the database you are working with. You have one of 2 ways of doing this. > > 1) If you haven't done much, you can simply drop your current database, > and create a new database using the template_postgis database template. > > 2) If you have stuff already run the following file in your current db > that should be located in your > Program Files\PostgreSQL\8.2\share\contrib\lwpostgis.sql and > \share\contrib\spatial_ref_sys.sql > > The details are pretty much documented here. > http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgis_tut01 > > Sorry haven't had a chance to completely update the doc above. > > To find out which version you are running, you can run the below command > > select postgis_full_version() > > If you are running a version than 1.2.1, you might want to upgrade to the > newest using > > http://postgis.refractions.net/download/windows/ > > Hope that helps, > Regina > > > > > > > -- > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On Behalf Of *Elena > Camossi > *Sent:* Friday, August 03, 2007 5:57 AM > *To:* PostGIS Users Discussion > *Subject:* [postgis-users] AddGeometryColumn does not exist > > Hi all, > > I'm new to PostGis, and I'm making some preliminary test following the > manual. > With this command: > >select AddGeometryColumn('', 'gtest', 'geom', -1, 'LINESTRING', 2); > > I got this error: > > ERROR: function addgeometrycolumn("unknown", "unknown", "unknown", > integer, "unknown", integer) does not exist > SQL state: 42883 > Hint: No function matches the given name and argument types. You may need > to add explicit type casts. > Character: 8 > > I'm running Postgres 8.2 with PostGIS enabled on Windows XP. > > Thank you for any helping. > > Best Regards, > -Elena > > > -- > > * The substance of this message, including any attachments, may be > confidential, legally privileged and/or exempt from disclosure pursuant to > Massachusetts law. It is intended solely for the addressee. If you received > this in error, please contact the sender and delete the material from any > computer. * > > ___ > 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] AddGeometryColumn does not exist
It sounds like you probably don't have the postgis functions installed in the database you are working with. You have one of 2 ways of doing this. 1) If you haven't done much, you can simply drop your current database, and create a new database using the template_postgis database template. 2) If you have stuff already run the following file in your current db that should be located in your Program Files\PostgreSQL\8.2\share\contrib\lwpostgis.sql and \share\contrib\spatial_ref_sys.sql The details are pretty much documented here. http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgis_tut01 Sorry haven't had a chance to completely update the doc above. To find out which version you are running, you can run the below command select postgis_full_version() If you are running a version than 1.2.1, you might want to upgrade to the newest using http://postgis.refractions.net/download/windows/ Hope that helps, Regina From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Elena Camossi Sent: Friday, August 03, 2007 5:57 AM To: PostGIS Users Discussion Subject: [postgis-users] AddGeometryColumn does not exist Hi all, I'm new to PostGis, and I'm making some preliminary test following the manual. With this command: select AddGeometryColumn('', 'gtest', 'geom', -1, 'LINESTRING', 2); I got this error: ERROR: function addgeometrycolumn("unknown", "unknown", "unknown", integer, "unknown", integer) does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You may need to add explicit type casts. Character: 8 I'm running Postgres 8.2 with PostGIS enabled on Windows XP. Thank you for any helping. Best Regards, -Elena - The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer. ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] AddGeometryColumn does not exist
Hi all, I'm new to PostGis, and I'm making some preliminary test following the manual. With this command: select AddGeometryColumn('', 'gtest', 'geom', -1, 'LINESTRING', 2); I got this error: ERROR: function addgeometrycolumn("unknown", "unknown", "unknown", integer, "unknown", integer) does not exist SQL state: 42883 Hint: No function matches the given name and argument types. You may need to add explicit type casts. Character: 8 I'm running Postgres 8.2 with PostGIS enabled on Windows XP. Thank you for any helping. Best Regards, -Elena ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
RE: [postgis-users] AddGeometryColumn on VIEW?
Jan, I have always done a manual insert into the geometry_columns table. I don't know if this is "right", but it works. I have also had some versions of mapserver that want an OID column, so you may want to include that in your view if it is not already there. Robert -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jan Peters Sent: Monday, July 02, 2007 1:26 PM To: postgis-users@postgis.refractions.net Subject: [postgis-users] AddGeometryColumn on VIEW? Hello list, I just tried to load a PostGIS VIEW in mapserver (which worked already with another VIEW). Mapserver repsonded that there was no SRID information. Investigating on this I found that the geometry_columns table did not contain the information regarding this view, so I tried a SELECT AddGeometryColumn('public', 'v_iis_map_2007_07_2_18105984', 'the_geom', -1, 'POINT', 2); on my view and my client responded, that v_iis_map_2007_07_2_18105984 wasn't a table and quit with an error. The view exists, btw, I checked that with a SELECT statement. As I said, I already have information on other VIEWs in that geometry_columns table, so I was wondering how the syntax looked like, when I added the columns for those views a few month ago... Could anybody point me to the correct way of doing this? Is there maybe a way of pointing all my temporary views to one row in the geometry_columns table (from mapserver), because the structure of the views (i.e. there columns) do not change, just the rows? Thanks in advance Jan -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kanns mit allen: http://www.gmx.net/de/go/multimessenger ___ 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] AddGeometryColumn on VIEW?
Hello list, I just tried to load a PostGIS VIEW in mapserver (which worked already with another VIEW). Mapserver repsonded that there was no SRID information. Investigating on this I found that the geometry_columns table did not contain the information regarding this view, so I tried a SELECT AddGeometryColumn('public', 'v_iis_map_2007_07_2_18105984', 'the_geom', -1, 'POINT', 2); on my view and my client responded, that v_iis_map_2007_07_2_18105984 wasn't a table and quit with an error. The view exists, btw, I checked that with a SELECT statement. As I said, I already have information on other VIEWs in that geometry_columns table, so I was wondering how the syntax looked like, when I added the columns for those views a few month ago... Could anybody point me to the correct way of doing this? Is there maybe a way of pointing all my temporary views to one row in the geometry_columns table (from mapserver), because the structure of the views (i.e. there columns) do not change, just the rows? Thanks in advance Jan -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kanns mit allen: http://www.gmx.net/de/go/multimessenger ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users