lib/rgeo/geos/zm_factory.rb in rgeo-0.1.21 vs lib/rgeo/geos/zm_factory.rb in rgeo-0.1.22

- old
+ new

@@ -60,12 +60,12 @@ end def initialize(opts_={}) # :nodoc: - @zfactory = Factory.create(:support_z_coordinate => true, :lenient_multi_polygon_assertions => opts_[:lenient_multi_polygon_assertions], :buffer_resolution => opts_[:buffer_resolution], :srid => opts_[:srid]) - @mfactory = Factory.create(:support_m_coordinate => true, :lenient_multi_polygon_assertions => opts_[:lenient_multi_polygon_assertions], :buffer_resolution => opts_[:buffer_resolution], :srid => opts_[:srid]) + @zfactory = Factory.create(:has_z_coordinate => true, :lenient_multi_polygon_assertions => opts_[:lenient_multi_polygon_assertions], :buffer_resolution => opts_[:buffer_resolution], :srid => opts_[:srid], :proj4 => opts_[:proj4]) + @mfactory = Factory.create(:has_m_coordinate => true, :lenient_multi_polygon_assertions => opts_[:lenient_multi_polygon_assertions], :buffer_resolution => opts_[:buffer_resolution], :srid => opts_[:srid], :proj4 => opts_[:proj4]) end # Returns the SRID of geometries created by this factory. @@ -109,18 +109,18 @@ rhs_.is_a?(ZMFactory) && rhs_.z_factory == @zfactory end alias_method :==, :eql? - # See ::RGeo::Feature::Factory#has_capability? + # See ::RGeo::Feature::Factory#property - def has_capability?(name_) + def property(name_) case name_ - when :z_coordinate, :m_coordinate + when :has_z_coordinate, :has_m_coordinate, :is_cartesian true else - @zfactory.has_capability?(name_) + nil end end # See ::RGeo::Feature::Factory#parse_wkt @@ -195,9 +195,23 @@ # See ::RGeo::Feature::Factory#multi_polygon def multi_polygon(elems_) ZMMultiPolygonImpl.create(self, @zfactory.multi_polygon(elems_), @mfactory.multi_polygon(elems_)) + end + + + # See ::RGeo::Feature::Factory#proj4 + + def proj4 + @zfactory.proj4 + end + + + # See ::RGeo::Feature::Factory#coord_sys + + def coord_sys + @zfactory.coord_sys end # See ::RGeo::Feature::Factory#override_cast