[postgis-users] how to determine a geometry type?

nguyen liem liemnguyendl at gmail.com
Sat Jul 3 00:30:50 PDT 2010


Hi Luís

I have a table "mytable" with 2 columns: "id" and "mygeo".
"mygeo" with geometry type is POINT

I used "GeometryType" function to determine what geometry type of column
"mygeo":
   - SELECT GeometryType(mygeo) FROM mytable;
If "mytable" table has no data that the result of above query is NULL (*I
can't know geometry type of column "mygeo"* )
If "mytable" table has data that the result is "POINT"

how to know a geometry type of "mytable" column if it has no data? Using
"GeometryType" function or anothers functions to chek it.

Cheers

2010/7/2 Luís de Sousa <luis.a.de.sousa at gmail.com>

> Hi nguyen,
>
> Though the select Nicolas sent will inform you of the type recorded in
> the PostGis tables, this may not be coincident with the type of your
> table's geometry. The exact type is the one checked by the
> enforce_geotype constraint.
>
> Luís
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



-- 
Liem Nguyen
Developer
Axon Active Corp.
----------------------------------------------------------------------------
Direct Line      : +84 38 948 4645
Fax                  : +84 38 811 3489
Mobile Phone  : +84 168 994 8897
Skype ID         : liemnguyendl2204
Email               : liem.nguyen at axonactive.net / liemnguyendl at gmail.com
Web Site          : http://axonactive.vn
Address           : 87 Thang Long Street,Gate 2 Ward 4,
                         Tan Binh District, HCM city, Vietnam.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100703/865dfe52/attachment.html>


More information about the postgis-users mailing list