Hi,
What I've done so far:
• Added a org.openjump.core.ui.plugin.datastore.spatialdatabases package
containing base classes for SpatialDatabases support: it merely contains
datastore.postgis.* classes refactored to remove postgis-dependent code
(hard coded queries for instance)
• In the SpatialDatabasesPlugin: added overloaded classes for PostGIS and
Oracle: these classes provides db-specific stuff (queries, logic)
Code for Postgis or Oracle is then fews lines long (mainly new ctor for
overloaded fields and some overloaded methods).
The plugin registers these 2 new DataStore drivers to OJ. (I tried to
remove the existing Postgis driver with getRegistry().getEntries list but
did not succeed)
Layers can be then be loaded from the 2 spatial databases.
Have to test the JDBC metadata retrieval and some other spatial databases.
Nicolas
On 17 February 2015 at 11:19, Nicolas Ribot <[email protected]> wrote:
> Hi Michael,
>
> Yes I was thinking of an intermediate level.
> Between JDBC OJ code providing generic stuff (Execute, ResultSetBlock) and
> specific database code.
> In this model, PostgisDDMetadata would only provide postgis queries to get
> information and overload some generic method to call Spatialdatabases core
> function with Postgis parameters.
>
> Concerning the write part of spatial database, yes, it is another
> challenge ;)
> I was thinking, in a first time, to extend the read support and see how it
> plays.
> For sure, providing a generic write support for spatial databases would be
> really cool !
>
> Nicolas
>
> On 16 February 2015 at 23:19, Michael Michaud <[email protected]
> > wrote:
>
>> Hi Nicolas,
>>
>> AFAIK, OpenJUMP already has two layers : one for generic jdbc code, one
>> for
>> postgis specific code. If you think an intermediate level implementing
>> generic
>> spatial-relative code is needed, go ahead.
>>
>> As far as database are concerned, another challenge is to offer writable
>> drivers.
>> I tried to implement write capabilities in the
>> org.openjump.core.ui.plugin.datastore
>> package where I also tried to keep generic code and postgis specific
>> code separate.
>> My first idea was that the read/write plugin could replace the read-only
>> plugin in
>> the future, but things are not so simple...
>> You'll make your own opinion, but if you want to improve the API, maybe
>> you'll
>> also have to consider writing capabilities and transactions.
>>
>> Michaël
>>
>> > ok, convinced. go ahead.. ede
>> >
>> > On 16.02.2015 21:01, Nicolas Ribot wrote:
>> >> AFAIK for Geotools, there will be heavy dependences if we want to use
>> it to
>> >> support several spatial database.
>> >> The gt-oracle-spatial.jar, for instance, in the latest geotools release
>> >> depends on at least 10 jars.
>> >>
>> >> What I like in the current OJ code is that geometric object retrieval
>> is
>> >> summarized to its simplest expression:
>> >> query some metadata tables, build a query to get objects, transform
>> objects
>> >> at JDBC level directly.
>> >> For what I see, everything we need is already coded in OJ. With a minor
>> >> refactoring, same logic can be extended to several spatial databases.
>> >>
>> >> My 2 cents ;)
>> >>
>> >> On 16 February 2015 at 20:41, <[email protected]> wrote:
>> >>
>> >>> on the other hand: could you research existing java APIs first. this
>> >>> probably exists already in geotools and others and is maintained. if
>> the
>> >>> size constraint isn't to bi we could use those.
>> >>>
>> >>> ..ede
>> >>>
>> >>> On 16.02.2015 19:57, [email protected] wrote:
>> >>>> ok, a reusable API then. sure, go ahead.. Mike? Larry? ..ede
>> >>>>
>> >>>> On 16.02.2015 19:45, Nicolas Ribot wrote:
>> >>>>> I'm not sure to understand your question.
>> >>>>> I was thinking about about adding base classes in OJ core to allow
>> easy
>> >>>>> spatial database support.
>> >>>>> PostGIS support would stay in core, and other supports could be
>> either
>> >>> in
>> >>>>> extension or in core if JAR licensing allows it.
>> >>>>>
>> >>>>> DB Query could stay as a standalone extension at beginning and be
>> >>>>> integrated to core DB support later.
>> >>>>>
>> >>>>> Nico
>> >>>>>
>> >>>>> On 16 February 2015 at 19:32, <[email protected]> wrote:
>> >>>>>
>> >>>>>> would it make sense to bundle efforts and create the on that rules
>> all
>> >>> db
>> >>>>>> access for OJ, meaning to take the best from DB Query and Postgis
>> >>>>>> datasource and make that into an extension?
>> >>>>>>
>> >>>>>> there is a lot of functionality already there.
>> >>>>>>
>> >>>>>> ..ede
>> >>>>>>
>> >>>>>> On 16.02.2015 19:21, Nicolas Ribot wrote:
>> >>>>>>> Hi all,
>> >>>>>>>
>> >>>>>>> Do you think it would be interesting to have a more generic
>> spatial
>> >>>>>>> databases vector format support in OJ ?
>> >>>>>>>
>> >>>>>>> Playing with DataStore classes to support Oracle Spatial, I saw
>> that
>> >>> it
>> >>>>>>> could be implemented with few efforts:
>> >>>>>>>
>> >>>>>>> Most of spatial databases tend to adhere to OGC Simple Features
>> >>>>>>> Specifications for SQL.
>> >>>>>>> They are accessible through a JDBC Driver providing information
>> about
>> >>>>>>> database metadata (tables, columns, indexes, primary keys, etc.).
>> >>>>>>>
>> >>>>>>> AFAIU, supporting a spatial database involves these steps:
>> >>>>>>> • Retrieving list of spatial tables (through OGC catalog or
>> equivalent
>> >>>>>>> metadata query: could also be done with JDBC DatabaseMetadata by
>> >>> looking
>> >>>>>> at
>> >>>>>>> columns types: maybe an option in the DataStore Layer: "list only
>> >>>>>>> registered tables" or "list all geometric tables")
>> >>>>>>>
>> >>>>>>> • Retrieving name, srid, maybe geo type of the tables' geo columns
>> >>>>>>>
>> >>>>>>> • Retrieving tables extents with a metadata query or a custom
>> query
>> >>> if MD
>> >>>>>>> unavailable
>> >>>>>>>
>> >>>>>>> • Loading geometric objects and converting them to OJ model.
>> >>>>>>>
>> >>>>>>> I was thinking about base classes
>> >>>>>>> (org.openjump.core.ui.plugin.datastore.spatialdatabases)
>> implementing
>> >>>>>> core
>> >>>>>>> functionalities (DatabaseMetadata stuff and queries) and
>> subclasses
>> >>>>>>> providing custom information (JDBC properties, default schema,
>> custom
>> >>>>>>> queries, etc.) for each supported database.
>> >>>>>>>
>> >>>>>>> DB Query plugin showed us that Oracle, Spatialite and MySQL
>> spatial
>> >>>>>> objects
>> >>>>>>> can be efficiently loaded into OJ.
>> >>>>>>>
>> >>>>>>> I was thinking adding support for Oracle Spatial (POC code
>> available
>> >>> in
>> >>>>>> the
>> >>>>>>> SpatialDatabasesPlugin), MySQL/MariaDB, SQL Server, Spatialite.
>> >>>>>>>
>> >>>>>>> Nicolas
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>
>> ------------------------------------------------------------------------------
>> >>>>>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> >>>>>>> from Actuate! Instantly Supercharge Your Business Reports and
>> >>> Dashboards
>> >>>>>>> with Interactivity, Sharing, Native Excel Exports, App
>> Integration &
>> >>> more
>> >>>>>>> Get technology previously reserved for billion-dollar
>> corporations,
>> >>> FREE
>> >>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> _______________________________________________
>> >>>>>>> Jump-pilot-devel mailing list
>> >>>>>>> [email protected]
>> >>>>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> >>>>>>
>> >>>>>>
>> >>>
>> ------------------------------------------------------------------------------
>> >>>>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> >>>>>> from Actuate! Instantly Supercharge Your Business Reports and
>> >>> Dashboards
>> >>>>>> with Interactivity, Sharing, Native Excel Exports, App Integration
>> &
>> >>> more
>> >>>>>> Get technology previously reserved for billion-dollar corporations,
>> >>> FREE
>> >>>>>>
>> >>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
>> >>>>>> _______________________________________________
>> >>>>>> Jump-pilot-devel mailing list
>> >>>>>> [email protected]
>> >>>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> >>>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>
>> ------------------------------------------------------------------------------
>> >>>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> >>>>> from Actuate! Instantly Supercharge Your Business Reports and
>> Dashboards
>> >>>>> with Interactivity, Sharing, Native Excel Exports, App Integration &
>> >>> more
>> >>>>> Get technology previously reserved for billion-dollar corporations,
>> FREE
>> >>>>>
>> >>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
>> >>>>>
>> >>>>>
>> >>>>> _______________________________________________
>> >>>>> Jump-pilot-devel mailing list
>> >>>>> [email protected]
>> >>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> >>>>>
>> >>>
>> >>>
>> ------------------------------------------------------------------------------
>> >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> >>> from Actuate! Instantly Supercharge Your Business Reports and
>> Dashboards
>> >>> with Interactivity, Sharing, Native Excel Exports, App Integration &
>> more
>> >>> Get technology previously reserved for billion-dollar corporations,
>> FREE
>> >>>
>> >>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
>> >>> _______________________________________________
>> >>> Jump-pilot-devel mailing list
>> >>> [email protected]
>> >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> >>>
>> >>
>> >>
>> >>
>> ------------------------------------------------------------------------------
>> >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> >> from Actuate! Instantly Supercharge Your Business Reports and
>> Dashboards
>> >> with Interactivity, Sharing, Native Excel Exports, App Integration &
>> more
>> >> Get technology previously reserved for billion-dollar corporations,
>> FREE
>> >>
>> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
>> >>
>> >>
>> >>
>> >> _______________________________________________
>> >> Jump-pilot-devel mailing list
>> >> [email protected]
>> >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> >>
>> >
>> ------------------------------------------------------------------------------
>> > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> > from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> > with Interactivity, Sharing, Native Excel Exports, App Integration &
>> more
>> > Get technology previously reserved for billion-dollar corporations, FREE
>> >
>> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
>> > _______________________________________________
>> > Jump-pilot-devel mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>> >
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel