geopaparazzi / geopaparazzi

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

Spatialite database created at runtime #157

Closed ssppgit closed 10 years ago

ssppgit commented 10 years ago

Hi again!

I know that you can do spatialite database with spatialite-gui. However, i need to do my spatialite database at runtime, i need to create it and insert record i get of a WebService. I have followed this code (https://code.google.com/p/spatialite-android/source/browse/spatialite-android-test/src/com/spatialite/test/spatialite/RTreeTest.java) to test but with my two tables and three records.

All the database is created well but when i see the tables in the Map, my two points and one linestring is moved a bit up.

You can see it in this two images (the first is database created at runtime and the second is created with spatialite-gui).

database created at runtime data base created with spatialite-gui

I must see the first image like the second I have used the same SQL statements and i don't know what's happen.

Any idea?

mj10777 commented 10 years ago

Difficult to say without seeing the original Databases.

ssppgit commented 10 years ago

Hi!

Here (http://box.jisko.net/d/84421175) you can download the database created with spatialite 1.7.1 Here (http://box.jisko.net/d/79e3e21d) you can download the database created at runtime.

I have used the sames SQL statements. Any idea? >.< Thanks for your answers!

mj10777 commented 10 years ago

with spatialite 1.7.1

  • this is malformed, I cannot read it

Mark

2014-05-16 9:29 GMT+02:00 ssppgit notifications@github.com:

Hi!

Here (http://box.jisko.net/d/84421175) you can download the database created with spatialite 1.7.1 Here (http://box.jisko.net/d/79e3e21d) you can download the database created at runtime.

I have used the sames SQL statements. Any idea? >.< Thanks for your answers!

— Reply to this email directly or view it on GitHubhttps://github.com/geopaparazzi/geopaparazzi/issues/157#issuecomment-43304509 .

ssppgit commented 10 years ago

Sorry Mark,

Here (http://box.jisko.net/d/260a0ff4) you can download the database created with spatialite 1.7.1. This one is seen well, db created at runtime is seen wrong.

Thnks!

mj10777 commented 10 years ago

Well, you are a very unlucky person.

It seems that at some point (starting with spatialite 4.0.0)

http://spatialreference.org/ref/epsg/ed50-utm-zone-30n/

This site is well known for not updating their information

Mark

ssppgit commented 10 years ago

T_T...And can i correct this from code of any way??Because i need to create database at runtime...

Thanks!

mj10777 commented 10 years ago

On further not:

then they should show up as in the second image, which is correct

SELECT * FROM spatial_ref_sys WHERE auth_srid=23030

mj10777 commented 10 years ago

You are using an old driver, thus it creates the old values

ssppgit commented 10 years ago

I am going to use this https://github.com/geopaparazzi/libjsqlite-spatialite-android/blob/master/archive/20140105.libjsqlite.4.1.1.tar.bz2

And thank you very much for your help!!!

mj10777 commented 10 years ago

2014-05-16 12:19 GMT+02:00 ssppgit notifications@github.com:

I am going to use this https://github.com/geopaparazzi/libjsqlite-spatialite-android/blob/master/archive/20140105.libjsqlite.4.1.1.tar.bz2

And thank you very much for your help!!!

Yes, I have been working with that since January.

  • it will be part of the next geopaparazzi

— Reply to this email directly or view it on GitHubhttps://github.com/geopaparazzi/geopaparazzi/issues/157#issuecomment-43317033 .

mj10777 commented 10 years ago

but remember, older databases will still have the old values

2014-05-16 12:20 GMT+02:00 Mark Johnson mj10777@googlemail.com:

2014-05-16 12:19 GMT+02:00 ssppgit notifications@github.com:

I am going to use this

https://github.com/geopaparazzi/libjsqlite-spatialite-android/blob/master/archive/20140105.libjsqlite.4.1.1.tar.bz2

And thank you very much for your help!!!

Yes, I have been working with that since January.

  • it will be part of the next geopaparazzi

    — Reply to this email directly or view it on GitHubhttps://github.com/geopaparazzi/geopaparazzi/issues/157#issuecomment-43317033 .

ssppgit commented 10 years ago

Yes yes! I'll update older databases :)