[postgis-users] operator class gist_geometry_ops does not accept data type geography

2010-05-14 Thread rakesh modi
Hi All,
I am newer to use postgres.
I get an error using this query :- operator class gist_geometry_ops does
not accept data type geography

when i run query :-
CREATE INDEX geom_idx ON routable USING GIST(the_geom GIST_GEOMETRY_OPS);

What's the problem

-- 
Rakesh Modi
Software Engineer
GIS Consortium
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] operator class gist_geometry_ops does not accept data type geography

2010-05-14 Thread Nick Bower

Drop the opts from the parentheses for geog I think.



On 14/05/2010, at 5:14 PM, rakesh modi rakesh.modi1...@gmail.com  
wrote:



Hi All,
I am newer to use postgres.
I get an error using this query :- operator class  
gist_geometry_ops does not accept data type geography


when i run query :-
CREATE INDEX geom_idx ON routable USING GIST(the_geom  
GIST_GEOMETRY_OPS);


What's the problem

--
Rakesh Modi
Software Engineer
GIS Consortium

___
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] HINT: No function matches the given name and argument types

2010-05-14 Thread rakesh modi
hi,
i am using select query which is shown below
SELECT sum(length(the_geom))/1000 AS km_roads FROM routable;
and get error like -
HINT:  No function matches the given name and argument types. You might need
to add explicit type casts.

-- 
Rakesh Modi
Software Engineer
GIS Consortium
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] HINT: No function matches the given name and argument types

2010-05-14 Thread Maria Arias de Reyna
El Friday 14 May 2010, rakesh modi escribió:
 hi,
 i am using select query which is shown below
 SELECT sum(length(the_geom))/1000 AS km_roads FROM routable;
 and get error like -
 HINT:  No function matches the given name and argument types. You might
 need to add explicit type casts.

I usually prefer to use ST_length instead of length. Maybe that's the problem?


(Btw, are you sure you have postgis installed on that database?)

-- 
María Arias de Reyna Domínguez
Área de Operaciones

Emergya Consultoría 
Tfno: +34 954 51 75 77 / +34 607 43 74 27
Fax: +34 954 51 64 73 
www.emergya.es 
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] HINT: No function matches the given name and argument types

2010-05-14 Thread Emilie Laffray
On 14 May 2010 10:21, rakesh modi rakesh.modi1...@gmail.com wrote:

 hi,
 i am using select query which is shown below
 SELECT sum(length(the_geom))/1000 AS km_roads FROM routable;
 and get error like -
 HINT:  No function matches the given name and argument types. You might
 need to add explicit type casts.


what is the projection of your geometry? ST_Length returns a length in the
unit of the chosen projection. If you are working with lat, lon, you won't
have meters coming out of ST_Length.

Emilie Laffray
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] New OGR driver to write PostgreSQL dumps

2010-05-14 Thread Even Rouault
Hi all,

I just wanted to mention for those interested that a new driver has landed in 
GDAL/OGR svn trunk (target release : 1.8.0). It is called PGDump and offers 
features quite similar to the PostGIS shp2pgsql utility, that is to say the 
capability of dumping the INSERT / COPY statements into a text file without 
requiring a connexion to a PostgreSQL database instance.

See http://gdal.org/ogr/drv_pgdump.html for the documentation.

Best regards,

Even
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] how to get Point * from datum =heap_getattr(....)?

2010-05-14 Thread sunpeng
hi,i have this table:
CREATE TABLE pois(
   uid integer not null,
   name VARCHAR(128),
   catcode VARCHAR(32)  not null,
   catname VARCHAR(32),
   others VARCHAR(32)
);
SELECT AddGeometryColumn('pois', 'location', 4214, 'POINT', 2);

and then in my codes,i use this invoke to get location column in tuple:
tuple = heap_getnext(pHeapScanDesc,ForwardScanDirection);
datum = heap_getattr(tuple,6,pRawRelation-rd_att,isnull);

then on the next,how to write to get Point? is this right?
Point *p = isnull?NULL:(Point *)(PG_DETOAST_DATUM(datum));
i've tried it,but it seems not work.

thanks a lot.

peng
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users