I agree, a great feature.
So i think all these pull requests are good to go Jared. I just added you
to the GeoTools organization on github so you can merge these pull requests
yourself. If you don't mind could also backport them to the stable branch
(11.x) as well.
Thanks!
On Sun, Apr 20, 2014 at 7:28 PM, Jared Erickson <jared.erick...@gmail.com>wrote:
>
> Hi Justin!
>
> Done! If we run into performance problems we could introduce a public
> void saveTile(MBTilesTile entry, boolean updateMinMaxZoomMetadata) method
> that would enable someone to pass in false to skip the metadata update.
> The existing public void saveTile(MBTilesTile entry) method would pass in
> true to keep the metadata up to date.
>
> Thanks for reviewing this. I think MBTiles support in GeoTools (and
> GeoScript) is going to be a great feature!
>
> Jared
>
> On Apr 20, 2014, at 12:53 PM, Justin Deoliveira <jdeol...@boundlessgeo.com>
> wrote:
>
>
> Hey Jared,
>
> On Sun, Apr 20, 2014 at 1:36 PM, Jared Erickson <jared.erick...@gmail.com>
> wrote:
>
>> Hi Justin!
>>
>> I updated the name.
>>
>
> Great, thanks.
>
> I worried about requiring the user to call the saveMinMaxZoomMetadata
>> explicitly too. How about this:
>>
>
>
>>
>> https://gist.github.com/jericks/11122862#file-mbtilesfiles-java-L29
>>
>> If we add the call to the saveTile method it would be automatic. But it
>> would require making three additional SQL statements (1. get min zoom, 2.
>> get max zoom, 3. save metadata). Either way if fine with me. Should I
>> make the saveMinMaxZoomMetadata method private if we include the call in
>> saveTile?
>>
>
> Yeah let's do this. And if we think the additional statements introduce
> too much overhead we can revisit.
>
>>
>> Thanks,
>> Jared
>>
>> On Apr 20, 2014, at 9:33 AM, Justin Deoliveira <jdeol...@boundlessgeo.com>
>> wrote:
>>
>> Hey Jared,
>>
>> On Fri, Apr 18, 2014 at 2:42 PM, Jared Erickson <jared.erick...@gmail.com
>> > wrote:
>>
>>> Hi all!
>>>
>>> I have been playing around with the mbtiles unsupported module while
>>> working on GeoScript and I have a few proposed changes.
>>>
>>> 1. The pom.xml has boiler plate name (Example) and description (Supply a
>>> quick description here.). Would anyone mind if I updated these to mbtiles
>>> and MBTiles support for GeoTools?
>>>
>>> Sounds good to me. For the name perhaps "MBTiles Module" to follow suite
>> with other modules.
>>
>>
>>> 2. mbtile files created by GeoTools are not valid according to GDAL and
>>> QGIS. They are missing minzoom and maxzoom metadata items. I checked and
>>> Tile Mill adds these metadata items by default. To support these metadata
>>> items, I propose adding two methods to the MBTilesFile class:
>>>
>>> public void saveMinMaxZoomMetadata(int min, int max) throws IOException
>>>
>>
>> Is there any way we can just update these automatically as the user adds
>> tiles to the database? Be nicer than requiring the user to call a method
>> that registers required metadata.
>>
>>>
>>> and
>>>
>>> public long minZoom() throws SQLException
>>>
>>
>> Sounds good.
>>
>>>
>>> 3. The MBTilesFile has an init() method that creates the necessary
>>> tables in SQLite. If you call init() on an existing database you get an
>>> error because the tables already exist. Would any mind adding IF NOT
>>> EXISTS to the CREATE TABLE statements?
>>>
>>
>> Great idea.
>>
>>>
>>> With these changes, I can generate mbtiles files that QGIS and GDAL can
>>> read (see attachment). The states layer in QGIS was generated by GeoTools.
>>>
>>>
>>> I can prepare pull requests and create JIRA issues for all of these
>>> items if they sound reasonable.
>>>
>>> Thanks,
>>> Jared
>>>
>>> <qgis_mbtiles.png>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Learn Graph Databases - Download FREE O'Reilly Book
>>> "Graph Databases" is the definitive new guide to graph databases and
>>> their
>>> applications. Written by three acclaimed leaders in the field,
>>> this first edition is now available. Download your free book today!
>>> http://p.sf.net/sfu/NeoTech
>>> _______________________________________________
>>> GeoTools-Devel mailing list
>>> GeoTools-Devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>>>
>>>
>>
>>
>> --
>> *Justin Deoliveira*
>> Vice President, Engineering | Boundless
>> jdeol...@boundlessgeo.com
>> @j_deolive <https://twitter.com/j_deolive>
>>
>>
>>
>
>
> --
> *Justin Deoliveira*
> Vice President, Engineering | Boundless
> jdeol...@boundlessgeo.com
> @j_deolive <https://twitter.com/j_deolive>
>
>
>
--
*Justin Deoliveira*
Vice President, Engineering | Boundless
jdeol...@boundlessgeo.com
@j_deolive <https://twitter.com/j_deolive>
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel