[postgis-users] mulitpolygon with type set to geometry(Geometry, 4326)

Alexandre Neto senhor.neto at gmail.com
Thu May 8 14:25:37 PDT 2014


Hello Jason,

All you need to cast a geometry as other more restrict geometry type is:

*st_centroid(report_geom)::geometry(POINT,4326)*

Hope this helps



Alexandre Neto


On Thu, May 8, 2014 at 9:49 PM, Jason Mathis <jmathis at redzonesoftware.com>wrote:

> Hello,
>
> I am fairly new to postgis so it would be great if someone could point me
> in the right direction on how to fix this issue. Or if its even fixable.
>
> I have a table that stores polygons and multi polygons with a column:
>
> *    report_geom geometry(Geometry,4326)*
>
> I have a view that uses that column like:
>
> *    st_centroid(report_geom) as pt_geom*
>
> The issue is when you use the st_centroid is removes the srid and leaves
> it a plain geometry. Which can make it a bit inconvenient for use in arc
> and qgis apps. Is there a way to cast it to be a point with 4326?
>
> Thanks all!
>
> -jason
>
>
>
> This transmission contains confidential and privileged information
> intended solely for the party identified above. If you receive this message
> in error, you must not use it or convey it to others. Please destroy it
> immediately and contact the sender at (303) 386-3955 or by return e-mail
> to the sender.
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140508/ab073a08/attachment.html>


More information about the postgis-users mailing list