Andrea, many thanks for your feedback. It worked!

Thanassis Mantes

On 21/12/2017 5:20 μμ, Andrea Aime wrote:
SpatialiteDataSourceFactory handles spatialite, not geopackage (both based on sqlite but structurally different in terms of tables and contents).
You should be using this:

https://github.com/geotools/geotools/blob/master/modules/plugin/geopkg/src/main/java/org/geotools/geopkg/GeoPkgDataStoreFactory.java

See also:

http://docs.geotools.org/latest/userguide/library/data/geopackage.html

Cheers
Andrea


On Thu, Dec 21, 2017 at 3:40 PM, Athanasios Mantes <mante...@gmail.com <mailto:mante...@gmail.com>> wrote:

    (OK, I'm new to this part of the GeoTools ecosystem, so apologies
    for my questions.)

    Do you mean that I should initially create a GeoPackage with an
    existing JDBCDataStore (in my case, using a
    SpatiaLiteDataSourceFactory)? Because I can't seem to find a way
    to access GeoPackage's datastore...

    Thanks again,
    Thanassis Mantes


    On 21/12/2017 3:53 μμ, Andrea Aime wrote:
    HI Athanasios,
    while I cannot share examples for the low level API, why don't
    you directly use the JDBCDataStore one
    built on top of it? It should make it no different than writing
    to shapefile, postgis and the like

    Cheers
    Andrea


    On Thu, Dec 21, 2017 at 2:31 PM, Athanasios Mantes
    <mante...@gmail.com <mailto:mante...@gmail.com>> wrote:

        Hi list,

        I recently posted an email with a question about Geotools and
        exporting large numbers of SimpleFeatures to GeoJSON format.
        In the meanwhile I decided to check out the GeoPackage format
        case, in order to try and export my data to GeoPackage file
        instead of GeoJSON. However, I'm having a hard time
        understanding how I can append SimpleFeatures to an already
        existing FeatureEntry in the GeoPackage. I searched the forum
        and I came across some posts that mentioned this case,
        however, links with sample code were dead. Can anyone post a
        dimple exmaple or point me to a code snippet?

        Thanks in advance

        Thanassis Mantes


        
------------------------------------------------------------------------------
        Check out the vibrant tech community on one of the world's most
        engaging tech sites, Slashdot.org! http://sdm.link/slashdot
        _______________________________________________
        GeoTools-GT2-Users mailing list
        GeoTools-GT2-Users@lists.sourceforge.net
        <mailto:GeoTools-GT2-Users@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
        <https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users>




--
    Regards,

    Andrea Aime

    ==GeoServer Professional Services from the experts! Visit
    http://goo.gl/it488V for more information.==Ing. Andrea Aime
    @geowolfTechnical LeadGeoSolutions S.A.S.Via di Montramito 3/A
    
<https://maps.google.com/?q=Via+di+Montramito+3/A%0D+55054+%C2%A0Massarosa&entry=gmail&source=g>55054
     Massarosa
    
<https://maps.google.com/?q=Via+di+Montramito+3/A%0D+55054+%C2%A0Massarosa&entry=gmail&source=g>
    (LU)phone: +39 0584 962313 <tel:+39%200584%20962313>fax: +39 0584
    1660272 <tel:+39%200584%20166%200272>mob: +39  339 8844549
    
<tel:+39%20339%20884%204549>http://www.geo-solutions.ithttp://twitter.com/geosolutions_it
    <http://twitter.com/geosolutions_it>

    AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

    Le informazioni contenute in questo messaggio di posta
    elettronica e/o nel/i file/s allegato/i sono da considerarsi
    strettamente riservate. Il loro utilizzo è consentito
    esclusivamente al destinatario del messaggio, per le finalità
    indicate nel messaggio stesso. Qualora riceviate questo messaggio
    senza esserne il destinatario, Vi preghiamo cortesemente di
    darcene notizia via e-mail e di procedere alla distruzione del
    messaggio stesso, cancellandolo dal Vostro sistema. Conservare il
    messaggio stesso, divulgarlo anche in parte, distribuirlo ad
    altri soggetti, copiarlo, od utilizzarlo per finalità diverse,
    costituisce comportamento contrario ai principi dettati dal
    D.Lgs. 196/2003.

    The information in this message and/or attachments, is intended
    solely for the attention and use of the named addressee(s) and
    may be confidential or proprietary in nature or covered by the
    provisions of privacy act (Legislative Decree June, 30 2003,
    no.196 - Italy's New Data Protection Code).Any use not in accord
    with its purpose, any disclosure, reproduction, copying,
    distribution, or either dissemination, either whole or partial,
    is strictly forbidden except previous formal approval of the
    named addressee(s). If you are not the intended recipient, please
    contact immediately the sender by telephone, fax or e-mail and
    delete the information in this message that has been received in
    error. The sender does not give any warranty or accept liability
    as the content, accuracy or completeness of sent messages and
    accepts no responsibility  for changes made after they were sent
    or for other risks which arise as a result of e-mail
    transmission, viruses, etc.





--

Regards,

Andrea Aime

==GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.==Ing. Andrea Aime @geowolfTechnical LeadGeoSolutions S.A.S.Via di Montramito 3/A55054  Massarosa (LU)phone: +39 0584 962313fax: +39 0584 1660272mob: +39  339 8844549http://www.geo-solutions.ithttp://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility  for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to