Gaby,

I like H2 as it is pure Java. I cannot vouch for its performance but it 
seems adequate. The main downside is that it is single-threaded (IIRC 
multithread support is available but experimental). For multithreaded 
performance I recommend postgres, but as an upgrade from shapefiles, H2 
should be a good first step that helps you migrate towards a JDBC 
backend. H2 can run in embedded or server mode.

H2 is widely supported, has a JDBC data store implementation in 
GeoTools, is used for the default EPSG database in GeoServer, and is 
shipped as a standard JDBC provider in Spring Boot. It also has a handy 
feature: the jar file can be run to provide a console to access a 
database. The connection syntax is a bit fiddly, but everything seems to 
work:
http://www.h2database.com/html/faq.html#connect

Years ago the GeoTools projects migrated from HSQL, considered Derby, 
and settled on H2 for our embedded Java database. One advantage of 
spatialite is that you can share database files with non-Java software, 
but in my view this is not a good reason to include a native dependency 
as there are better ways of achieving the same thing for spatial data.

GeoTools gt-jdbc-h2 docs:
http://docs.geotools.org/latest/userguide/library/jdbc/h2.html

Note that these docs are out of date and the latest H2 allegedly 
supports spatial indices, although I have not used them.

Kind regards,
Ben.

On 02/03/16 09:23, Gabriella Turek wrote:
> Thanx Ian, I have been thinking for a while I should be using an embedded db, 
> such as spatialite, do you think
> this approach would be better and if so, would spatialite be a good pick? 
> Eventually most of the data now in shapefiles will end up in a wfs server,
> but there will still need to be a local option for new data.
> Gaby
> From: Ian Turton <[email protected]<mailto:[email protected]>>
> Date: Tuesday, 1 March 2016 22:00
> To: Gabriella Turek 
> <[email protected]<mailto:[email protected]>>
> Cc: geotools net 
> <[email protected]<mailto:[email protected]>>
> Subject: Re: [Geotools-gt2-users] Reading shapefiles from disk
>
>
> Accessing large shapefiles is always going to be slower than using a good 
> database. You might benefit from wrapping a SpatialIndexFeatureCollection (if 
> you are using a 15.x release) in the ReprojectingFeatureCollection.
>
> Ian
>
> On 29 February 2016 at 21:40, Gabriella Turek 
> <[email protected]<mailto:[email protected]>> wrote:
> Hello,
> I have a question on performance re reading large shapefiles from disk. I
> have been reading data into
> ReprojectingFeatureCollection’s and performing filtering on that. Is this
> the most efficient way of
> accessing large shapefiles? It seems to be a bit slow.
> Gaby
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]<mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
>
> --
> Ian Turton
>
>
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
>
>
>
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>

-- 
Ben Caradoc-Davies <[email protected]>
Director
Transient Software Limited <http://transient.nz/>
New Zealand

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to