Vá: [postgis-users] ST_NumPoints

Kis János Tamás kijato at gmail.com
Tue May 26 05:44:05 PDT 2009


Thank you.

2009/5/25, Ben Madin <ben at remoteinformation.com.au>:
> G'day,
>
> This may be way off your problem, and in fact may not matter at all,
> but I am led to believe that :
>
> On 21/05/2009, at 4:39 PM, Kis János Tamás wrote:
>
>> I have a big table (with 21000 rows):
>>
>> CREATE TABLE kecskemet_k.foldreszletek
>> ( sorszam bigserial NOT NULL,
>>  hrsz text,
>>  geometria geometry --POLYGON
>> ) WITH (OIDS=TRUE);
>> CREATE INDEX i_foldreszletek_geometria ON kecskemet_k.foldreszletek
>> USING gist (geometria);
>
>
> 1. it is better practice to add the geometry column to the table after
> generating the table using the postgis addGeometryColumn() function.
> 2. you may be better to add a gid column than using OIDS
>
> So your table creation might end up looking like :
>
> CREATE TABLE kecskemet_k.foldreszletek
> ( gid serial unique,
>   sorszam bigserial NOT NULL,
>   hrsz text
> );
>
> SELECT
> AddGeometryColumn
> ('kecskemet_k','foldreszletek','geometria',-1,'POLYGON',2);
>
> CREATE INDEX i_foldreszletek_geometria ON kecskemet_k.foldreszletek
> USING gist (geometria);
>
> I hope this is correct and not unhelpful.
>
> cheers
>
> Ben
>
> --
>
> Ben Madin
> REMOTE INFORMATION
>
> t : +61 8 9192 5455
> f : +61 8 9192 5535
> m : 0448 887 220
> Broome   WA   6725
>
> ben at remoteinformation.com.au
>
>
>
> 							Out here, it pays to know...
>
>
>



More information about the postgis-users mailing list