GeoTools

OSGeo

Wednesday, January 2, 2019

GeoTools Java 11 Code Sprint Results

With the recent GeoTools 21-M0 Milestone release available for everyone to try out ... we can finally report back on our success at the OSGeo Java 2018 Code Sprint.


References:

Technical Challenge

The secret to a successful code-sprint of this magnitude is preparation and communication. Once we started to get a handle on the challenges involved (thanks to Torben, Andrea, and Jody for initial research) we were able to pull together a plan to work together.

A key technical challenge required repackaging the GeoTools library, an activity we wished to do in conjunction participating projects. Easier to do changes one at time, testing in downstream projects, to catch any issues early.

The sprint broke activities down into several stages.
  1. Stage 1: Build and run in JDK 11
  2. Stage 2: Reduce warnings from dependency analysis tools
  3. Stage 3: Resolve spit-module warnings (and GeoTools Quickstart application can run on the module path)
Early Stage 1 Build and run on JDK 11 results
Stage 1 and Stage 2 got off to a running start with Andrea and Brad spending a lot of time before the sprint setting up java11 branches on all the projects (and almost getting all the builds to go.) Indeed they were well on the way into stage 2 using the automated tools to get lists of dependencies for the team to review.

When updating your own projects:
  • jdeps included in JDK provides static analysis of jars identifying potential issues
  • jsplitpkgscan scans jars looking for 
  • running tests and looking for warnings (only way to catch invalid reflection use)
An example of jdeps output:

jdeps --jdk-internals -R *.jar
ehcache-2.10.3.jar -> jdk.unsupported
   net.sf.ehcache.pool.sizeof.UnsafeSizeOf  -> sun.misc.Unsafe       JDK internal API (jdk.unsupported)
gt-coverage-api-21-SNAPSHOT.jar -> java.desktop
   org.geotools.coverage.io.util.Utilities  -> sun.awt.OSInfo        JDK internal API (java.desktop)
   org.geotools.coverage.io.util.Utilities  -> sun.awt.OSInfo$OSType JDK internal API (java.desktop)

While there were many difficult stage 3 tasks, a quick thanks for Ian Turton updating the version of EMF library used for all our xml parsing/encoding data structures. This is the kind of careful work that when done well nothing breaks, and nobody notices.

What is new

GeoTools is now compatible with Java 11.

All GeoTools modules have an assigned automatic module name and can be used in a Java 11 Jigsaw modular application. The module name is typically the name of the topmost package in the GeoTools module - for example, gt-main has the name org.geotools.main.

For a tutorial on how to use GeoTools modules in Java 11, refer to the Java 11 quickstart.

Note: Our codebase uses target=1.8 for compiling, however if you are building with Java 11 the result will only be usable with Java 11 applications (due to a subtle library change where the system libraries change type narrow the instance they return, the new compiler picks up this making the result unusable on Java 8). We recommend building with Java 8, as the result will run can be used on with both Java 11 and Java 8.

What has changed and how to upgrade

In addition to the usual changes (grabbing newer versions of dependencies) we have had to make some significant changes repackaging the GeoTools library itself:
  • The gt-api jar is no longer provided, the classes formally contained here have been distributed between gt-referencing, gt-metadata and gt-main as appropriate.
  • gt-metadata had several packages changed examples include:
    • Factory moved to org.geotools.util.factory.Factory
    • Hints moved to org.geotools.util.factory.Hints
    • GeoTools moved to org.geotools.util.factory.GeoTools
  • gt-referencing examples:
    • CRSUtilities moved to org.geotools.referencing.util.CRSUtilities
  • gt-main examples:
    • SLDParser moved to org.geotools.xml.styling.SLDParser
    • Many packages were moved to gt-data!
  • gt-coverage examples:
    • CoverageUtilities moved to org.geotools.coverage.util.CoverageUtilities
  • gt-xml examples:
    • GTXML moved to org.geotools.wfs.gtxml.GTXML
  • gt-appschema examples:
    • Many classes moved to gt-complex
As shown above many of the conflicts involved small utility classes so we hope the impact to downstream code will be minimal. Our most deliberated change was deciding which import to break CommonFactoryFinder or Hints. We found slightly more references to CommonFactoryFinder so it remained unchanged!

Our priority for this work was leaving class names unchanged allowing your IDE to quickly correct:
  • IntelliJ delete your import line and use auto-complete the import (Alt-Enter)
  • Eclipse provides the organize imports command (Control-Shift-O) to fix all imports when selecting a file or folder
  • The complete list of changes is on the Stage3 tab of our spreadsheet for any parties wishing to turn this into a search and replace script

