Hi Michael,

Thanks for the precision.
I modified buildSpatialIndexFilter to return an empty string (no spatial
filter clause) in case a valid GeometryColumn object cannot be built.
I also cleaned the code where system.out were used and replaced it with
suitable Logger.

I will commit these changes.

Nicolas

On Mon, 24 Aug 2020 at 13:23, Michaud Michael <m.michael.mich...@orange.fr>
wrote:

> Hi,
>
> Just to precise what I fixed wrt. to what Ede is suggesting :
>
> I could not read spatialite files from QGis because
> GeometryColumn.isIndexed() returned null for some GeometryColumnsLayouts.
>
> I fixed it for OGC_OGR_LAYOUT (used by QGIS when exporting as spatialite),
> and for other unknown layouts (e.g. FDO_LAYOUT), I just stated that
> isIndexed = false to avoid NPE
>
> (i don't know how to get isIndexed information in this later case).
>
> Ede's point seems to be about GeometryColumn itself returning null.
> Looking at the code, I can't guarantee it is never null, but I don't know
> if it is possible to produce a NPE with a normal utilisation of OpenJUMP.
>
> Michaël
>
> envoyé : 24 août 2020 à 11:46
> de : edgar.sol...@web.de
> à : Nicolas Ribot <nicolas.ri...@gmail.com>
> Cc: OpenJump develop and use <jump-pilot-devel@lists.sourceforge.net>
> objet : Re: [JPP-Devel] sqlite database
>
>
> you can simulate it,
>
> simply return NULL in SpatialiteDSMetadata.getGeometryColumn(String
> datasetName, String geoCol) for testing and you should end up with the
> stack.
>
> wrt. what Mike did. he wrote earlier
>
> On 8/22/2020 11:18 AM, Michaud Michael wrote:
>
> Finally got it : there was a bug preventing loading anything exported from
> QGIS
> as "spatialite". Exporting as geopackage was working though. It should be
> working for both layouts now.
>
> Fix committed in r6385. I'll go on testing for the date problem now.
>
> ..ede
>
>
> On 8/24/2020 11:26 AM, Nicolas Ribot wrote:
>
> Do you have a sample dataset showing the problem ? Or a way to generate
> such a sample ?
> I tested with a shapefile exported to a spatialite database with qgis 3.12
> and it worked.
>
> Nicolas
>
> On Mon, 24 Aug 2020 at 10:48, Nicolas Ribot <nicolas.ri...@gmail.com>
> wrote:
>
> >> Hello ede,>>
> >> I'll check it out. There are some todos left in the code, mainly in case
> >> of failure to retrieve expected information.
> >>
> >> Nicolas
> >>
> >> On Sun, 23 Aug 2020 at 13:07, <edgar.sol...@web.de> wrote:
> >>
> >>> hey Nico,
> >>>
> >>> On 21.08.2020 10:52, Michaud Michael wrote:
> >>>>>>> For all my tests, I get the same error after I have choosen the
> >>> table and
> >>>>>>> clicked on finish. The error seems related to geometry retrieval or
> >>> index
> >>>>>>> retrieval :
> >>>>>>>
> >>>>>>> java.lang.NullPointerException
> >>>>>>> at
> >>>>>>>
> >>>>>
> >>>
> com.vividsolutions.jump.datastore.spatialite.SpatialiteSQLBuilder.buildSpatialIndexFilter(SpatialiteSQLBuilder.java:157)
> >>>>>>> at
> >>>>>>>
> >>>>>
> >>>
> com.vividsolutions.jump.datastore.spatialite.SpatialiteSQLBuilder.buildBoxFilter(SpatialiteSQLBuilder.java:116)
> >>>>>>> at
> >>>>>>>
> >>>>>
> >>>
> com.vividsolutions.jump.datastore.spatialite.SpatialiteSQLBuilder.getSQL(SpatialiteSQLBuilder.java:39)
> >>>>>>>
> >>>
> >>> just had a more detailed look and somehow
> >>> SpatialiteDSMetadata.getGeometryColumn(String datasetName, String
> geoCol)
> >>> does return NULL in some cases which is subsequently not handled
> properly.
> >>>
> >>> this is probably fixed easily if you know what the code is supposed to
> do
> >>> ;)
> >>>
> >>> ..ede
> >>>
> >>>
>
>
>
>
>
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to