Closed jj0hns0n closed 8 years ago
Absolutely! Next phase feature for sure.
This could be pretty cool to integrate with Field Papers. Build an MBTiles Field Papers export.
I'm thinking rather than scraping tiles from the app, we should simply download an MBTiles from a web service. This will be much faster than pulling millions of tiny PNGs down through.
totally agree that we should have a server make the mbtiles file for us. Then notify when its ready.
Is there some existing service that already does this?
On Wed, Apr 1, 2015 at 4:20 PM, Dale Kunce notifications@github.com wrote:
totally agree that we should have a server make the mbtiles file for us. Then notify when its ready.
— Reply to this email directly or view it on GitHub https://github.com/AmericanRedCross/OpenMapKit/issues/24#issuecomment-88662073 .
Not that I know of. Sounds like a great project idea!
Unfortunately, I cant really get the tl copy
command to work reliably for me. It creates the file and loads the first few zoom levels and then I see a bunch of error trace like below.
Error: connect EMFILE
at errnoException (net.js:904:11)
at connect (net.js:766:19)
at net.js:845:9
at asyncCallback (dns.js:68:16)
at Object.onanswer [as oncomplete] (dns.js:121:9)
Error: connect EMFILE
at errnoException (net.js:904:11)
at connect (net.js:766:19)
at net.js:845:9
at asyncCallback (dns.js:68:16)
at Object.onanswer [as oncomplete] (dns.js:121:9)
Error: connect EMFILE
at errnoException (net.js:904:11)
at connect (net.js:766:19)
at net.js:845:9
at asyncCallback (dns.js:68:16)
at Object.onanswer [as oncomplete] (dns.js:121:9)
Error: getaddrinfo ENOTFOUND
at errnoException (dns.js:37:11)
at Object.onanswer [as oncomplete] (dns.js:124:16)
Error: getaddrinfo ENOTFOUND
at errnoException (dns.js:37:11)
at Object.onanswer [as oncomplete] (dns.js:124:16)
Error: getaddrinfo ENOTFOUND
at errnoException (dns.js:37:11)
at Object.onanswer [as oncomplete] (dns.js:124:16)
Error: getaddrinfo ENOTFOUND
at errnoException (dns.js:37:11)
at Object.onanswer [as oncomplete] (dns.js:124:16)
events.js:72
throw er; // Unhandled 'error' event
^
Error: SQLITE_CANTOPEN: unable to open database file
scylax:~ ortelius$
fwiw, I found a python lib to reliably create mbtiles from osm
@jj0hns0n what platform are you on? what's the full command you're using?
It's possibly related to setting http.globalAgent.maxSockets = Infinity
on Node < 0.12. I ran into a similar problem (socket timeouts instead) and manually changing it to 50
(an arbitrary value) made all of the errors go away.
Forgive this node n00b, but where do I do that?
On Wed, Apr 8, 2015 at 9:45 PM, Seth Fitzsimmons notifications@github.com wrote:
It's possibly related to setting http.globalAgent.maxSockets = Infinity on Node < 0.12. I ran into a similar problem (socket timeouts instead) and manually changing it to 50 (an arbitrary value) made all of the errors go away.
— Reply to this email directly or view it on GitHub https://github.com/AmericanRedCross/OpenMapKit/issues/24#issuecomment-91114260 .
Edit node_modules/tilelive-http/index.js
and change Infinity
to 50
(or something). (After installing tl
with npm install tl
; it it's global, it'll be beneath in Node's lib/
directory, wherever that happens to be.)
/usr/local/lib/node_modules
for me
It doesn't look like it fully solves the problem (tilelive-http should probably retry when encountering internal errors or remote 5xx errors), but it's dramatically better.
tl@0.3.2
and tilelive-http@0.6.0
improve this behavior (except for tile servers that don't just briefly serve 5xx
s).
Sweet! I wonder how much effort it would be to create a micro service that runs tl and provides a url to mbtiles when it's done?
I would like to see this as a part of the OMK server. Will need to figure out how best to plug this into the work that @mberg is doing for a later stage.
This will be a major feature of OpenMapKit Server, and MBTiles will be delivered as part of the provisioning.
We need a way to run this process [1] with a map based interface.
[1] https://github.com/AmericanRedCross/openmapkit/wiki/Creating-Your-Own-MBTiles-Basemap-File