What we were unable to address

There is a list of items we were not in position to replace (or warnings we were unable to address):
  • Java Advanced Imaging (jai_codec, jai_core and jai_imageio) depend on java removed internal api. We will need to look at options in 2019.
  • Java Advanced Imaging and ImageIO native implementations were not expected to function in Java 11 as the extension mechanism they used is not longer provided (this is documented in our user guide.) We will continue to use the pure-java implementation of these libraries, indeed improvements in java compilers have gradually eroded the performance advantage of these native libraries.
  • Some functionality (ehcache, and gt-geobuf) depends on jdk.internals access. We will upgrade to new versions of these libraries will be made available.
  • At runtime a few libraries (hsqldb, parboiled) make use of illegal reflective access. This results in some unavoidable warnings in the logs but does not prevent applications from running.
  • We did not hunt down replacements for various testing libraries many of which depend on reflection to get their job done.
  • We looked at dropping gt-opengis as a stretch goal for "stage 4" but had more than enough work to do.

Looking ahead

GeoTools is supporting both Java 8 and Java 11 giving our community a chance to migrate their work to Java 11 when ready.

This has been quite a change of pace for the Java ecosystem:
  • With Java 11 our community is now lead by an open source project, a change we wholeheartedly support.
  • Java 8 continues to be supported we free updates, which is an unexpected and welcome surprise that speaks well for the health of the platform as a whole. Seeing a range of vendors and commercial interests collaborate in a responsible fashion is heartening.
  • The Java platform has a lot more freedom to grow and innovate, with some commercial motivation for improvement. After so many years of stability this will take some getting use to for our development and operational community.
For the GeoTools community we have met this initial challenge and can see where additional work will be needed in the months and years ahead. Thank you for your continued support and happy mapping.

Java 2018 Code Sprint

The code sprint was distributed this year with groups meeting in Europe and North America or remotely coordinating online. The funding priority for this sprint was helping developers with travel costs so we could get as many people together to work together in person as possible.

We would like to thank OSGeo for hosting the event, and our sponsors Gaia3DAstun Technologyatol, and OSGeo:UK.

Showing up to the Party

World wide participants came from a range of organizations or helped out individually. Participating organizations are considered as in-kind support and are deserving our thanks:
In the Boundless Victoria office we arranged perfect gray weather sprinting, with a small bit of sunshine for fish and chips along the docks. A big thanks to James from CCRi and David from Boundless who made the long flight over.

 


We tried not to work the whole time, inviting ourselves over to Martin Davis' house (of dr-jts fame) for a brief away from screen experience.

10 comments:

IT Code Hub said...

Good stuff, thank you :)
itcodehub

Palwasha Khan said...


All the students appeared in the 8th class exams of Lahore Board are informed here that Punjab Examination Commission (PEC) will announce the class 8th pec result on March 31.

Shown Pablo ATM said...

GET YOUR BLANK ATM CARD TODAY!!!

I'm a professional in all kinds of hacking services, which leads me into giving out a blank ATM card to all individuals & serious minded people only. I hack, clone ATM cards worth's the total sum of $500,000.00 United States Dollars, with this card you can withdraw the sum of $3500 as daily limit till you cash out the sum total said sum & this cards has been cloned & hacked in the manner that you'll never be caught not detected during usage. For more info, kindly email us: fastatmhackers@gmail.com OR Call/WhatsApp: +16626183756

Clark Jonathan said...

Do you need an urgent blank ATM CARD to solve your financial needs, My name is Clark Jonathan and i just want to tell the world my experience with everyone. i discovered a hacking guy called Christ. he is really good at what he is doing, i inquired about the BLANK ATM CARD. if it works or even Exist, then i gave it a try and asked for the card and agreed to their terms and conditions. three days later i received my card and tried it with the closest ATM machine close to me, to my greatest surprise it worked like magic. i was able to withdraw up to $4000. This was unbelievable and the happiest day of my life. there is no ATM MACHINES this BLANK ATM CARD CANNOT penetrate into it because it have been programmed with various tools and software. i just felt this might help those of us in need of financial stablilty. christ have really change my life. if you want to contact them, HERE is the email address.blankatmonlinereg@gmail.com.


Here is their price list for ATM CARDS DAILY WITHDRAWAL LIMIT PER DAY FOR 6YEARS

BALANCE PRICE

$5,500----------------$400

