Closed mj10777 closed 10 years ago
Have adapted collectBoundsAndCenter in the spatialite_views branch and moved it to SpatialiteUtilities.
collectBoundsAndCenter_original
Did this change get into the GeoPaparazzi_3.9.8PRE_spatialiteviews_test.apk ?
Also a Application preference for turning on the correction logic needs to be added
Maybe a version 4.0.0 should be considered, due to the new Database Driver.
I took in everything that was in your pull request, so I assume yes. I now merged in your pull request.
I will add a preference and report back here how to use it. I will add an ON/OFF preference. You will then have to query the preferences and check if it needs to be done and then set is back to OFF.
Regarding version 4, I want to wait for that when the project gets all put in one single database file. This might be happening in near future and that will definitely require a major number upgrade.
The preference is added. You can access it the usual android preferences way by using the key:
eu.geopaparazzi.spatialite.util.SpatialiteLibraryConstants.PREFS_KEY_SPATIALITE_RECOVERY_MODE
implemented PREFS_KEY_SPATIALITE_RECOVERY_MODE in MapsDirManager.init.
It seems that with certain Transformations, the logic in collectBoundsAndCenter did not work properly
South_West
andNorth_East
points did not bring correct resultsThankfully the vividsolutions class offers a better way to resolve this
Envelope envelope = geometry.getEnvelopeInternal();
I have sent the user the new code with the request for Information if it resolves all of his problems.
collectBoundsAndCenter
SpatialiteUtilities
fromSpatialiteDatabaseHandler
buildGeometriesInBoundsQuery
If you agree and the user sends a positive report, I would update the
spatialite_views
branch with all the needed changes tomorrow.