Hey Jukka,
I just got done scanning the OGC Geopackage specification. That thing is
huge! It sounds like OGC is positioning it as the open standard
replacement for shapefiles or geodatabases, which is something that is
really needed. Ideally, OJ would have a first-class utility to import and
export data to geopackages. I don't have the time to pull that off right
now, but I'll follow your suggestions and look at adding some support for
it to the DbQuery plugin.
-Larry
On Fri, Jan 3, 2014 at 4:08 PM, Rahkonen Jukka <jukka.rahko...@mmmtike.fi>wrote:
> Hi,
>
> GeoPackage is a queryable datastore just like any SQLite or Spatialite DB.
> Attribute queries can be done through SQL like against any other database.
> Here is a brand new sample for testing
>
> https://drive.google.com/file/d/0BzouoZCWtrv8c0pDc2NaWUdQcFk/edit?usp=sharing
>
> I renamed the db file 'world.gpkg' into 'world.sqlite', opened it with
> spatialite-gui and tested with queries like
>
> select * from geonames
> where featureclass='P'
> and population>1000;
>
> Geometries are naturately not usable in spatialite-gui because the blobs
> are not spatialite blobs.
>
> The sample db contains only points and rasters. GDAL geopackage driver is
> close to ready and when it is I can create sample databases with all kind
> of geometries.
> Links to follow:
> https://groups.google.com/forum/#!topic/spatialite-users/Z4-qBOT4TFI
> http://trac.osgeo.org/gdal/ticket/5335
>
> -Jukka Rahkonen-
>
>
> ________________________________
> Larry Reeder wrote:
>
> > Hey Jukka,
>
> > Although it uses SQLlite, it sounds like GeoPackage is a data storage
> mechanism like shapefiles, more than a general queryable data store. For
> that reason, it's probably a better fit in OJ as one of the options for
> "Open", "Open File...". That said, it would probably be fun to work on,
> and I'll put that on my todo list unless someone else wants to take it.
> But first I need to get that patch for the JTS WKBReader....
>
> -lreeder
>
>
> On Tue, Dec 3, 2013 at 1:56 AM, Rahkonen Jukka <jukka.rahko...@mmmtike.fi
> <mailto:jukka.rahko...@mmmtike.fi>> wrote:
> Hi,
>
> I started a new thread because Larry Reeder wrote " Now that cold is here,
> I've got more time to stay indoors and code. "
> I have a feeling that if it will be cold enough then Larry can make the
> plugin to read aldo blobs from GeoPackage databases.
>
> GeoPackage is a new OGC Standard candidate. Info about that is in
> https://github.com/opengis/geopackage
> and the version 0.8 is available from
> https://portal.opengeospatial.org/files/?artifact_id=54838
>
> When it comes to DB Query plugin, the GeoPackage is a SQLite database
> where geometries have been stored as BLOBs. These BLOBs contain standard
> WKB presentation with some headers. The binary format is described here
> http://opengis.github.io/geopackage/#gpb_format
>
> Unfortunately I could not find any public GeoPackage database sample but
> such can be downloaded after registration from Luciad
> http://demo.luciad.com/GeoPackage/Download.html
> Luciad has also started on open source project for a geopackage library
> https://bitbucket.org/luciad/libgpkg/overview
> There seems to be also some GeoTools code for GeoPackages but I am not
> sure if it is up to date. The binary format was changed a bit perhaps in
> August.
> http://docs.geotools.org/latest/javadocs/org/geotools/geopkg/GeoPackage.html
>
> What DB Query tool should do is to read the BLOB, interpret the headers
> and jump to correct byte offset for reading the WKB so that it can be
> passed on to JTS. I tried to read some older version of the specification
> version in July, 2013 and came the this conclusion:
>
> 1) Check if BLOB begins with "GPB" bytes (47 50 42). If yes, then it is a
> GeoPagkage BLOB.
> 2) Study the fourth byte and find the envelope type from "E" bits (1, 2,
> and 3).
> 3) Skip the four srs_id bytes and based on the envelope type, either 0,
> 32, 48, or 64 bytes more.
> 4) Here starts the WKB
>
> Thus the first byte of WKB is either byte number 9, 41, 57, or 73.
>
> I am not sure if this was a perfect interpretation ever of if adjustments
> to the spec has changed things but I believe that logically this is close
> to correct.
>
> -Jukka Rahkonen-
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net<mailto:
> Jump-pilot-devel@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel