lib/postgis_functions/common.rb in nofxx-postgis_adapter-0.5.6 vs lib/postgis_functions/common.rb in nofxx-postgis_adapter-0.5.7
- old
+ new
@@ -436,10 +436,10 @@
# Requires PostGIS be compiled with Proj support.
#
# Return Geometry ST_Transform(geometry g1, integer srid);
#
def transform!(new_srid)
- self[geo_columns.first] = postgis_calculate("Transform", self, new_srid)
+ self[geo_columns.first] = postgis_calculate("Transform", self.new_record? ? self.geom : self, new_srid)
end
def transform(new_srid)
dup.transform!(new_srid)
end