[postgis-users] mulitpolygon with type set to geometry(Geometry, 4326)
Jason Mathis
jmathis at redzonesoftware.com
Thu May 8 15:36:56 PDT 2014
ah yes that works. Turns out you have to drop and create the view if I tried a replace i get the below message.
ERROR: cannot change data type of view column "pt_geom" from geometry to geometry(Point,4326)
But a new view shows up correctly.
Thanks!
On May 8, 2014 at 3:50:24 PM, Alexandre Neto (senhor.neto at gmail.com) wrote:
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
_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
--
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140508/7d5f0d93/attachment.html>
More information about the postgis-users
mailing list