Spatialite 5.0.1 ExportGeoJSON2 Bug?

54 views
Skip to first unread message

Martin Roundill

unread,
Mar 10, 2021, 9:20:13 PMMar 10
to SpatiaLite Users
Hi,

The GeoJSON file that is generated from the ExportGeoJSON2  function incorrectly spells
geometry as geomety ie the 'r' is missing.

Its an easy search and replace fix so not necessarily  an urgent matter but it took a while to determine while the files were not loading.

Command used was:

SELECT ExportGeoJSON2('iso_out', 'geom', 'c:/temp/out.GeoJSON', 6, true, false, false, 'SAME');

Regards

Martin

danields...@gmail.com

unread,
Mar 13, 2021, 9:13:07 AMMar 13
to spatiali...@googlegroups.com

Hi Martin,

 

Thanks for your observation.   

I have tried to use the function, but it hasn’t worked for me yet. Maybe, I have been doing something wrong.  Actually, I have been trying to import this function to a python code, but it hasn’t worked.

Could you give me some tips on how to import it to my code? I would be very thankful.

 

My python code:

 

 

 

Error:

 

 

Thanks,

Daniel

--
You received this message because you are subscribed to the Google Groups "SpatiaLite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spatialite-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spatialite-users/8df8ff10-68df-454d-b68f-2dc8aaa0d422n%40googlegroups.com.

image002.jpg
image008.jpg
image009.jpg

a.fu...@lqt.it

unread,
Mar 13, 2021, 9:37:22 AMMar 13
to spatiali...@googlegroups.com
On Sat, 13 Mar 2021 09:13:05 -0500, danields...@gmail.com wrote:
>
> sqlite3.OperationalError: no such function ExportGeoJSON2
>

Hi Daniel,

the reason explaining for such an issue is clearly stated
in the documentation:

http://www.gaia-gis.it/gaia-sins/spatialite-sql-5.0.1.html

ExportGeoJSON2
"Please note well: this SQL function opens the door to many potential
security issues, and thus is always disabled by default.
Explicitly setting the environment variable SPATIALITE_SECURITY=relaxed
is absolutely required in order to enable this function"

you just need to set SPATIALITE_SECURITY=relaxed before
attempting to execute your Python code.

bye Sandro

Alessandro Furieri

unread,
Mar 20, 2021, 6:51:29 AMMar 20
to SpatiaLite Users
Hi Martin,

the bug has been fixed by the latest commit 5fda27f68f

you can eventually rebuild the library from the sources
available from the Fossil repo:


bye Sandro

Reply all
Reply to author
Forward
0 new messages