moovida / dart_jts

An effort to port some of the Java Topology Suite to dart
Other
26 stars 19 forks source link

dart_jts vs GEOS through ffi? #11

Closed sqcsabbey closed 1 year ago

sqcsabbey commented 2 years ago

I'm new to Dart, so I'm sorry if this is a naive question.

Why port over JTS instead of wrapping GEOS?

moovida commented 2 years ago

Hi @sqcsabbey , not naive at all. I wanted something completely portable in all flutter/dart environments, even if not that fast.

sqcsabbey commented 2 years ago

Thanks for the response, @moovida.

Which environments wouldn't be supported? I see ffi and web_ffi, but I haven't worked with either of them...

moovida commented 2 years ago

Well, for me already IOS is something impossible (in the past that also blocked me on spatialite). Pure dart removes any thought about portability for me. There has been an initial effort to port the base, but when I need something new, it is quite simple to add it.

But I can understand who prefers to go the native way.

iulian0512 commented 2 years ago

@moovida i have succeeded building geos for android and ios and i am using it with spatialite5 here is my makefile for ios https://github.com/iulian0512/libspatialite-ios/blob/spatialite-5-topo/Makefile and for android https://github.com/iulian0512/android-spatialite/tree/spatialite5 i am already using it in 2 projects (and+ios) integrated with sqflite see https://github.com/iulian0512/sqflite.

moovida commented 2 years ago

Hi @iulian0512 , you did a great work with this. I find it really hard to maintain though. Were you able to publish a flutter/dart package to pub.dev?

(sorry for the late reply, was on leave)

iulian0512 commented 2 years ago

@moovida you mean publishing a spatialite powered sqflite ?

moovida commented 2 years ago

@iulian0512 yes, that would be awesome.

But I would make it dependent on https://pub.dev/packages/sqlite3 instead of sqflite, since that one has flutter as dependency.