Git Product home page Git Product logo

Comments (6)

BuonOmo avatar BuonOmo commented on June 11, 2024 2

Thank you both for reporting this issue.

I think this is related to this change in geos:

This is quite unfortunate for us, seems like we'll have to do a conditional over geos version. I should have time to do that by next week. If anyone can do it beforehand that would be more than welcome!

from rgeo.

keithdoggett avatar keithdoggett commented on June 11, 2024 2

@januszm once #364 is merged I'll release a version with these changes.

from rgeo.

buffpojken avatar buffpojken commented on June 11, 2024

I second this, this happens with multipolygons as well in an unexpected way. The following was explored on Ruby 3.1.2p20, with RGeo at 3.0.0 on macOS 13.1.

We pass the following geometry to RGeo:

MULTIPOLYGON(((12.932783211827351 55.52388199800951,12.93245550269099 55.52385006659112,12.932511159135071 55.52366627893948,12.932034283234547 55.523792667409026,12.932249636217353 55.52408517418492,12.932380445341693 55.52409792424644,12.932708140512728 55.52412986477694,12.932783211827351 55.52388199800951)),((12.934160764140689 55.524585414273915,12.935069804474448 55.52439776732449,12.935081366292575 55.52435334973056,12.935114165594179 55.5243561507144,12.935140137641318 55.52425637035675,12.935184353995986 55.524086684745086,12.935187805705446 55.52407342495578,12.93487752118115 55.52383636385861,12.93485414710541 55.52383440570438,12.934617654824683 55.523814586663214,12.93462363716453 55.52379159287159,12.934373893839348 55.523767266014715,12.934262076501895 55.52419653040539,12.934160764140689 55.524585414273915)))

and depending on geos-version, we get the following back out again. On 3.11.1 - we receive the expected geometry back:
MULTIPOLYGON (((12.932783211827351 55.52388199800951, 12.93245550269099 55.52385006659112, 12.932511159135071 55.52366627893948, 12.932034283234547 55.523792667409026, 12.932249636217353 55.52408517418492, 12.932380445341693 55.52409792424644, 12.932708140512728 55.52412986477694, 12.932783211827351 55.52388199800951)), ((12.934160764140689 55.524585414273915, 12.935069804474448 55.52439776732449, 12.935081366292575 55.52435334973056, 12.935114165594179 55.5243561507144, 12.935140137641318 55.52425637035675, 12.935184353995986 55.524086684745086, 12.935187805705446 55.52407342495578, 12.93487752118115 55.52383636385861, 12.93485414710541 55.52383440570438, 12.934617654824683 55.523814586663214, 12.93462363716453 55.52379159287159, 12.934373893839348 55.523767266014715, 12.934262076501895 55.52419653040539, 12.934160764140689 55.524585414273915)))

but on 3.12.0 - it's suddenly converted into a geometry with Z, even though it's not specified and not provided:
MULTIPOLYGON Z (((12.932783211827351 55.52388199800951 0, 12.93245550269099 55.52385006659112 0, 12.932511159135071 55.52366627893948 0, 12.932034283234547 55.523792667409026 0, 12.932249636217353 55.52408517418492 0, 12.932380445341693 55.52409792424644 0, 12.932708140512728 55.52412986477694 0, 12.932783211827351 55.52388199800951 0)), ((12.934160764140689 55.524585414273915 0, 12.935069804474448 55.52439776732449 0, 12.935081366292575 55.52435334973056 0, 12.935114165594179 55.5243561507144 0, 12.935140137641318 55.52425637035675 0, 12.935184353995986 55.524086684745086 0, 12.935187805705446 55.52407342495578 0, 12.93487752118115 55.52383636385861 0, 12.93485414710541 55.52383440570438 0, 12.934617654824683 55.523814586663214 0, 12.93462363716453 55.52379159287159 0, 12.934373893839348 55.523767266014715 0, 12.934262076501895 55.52419653040539 0, 12.934160764140689 55.524585414273915 0)))

from rgeo.

buffpojken avatar buffpojken commented on June 11, 2024

Thanks a lot for the quick look on this - while I'm comfortable exploring this in Ruby, the C-parts are a bit beyond me. Will this warrant a patch-level release or should I run from HEAD until a minor release?

from rgeo.

Tristramg avatar Tristramg commented on June 11, 2024

Thank you a lot for your reactivity and for maintaining this gem!

from rgeo.

januszm avatar januszm commented on June 11, 2024

Same just happened to me when I upgraded older app to GEOS 3.12 and Ruby 3.2

> RGeo::Geographic.spherical_factory.point("2", "1")
=> #<RGeo::Geographic::SphericalPointImpl:0x7170 "POINT (2.0 1.0)">

> record.shape = RGeo::Geographic.spherical_factory.point("2", "1")
> record.save

> record.shape
=> #<RGeo::Geos::CAPIPointImpl:0x715c "POINT Z (2 1 0)">
> record.shape.to_s
=> "POINT Z (2 1 0)"

Would downgrading to GEOS 3.11 or 3.10 solve this issue too?

Or should I rather switch to Github main/master version of this gem until the changes from this PR #361 are released , possibly as rgeo 3.0.1 or 3.1.0 ?

from rgeo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.