New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
20 km shift with SRID 32188 #48
Comments
I think the problem comes from the projection. If I project srid 4326 on itself: RGeo::Feature.cast(geometry_attribute, :factory => RGeo::Cartesian.factory(:srs_database => RGeo::CoordSys::SRSDatabase::ActiveRecordTable.new, :srid => 4326), :project => true) I get the same shift (0.2 degrees north) Is it possible that there is a bug that first projects the geographic (that should not happen) and than project to geometry? Or maybe the factory isn't right... |
For testing: SELECT ST_AsText(ST_Transform(ST_GeomFromText('POINT(-73.700666 45.528719)',4326), 32188)) wgs84_factory = RGeo::Geographic.spherical_factory(:srid => 4326) There is also a small shift with x. But the y shift is huge!!! |
+1 Any solution? |
You do things a different way than I do, but if I wanted to convert geographic coordinates into (what are presumably) geometric coordinates, I'd do this:
Is that correct now? (checking, yes, it is. hehe you're welcome) |
I tried it, but don't work for me: [5] pry(main)> geom_shape_32188 = f.parse_wkt("POINT (#{lng} #{lat})").projection |
lat and lon are reversed... |
I tried @ddd1600's solution (while flipping lat/lon) and it worked. This issue is very old and a lot has changed in the library since then, so I'm going to close but if this still isnt' working, please open a new issue. |
Hi!
I tried to convert a lat/lon geographic geometry to MTM8 (SRID 32188) and I get a 20km shift (almost 20000 meters too high) for the y, but the x is correct.
If I use directly the postgis function ST_Transform, there is no shift.
Here is the rgeo command I use to transform (the one that shifts 20km):
RGeo::Feature.cast(geometry_attribute, :factory => RGeo::Cartesian.factory(:srs_database => RGeo::CoordSys::SRSDatabase::ActiveRecordTable.new, :srid => 32188), :project => true)
Thanks for any cue!
The text was updated successfully, but these errors were encountered: