geopaparazzi / geopaparazzi

Because not all paparazzis are evil!
GNU General Public License v3.0
149 stars 75 forks source link

SpatialiteDatabaseHandler.collectBoundsAndCenter #168

Closed mj10777 closed 10 years ago

mj10777 commented 10 years ago

It seems that with certain Transformations, the logic in collectBoundsAndCenter did not work properly

Thankfully the vividsolutions class offers a better way to resolve this

I have sent the user the new code with the request for Information if it resolves all of his problems.

If you agree and the user sends a positive report, I would update the spatialite_views branch with all the needed changes tomorrow.

mj10777 commented 10 years ago

Have adapted collectBoundsAndCenter in the spatialite_views branch and moved it to SpatialiteUtilities.

mj10777 commented 10 years ago

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

mj10777 commented 10 years ago

Maybe a version 4.0.0 should be considered, due to the new Database Driver.

moovida commented 10 years ago

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.

moovida commented 10 years ago

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
mj10777 commented 10 years ago

implemented PREFS_KEY_SPATIALITE_RECOVERY_MODE in MapsDirManager.init.