Closed raphael-bmec-co closed 6 months ago
Hi @raphael-bmec-co , I am not sure how a shapefile could be loaded into a browser. What is your usecase? What could be a workaround?
This lib was not written/ported thinking that web could be a possible platform.
Hi @moovida thanks for getting back to me.
Our use case is a web app for an agritech application. We load data, in ShapeFile format from 3rd party vendors into our platform for further processing.
We currently have an angularJS platform that we are porting to flutter. This is the library we are currently using.
I have spent quite some time looking for a workaround. However, the html.File
only allows files to be read as string or data and cannot return a system path. I can't seem to find a way to use your available APIs to process the shapefile from the raw data. One possible work around - required package changes - would be to expose APIs that could parse the files from the raw data instead of the io.File
object (maybe these are already exposed and I can't find them?).
Anyway, I have to hard expectation of you doing this work, I just haven't found an alternative that supports web so it would be nice not to have to start from scratch.
Thanks!
Hi @raphael-bmec-co , I see the point. So shps are uploaded and then need to be converted to some internal format.
Well yes, you would then need to change the various readers substantially (shp, shx, dbf). They currently work with file channels, while you will need them to work with buffers (guess LByteBuffer, which at some point are used).
Okay thanks @moovida. We will look into making a fork if it comes to that.
The library used
io.File
however onlyhttp.File
is permitted on web. It would be great to provide a mechanism/workaround. I have been unable to come up with one.