So for some reason when I try to calculate a polygon area, the results are extremely small.
> factory = RGeo::Geographic.projected_factory(projection_proj4: "+proj=utm +datum=WGS84 +zone=32T")
> RGeo::GeoJSON.decode(geometry, geo_factory: factory.projection_factory).area
1.7460196668357376e-05
Here is what the geometry looks like - so it's definitely not that small:
I also tried different approaches, like using rgeo shape reader and ask area on geometry from that(in case my factory is invalid) - the results are exactly the same
RGeo::Shapefile::Reader.open(@shpfile_location.to_s) do |file|
file.each do |record|
puts record.geometry.area # => 1.7460196668357376e-05
end
end
Can anybody please give any hints as what could be wrong?