Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had ready geofiled with SRID: 3857
and i have data on it
geometry = db.Column(Geometry(geometry_type="MULTIPOLYGON", srid=3857), nullable = True)
When i used flask admin with Leaflet, geometry transformed incorrectly,
i need: [69.224854,41.268517], but i got [0.00069224854,0.00004268517]
Then i saw query in debug toolbar
SELECT ST_AsGeoJSON(ST_Transform(ST_GeomFromEWKB(%(ST_GeomFromEWKB_1)s), %(ST_Transform_1)s)) AS "ST_AsGeoJSON_1"
He is transforming coordinates systems
in code i saw that he is always transforming from 4326 to 3857 in my case
But i don't need transforming, because of my srid in db is 3857, not 4326
Then i changed
self.web_srid = self.srid
, to use my srid wheli convertingIF there were other method to fix that, comment