OziAPI-Java is a Java library which provides access to the OziExplorer API from Java. OziExplorer is a GPS mapping application which allows you to work with maps on the computer screen. The maps are created from scanned or digital maps.
For details of OziExplorer see the OziExplorer homepage at http://www.oziexplorer3.com.
The documentation for the OziAPI-Java library can be found here, and the library itself can be downloaded from the project page on SourceForge. Also available is the source code, either as a release bundle or via anonymous SVN access.
For details of the underlying API used by this library, see the OziAPI documentation at http://www.oziexplorer3.com/oziapi/oziapi.html
Unlike the underlying OziAPI DLL, OziAPI-Java will accept either lattitude/longitude or grid references as parameters. This makes it very easy to perform coordinate conversions, for example:
BNGGridRef bng = new BNGGridRef("SK 12345 67890");
UTMGridRef utm = new UTMGridRef(bng);
LatLon latLon = new LatLon(bng);
This library also provides full access to all the OziAPI callback functionality - using this part of the OziAPI often causes problems such as random application failures and crashes, a significant proportion of the code in this library is concerned with providing reliable, thread-safe access to the OziAPI callback functionality.
The following applications use OziAPI-Java:
The OziAPI-Java library can be obtained in either binary or source form from the SourceForge project page. Documentation on how to install and use the OziAPI-Java library can be found in the javadoc documentation.
As the OziAPI-Java library consists of both a JAR and DLLs, any NetBeans
projects that use OziAPI-Java need to ensure that the DLLs are copied into the
appropriate locations and that java.library.path is set
appropriately. This can be done by adding a dependency to your project onto
the OziAPI-Java project and then adding the following to the NetBeans build
files in your project:
build.xml
<!-- Copy the OziAPI DLLs into the dist directory -->
<target name="-pre-jar">
<copy todir="dist"><
fileset dir="${project.OziAPI}/dist" includes="*.dll"/>
</copy>
</target>
nbproject/project.properties
# Make sure that Netbeans can find the DLLs when it runs the application.
run-sys-prop.java.library.path=${basedir}/${dist.dir};${java.library.path}
Copyright 2012 Alan Burlison <moc.wolkaelb@nala> All rights reserved. Use is subject to license terms.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ALAN BURLISON "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ALAN BURLISON OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
You can report bugs and request assistance using the facilities provided on the SourceForge project page.
OziAPI-Java uses JNI (C) code to interact with OziExplorer. The library was built using NetBeans as the IDE and the MinGW C compiler. I have written several blog posts on how this is done, I will be collating this into a developer's guide at some point in the future. Contact me through the project page on Sourceforge if you are desperate to get started :-)