$8,800---------------$700

$12,000 ------------- $2200

$20,000 ------------- $3000

$35,000 --------------$5000

$50,000 ------------- $7000

$100,000-------------$10,000

The price include shipping fees,

which of the card do you want dear and how soon do you need the card hurry contact them today no regrets.

janaz said...

Hello Guys.Have you heard about programmed ATM card? We have special cash loaded programmed ATM card for you to start up your own business. Our ATM card can be used to withdraw cash at any ATM or swipe, stores and POS. Our card has daily withdrawal limit depending on the card you order. Contact us now to know our card balance and cost.
CONTACT DETAILS
Email/nashwilliams4@gmail.com
whatsapp/+2349057353987

Frank Hanger said...

HOW TO MAKE $3000 IN A DAY
I've been reluctant in purchasing this blank ATM card i heard about online because everything seems too good to be true, but i was convinced & shocked when my friend at my place of work got the card from mr john & we both confirmed it really works, without delay i gave it a go. Ever since then I've been withdrawing $3000 daily from the card & the money has been in my own account. So glad i gave it a try at last & this card has really changed my life financially without getting caught, its real & truly works all over the world,anywhere you are,though its illegal but made me rich!! If you need this card dont hesitate to contact them through this contact.
Email : cryptoatmhacker@gmail.com

Frank Hanger said...

HOW TO MAKE $3000 IN A DAY
I've been reluctant in purchasing this blank ATM card i heard about online because everything seems too good to be true, but i was convinced & shocked when my friend at my place of work got the card from mr john & we both confirmed it really works, without delay i gave it a go. Ever since then I've been withdrawing $3000 daily from the card & the money has been in my own account. So glad i gave it a try at last & this card has really changed my life financially without getting caught, its real & truly works all over the world,anywhere you are,though its illegal but made me rich!! If you need this card dont hesitate to contact them through this contact.
Email : cryptoatmhacker@gmail.com

Bruce David said...

Hello everyone..Welcome to my free masterclass strategy where i teach experience and inexperience traders the secret behind a successful trade.And how to be profitable in trading I will also teach you how to make a profit of $12,000 USD weekly and how to get back all your lost funds feel free to email me on(brucedavid004@gmail.com) or whataspp number is +22999290178
































Hello everyone..Welcome to my free masterclass strategy where i teach experience and inexperience traders the secret behind a successful trade.And how to be profitable in trading I will also teach you how to make a profit of $12,000 USD weekly and how to get back all your lost funds feel free to email me on(brucedavid004@gmail.com) or whataspp number is +22999290178

Saint Millier said...

GET RICH WITH BLANK ATM CARD ... Whatsapp: +16234044993

I want to testify about Dark Web blank atm cards which can withdraw money from any atm machines around the world. I was very poor before and have no job. I saw so many testimony about how Dark Web hackers send them the atm blank card and use it to collect money in any atm machine and become rich. I email them also and they sent me the blank atm card. I have use it to get 90,000 dollars. withdraw the maximum of 5,000 USD daily. Dark Web is giving out the card just to help the poor. Hack and take money directly from any atm machine vault with the use of atm programmed card which runs in automatic mode.

Email: darkwebblankatmcard@gmail.com
Text or Call or WhatsApp: +16234044993
Website: darkwebblankatmcards.webs.com

Linda Gibson said...

REAL AND GENUINE ONLINE LOVE SPELL CASTER TO BRING EX LOVER URGENTLY CALL OR WHATSAPP +2348118829899

I want to use this opportunity I have to say a big thanks to Dr Great for getting back my ex husband. I’m Linda Gibson from USA, after 7 years of marriage my husband left me for another woman I did whatever I could to get him back but all I did was in vain I was sad, but I didn’t lose hope of getting him back because I had faith in God. So I search online on how to get my husband back, and I came across a post of Dr Great of how he helped a lady to get back her ex, I contacted him and told him the pain I was going through, he told me what to do and I did it, then he casted a love spell for me 48 hours later my husband called me and told me he is sorry for what he did and that he misses me very much, later that day he came back home and beg for my forgiveness, since then our love grew stronger. For the marvelous things Dr Great has done for me it would be unfair for me not to let the whole world know that such a powerful spell caster do live. If you want to get back your ex fast email Dr Great at infinitylovespell@gmail.com or infinitylovespell@yahoo.com or add him up on WhatsApp +2348118829899 Blog: lindagibson90.blogspot.comview his website http://infinitylovespell.website2.me/

Post a Comment