def to_wkt(options = {})
      writer = WktWriter.new

      # Older versions of the Geos library don't allow for options here.
      args = if WktWriter.instance_method(:write).arity < -1
        [ options ]
      else
        []
      end

      ret = ''.dup

      if options[:include_srid]
        srid = if options[:srid]
          options[:srid]
        else
          self.srid
        end

        ret << "SRID=#{srid};"
      end

      ret << writer.write(self, *args)
      ret
    end
def to_wkt(options = {})
      writer = WktWriter.new

      # Older versions of the Geos library don't allow for options here.
      args = if WktWriter.instance_method(:write).arity < -1
        [ options ]
      else
        []
      end

      ret = ''.dup

      if options[:include_srid]
        srid = if options[:srid]
          options[:srid]
        else
          self.srid
        end

        ret << "SRID=#{srid};"
      end

      ret << writer.write(self, *args)
      ret
    end
Spits the geometry out into WKT. You can specify the :include_srid
 option to create a PostGIS-style EWKT output.