SlideShare a Scribd company logo
1 of 82
Download to read offline
Geospatial For Java
Introduction to GIS for the Java Developer
Care and Feeding Instructions
1. Connect to GSI, Credentials: ticket846 / cm52n
2. Download links provided or USB being passed around
3. Coffee / water are over -->
4. Washrooms end of hall on the left
2
GeoSpatial for Java
• This is a quick introduction to Geospatial
concepts and ideas for the Java developer
• We will make use of number of Java projects
• However the focus is on the ideas

(we just happen to be using running code)
3
Schedule
4
Introduction
Quickstart 30 min
Feature 25 min
Geometry and CRS 25 min
Filter 25 min
Image 25 min
Cover Processor 25 min
Style 25 min
Welcome
5
Jody Garnett
Community Lead
jgarnett@boundlessgeo.com
@jodygarnett
Open Source Geospatial Foundation
Board Member
OSGeo Incubation Chair
GeoTools Project Officer
Eclipse Foundation
LocationTech Project Steering Committee
LocationTech Technology Project
Boundless
Boundless provides geospatial tools and
services for managing data and building
applications.
Open Source Projects
GeoTools
GeoServer
uDig
Welcome
6
Devon Tucker
Software Engineer
dtucker@boundlessgeo.com
github.com/dvntucker
Open Source Geospatial Foundation
GeoTools Committer (as of last week!)
Boundless
Boundless provides geospatial tools and
services for managing data and building
applications.
Open Source Projects
GeoTools
TomightyOSX
Geographic Information Systems
Geographic Information Systems
Humans have been doing this for a long time
Cave Art or map to the best hunting ground?
8
Distance
A common theme is representation of walking time rather
than distance. Allows map to be used as a planning tool.
9
Navigation and Problem Solving
Polynesian stick maps
Used for navigating in the pacific ocean.
Depicted islands, wave patterns and current direction
10
Problem Solving
1854 Broad Street cholera outbreak
Source of outbreak found by mapping cases of cholera
John Snow discovered that victims all used the same water
source
11
GeoTools
The Java GIS Toolkit
GeoTools
Open Source
LGPL
Open Development
Public Process
Anyone can Play
1994 - Present
Really old for Java
Started in Leads University
OSGeo Project in 2006
Active / Diverse committers
13
GeoTools 1
GeoTools 1 had more users then documentation
Solution was to fire the users
... and GeoTools 2 was formed
14
GeoTools 2
We learned our lesson!
GeoTools 2 leans on the OGC standards
OGC provides public standards anyone can download
Easier to follow standards than having to invent names
So the “best” docs are often the standards
Standards are not intended to as a limitation
Only a common starting point
Get it Done
15
GeoTools and Collaboration
The project practices “open development”
Easy to take part
However we are LGPL so we get lots of forks

(mostly buried in commercial apps)
In the spirit of “Get it Done”
We make use of existing projects early and often
This is the DRY “Do not repeat yourself” principle in action
16
GeoTools and Jars
We will introduce these other projects as we go
using code as often as possible
This does however mean that we will use a lot of jars
Maven is the tool we use to manage jars
Do you use maven for your project?
17
GeoTools Architecture
18
Quickstart
This is Hands On Programming
1. Pair up with a friend (or make a new friend)
2. There is a USB stick if needed
3. Copy the “GeospatialForJava” folder
4. We are going to begin with the “QuickStart” workbook
20
+
Development Environment
21
Use Eclipse Maven Support
(or Download Jars)
Use NetBeans Maven Support
(or Download Jars)
Use Maven Directly
Quickstart
1. Start when ready
2. We have around 30 mins
3. Choose Dev Environment
22
Workbook provides download links;
or copy from the USB.
1. geotools-userguide.zip
2. navigate to tutorials
Optional: advanced maven magic:
1. cd home directory “.m2“ folder
2. unzip repository.zip
Feature
What is a Feature (English)
• Feature is a prominent or conspicuous part or
characteristic
–When drawing a person you will often draw the features
of a persons face (nose, ears, eyes, mouth)
–When drawing a map we draw the features that make
up the landscape
• When mapping a real world object
–We draw the shape (the Geometry)
–We also record where the object is
24
What is a Feature (Illustration)
25
A Feature is an Object
• A Feature is an Object (ie “instance”)
• Works just like an Object (ie an “instance”) as a
representation of an entity in the real world
26
GeometryFactory geomFactory =
JTSFactoryFinder.getGeometryFactory();
Flag here = new Flag();
here.location = geomFactory.createPoint(new Coordinate(23.3,-37.2));
here.name = "Here";
here.classification = 3;
here.height = 2.0;
A Feature is an Object
• Record information about the real world entity
• Feature properties record information
• properties are either attribute or association
27
GeometryFactory geomFactory =
JTSFactoryFinder.getGeometryFactory();
SimpleFeatureBuilder f = new SimpleFeatureBuilder( type );
f.add( geomFactory.createPoint( new Coordinate(23.3,-37.2) ) );
f.add("here");
f.add(3);
f.add(2.0);
SimpleFeature feature = f.buildFeature("fid.1");
FeatureType
• Group several features that are similar into
classes and form these classes into a hierarchy
–Feature Type is a “class”
• Like Objects, features can be ideas or concepts
(like a “urban growth” or rainfall)
28
class Flag {
public Point location;
public String name;
public int classification;
public double height;
};
FeatureType
• Like Objects, features can be ideas or concepts
(like a “urban growth” or rainfall)
29
SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder();
b.setName( "Flag" );
b.setCRS( DefaultGeographicCRS.WGS84 );
b.add( "location", Point.class );
b.add( "name", String.class );
b.add( "classification", Integer.class );
b.add( "height", Double.class );
SimpleFeatureType type = b.buildFeatureType();
Feature Cheat-sheet
30
Geospatial

(dynamic type system)
Java

(static type system)
Feature Object
Attribute Field
Operation Method
FeatureType Class
Properties {
Feature Model
31
• Lots of ways to access attributes
• “SimpleFeature” for flat record data structure
org.opengis
• Summary
–org.opengis.* defines the Interfaces
–org.geotools.* implements the Objects
• Win:
–javadocs are easier than reading standards
–Now an “OGC GeoAPI” working group
• Fail:
–“opengis” was an attempt to promote collaboration
between deegree and GeoTools projects
–Failed as both parties need funding at the same time
32
Feature Workbook
• 25 minutes
• Great example of

building features by hand
• Data Model
–Feature, FeatureType
• Data Acess
–DataStore
–FeatureSource
–FeatureStore
33
Geometry and CRS
Fundamental Requirement of GIS
• We need both:
–The shape to draw (ie the Geometry)
–The location to draw the shape in
35
JTS Topology Suite
• Geometry is provided by the JTS project
–Implementation of OGC “Simple Features for SQL”
–Numerically stable, the rocket science of GIS

foundation of our open source spatial industry
• Team made up of a single Canadian developer
–Martin Davis
36
Geometry - Port
• In the beginning…
–Point
–A single coordinate of two to four dimensions
37
GeometryFactory and WKT
38
GeometryFactory geometryFactory =

JTSFactoryFinder.getGeometryFactory();
Coordinate coord = new Coordinate(151.211111, -33.859972 );
Point point = geometryFactory.createPoint( coord );
GeometryFactory geometryFactory =
JTSFactoryFinder.getGeometryFactory();
WKTReader reader = new WKTReader( geometryFactory );
String wkt = "POINT (151.211111, -33.859972)";
Point point = (Point) reader.read( wkt );
Geometry - LineString
39
• A set of two of more coordinates linear
interpretation of a path between coordinates
• Translation:
–Java String is a “string of characters”
–LineString is a string of straight line segments
Geometry - Polygon
40
• A set of one or more linestrings
–One ring defines the exterior boundary
–The remaining rings define the “holes” in the polygon
• Represents an Area
Coverage
• Coverage represent an area with a function:
–feature: used to record an attribute value for an area
–coverage: used to record an attribute whose value
changes across an area (Land use, Soil types, Zones)
41
What is the Point?
• Geometry is the shape of our “feature”
• We are still missing an important bit of
information
–“Where” the feature is!
• This is similar to the idea of “distance”
–Q: how far?
–A: 3



We really need to know 3 “what”
• The units of distance are important
• We really need the meaning of a shape
42
Coordinate
• Coordinate –ordered list of measurements
–X / Y
–Latitude / Longitude
–Longitude / Latitude
• An important part is defining what is being
measured
–Latitude and Longitude in degrees
–Distances measured in meters
43
Coordinate coord = new Coordinate(151.211111, -33.859972 );
Coordinate Reference System
• CRS is the definition of what coordinates are
measuring
–Positions are always in 3D space
–We often “cheat” and only write down two numbers

(the ordinates in co-ordinates)
• How is this possible?
–We treat the numbers as measurements against a
model of the earth
• Earth model? (ie Geodetic Datum)
–Ellipsoid – shape kind of like a sphere
–Geoid – gravity field – kind of like sea level
44
Where to measure from?
45
Easy to measure on a flat surface
Not as easy to measure on a curve
Lat / Lon
46
Latitude
degrees north or south of the Equator
Longitude
degrees east/west of the Prime Meridian
Warning: Axis Order Issue
47
• Map makers record northing/easting order
– Sextant allows you to measure the angle of north star
• Computer systems expect x/y order
• But the map makers never really agreed
–So there is confusion
–You need to check the data
Feature and Geometry Standards
48
Simple
Point
Line
Polygon
Standards
GML2
SFSQL
Implementation
JTS
Complex
Point
Curve
Surface
Standards
GML3
ISO19107
Implementation
data structure only
Geometry CRS Workbook
49
• 25 minutes
–A chance to work with
Geometry
• Use MathTransform
• Process Features
–EPSG:32751 EPSG:
32656
Filter
Filter used to Select information
• Filter is used as part of a Query
–to “select” information
–Think of it as the WHERE clause in an SQL statement
• You can run the resulting Filter object yourself
• Uses “Filter Expressions” used to access data
• Filter / Expressions work with Feature and
POJOs
51
if( filter.evaluate( feature ) ){
// the feature was "selected" by the filter
System.out.println( "Selected "+ feature.getId();
}
Filter is defined by an XML specification (for web standards).
SAX, DOM and dynamic parsing solutions available.
Filter as XML
52
<Filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns="http://www.opengis.net/ogc"
xsi:schemaLocation="http://www.opengis.net/ogc filter.xsd">
<PropertyIsEqualTo>
<PropertyName>land_code</PropertyName>
<Literal>2</Literal>
</PropertyIsEqualTo>
</Filter>
Filter as CQL (text DSL)
Constraint Query Language (from library science actually).
Utility class provides: CQL.toFilter( cql )
53
Filter filter = CQL.toFilter("area( SHAPE ) BETWEEN 1000 AND 3000");
Filter as Java
Finally you can use a FilterFactory directly.
54
FilterFactory ff = CommonFactoryFinder.getFilterFactory();
Filter filter = ff.propertyLessThan( ff.property( "AGE"), ff.literal( 12 ) );
Query Tutorial
• This is where it gets cool
• Ad hoc query against

Shapefile, PostGIS, WFS
• Using the same code
55
Raster Data
Grid Coverage
• Representing a Coverage
–collection of features that “complete cover an area”
–grid coverage form a regular grid of features
57
Coverage
Feature

Coverage
Grid Coverage
Measurements not Pixels
• Grid Coverages used to record measurements
• The file metadata describes what the values are
–Height (called a Digital Elevation Model or DEM)
–Height and Depth – Bathymetry
–Vegetation Index
–Some have RGB measurements
58
Raster Formats
• GridCoverages look so much like “pixels” we end
up using the same file formats (jpeg, png, tiff,
etc..) with a text file for location
• Spatial formats record (geotiff, eww)
–resolution of the grid
–the measurements associated with each location
–the location of the grid in the real world
59
Image Tutorial
• 25 minutes
• Working with raster files
• Grayscale, Color, Multi-
band
60
Image Processor
Raster Operations
• Direct use of GridCoverage
–Extract set of records at a specific location
• Simple Operations
–Crop - trim to a geographic bounding box or envelope
–Scale - increase / decrease size
–Resample - ad-hoc sampling, such as reprojection
• Operations class
–Facade class to make this easier to program
–CoverageProcessor performs the operations internally
–Operations form a chain, lazy evaluation
62
Coverage Processor Tutorial
• 25 minutes
• Using raster operations
• Image input/output
• Tile Generation
63
Style
Style
• Cartography is the practice of map making
• Focus on purpose
–What is the map trying to communicate?
–Who will be using it?
–What projection, scale and symbology are best?
65
Cartography - Scale
• Scale
–Appropriate for task at hand(floor plan vs interstate)
• Graphical Representation of Scale
–1:25000 is not sufficient
–graphical representation works when altered /printed
66
Cartography - Projection
• Choosing projection is hard
–Equal area to measure distance
–WGS84 to show entire world
–“google” projection for speed?
67
Cartography - Symbology
• Choose appropriate symbols for audience
• Is the audience trained to read the symbols?
–MIL2525B symbols for tactical response
–Happy Face for planning lunch
68
Surface and Hostile
Planned
-=Reduced
North Direction
East Direction
Velocity = Red
Task Force – No
Quantity – 9
Nuclear - Yes
Happy
Cartography - Colour
• Colour also is dependent on audience
• Device makes a difference
–Projector cannot display as much colour as screen
–Will the map be photocopied?
• People make a difference
–may be colourblind
–may be using the map in bright sunlight or at night
• ColorBrewer
–http://colorbrewer2.org/
–Color brewer palettes built-in toGeoTools
69
Colour - Qualitative
• Values represent qualities of your data
–Use colour to tell values apart
–The colour should have the same “impact”
• Each groups has the same

importance.
70
Colour - Sequential
• Values represent an ordered series
–Use colour to tell values apart
–Use colour to tell “how close” values are
• The amount of colour directly reflects the value
71
Colour - Diverging
• Values once again form a sequence
–Use colour to tell values apart
–Use colour to identify extreme values
• amount of colour emphasises low and high
values 

72
MapContent and Style
• MapContent
–Layer – data and style used to draw
• StyleLayerDescriptor
–FeatureTypeStyle – instructions for how to draw
features
–Rule – choose which features
• PolygonSymbolizer
• PointSymbolizer
• LineSymbolizer
• TextSymbolizer
• RasterSymbolizer
73
Style Layer Descriptor (SLD)
• XML File format used to configure WMS servers
• We are mostly going to ignore this bit
74
Symbology Encoding (SE)
• Just the part of SLD that controls rendering
75
Rendering Process
76
Style Tutorial
77
• Create Style
–Using a simple dialog
–From an XML file
–By hand
• Create style from
selection
Much More
Extensions & Unsupported Modules
• Graph module
–Shortest route
• Web Formats
–GML
–GeoJson
–SVG
• Process
–Ready to use Functionality
–RasterToVector
79
Advanced Tutorials
• Integration and

Customization
80
Questions
Thanks

More Related Content

Similar to Geospatial for Java

LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech ProjectsJody Garnett
 
managing georeferenced content with Plone and collective.geo
managing georeferenced content with Plone and collective.geomanaging georeferenced content with Plone and collective.geo
managing georeferenced content with Plone and collective.geogborelli
 
Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)Ranel Padon
 
State of GeoTools 2012
State of GeoTools 2012State of GeoTools 2012
State of GeoTools 2012Jody Garnett
 
My experience and suggestions as a web-GIS developer
My experience and suggestions as a web-GIS developerMy experience and suggestions as a web-GIS developer
My experience and suggestions as a web-GIS developerTek Kshetri
 
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"Fwdays
 
2016-01 Lucene Solr spatial in 2015, NYC Meetup
2016-01 Lucene Solr spatial in 2015, NYC Meetup2016-01 Lucene Solr spatial in 2015, NYC Meetup
2016-01 Lucene Solr spatial in 2015, NYC MeetupDavid Smiley
 
Lucene/Solr Spatial in 2015: Presented by David Smiley
Lucene/Solr Spatial in 2015: Presented by David SmileyLucene/Solr Spatial in 2015: Presented by David Smiley
Lucene/Solr Spatial in 2015: Presented by David SmileyLucidworks
 
Pg intro part1-theory_slides
Pg intro part1-theory_slidesPg intro part1-theory_slides
Pg intro part1-theory_slideslasmasi
 
Building Location Aware Apps - Get Started with PostGIS, PART I
Building Location Aware Apps - Get Started with PostGIS, PART IBuilding Location Aware Apps - Get Started with PostGIS, PART I
Building Location Aware Apps - Get Started with PostGIS, PART Ilasmasi
 
Lucene solr 4 spatial extended deep dive
Lucene solr 4 spatial   extended deep diveLucene solr 4 spatial   extended deep dive
Lucene solr 4 spatial extended deep divelucenerevolution
 
李俊良/Feature Engineering in Machine Learning
李俊良/Feature Engineering in Machine Learning李俊良/Feature Engineering in Machine Learning
李俊良/Feature Engineering in Machine Learning台灣資料科學年會
 
LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech ProjectsJody Garnett
 
GeoDataspace: Simplifying Data Management Tasks with Globus
GeoDataspace: Simplifying Data Management Tasks with GlobusGeoDataspace: Simplifying Data Management Tasks with Globus
GeoDataspace: Simplifying Data Management Tasks with GlobusTanu Malik
 
Lucene/Solr spatial in 2015
Lucene/Solr spatial in 2015Lucene/Solr spatial in 2015
Lucene/Solr spatial in 2015David Smiley
 
Scaling Stack Overflow (QCon NYC 2015)
Scaling Stack Overflow (QCon NYC 2015)Scaling Stack Overflow (QCon NYC 2015)
Scaling Stack Overflow (QCon NYC 2015)dfullerton
 
Getting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDBGetting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDBMongoDB
 
Middleware for indoor location-based services
Middleware for indoor location-based servicesMiddleware for indoor location-based services
Middleware for indoor location-based servicesDaniele Miorandi
 

Similar to Geospatial for Java (20)

LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech Projects
 
managing georeferenced content with Plone and collective.geo
managing georeferenced content with Plone and collective.geomanaging georeferenced content with Plone and collective.geo
managing georeferenced content with Plone and collective.geo
 
State of JTS 2017
State of JTS 2017State of JTS 2017
State of JTS 2017
 
Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)Of Nodes and Maps (Web Mapping with Drupal - Part II)
Of Nodes and Maps (Web Mapping with Drupal - Part II)
 
State of GeoTools 2012
State of GeoTools 2012State of GeoTools 2012
State of GeoTools 2012
 
My experience and suggestions as a web-GIS developer
My experience and suggestions as a web-GIS developerMy experience and suggestions as a web-GIS developer
My experience and suggestions as a web-GIS developer
 
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"
Алексей Ященко и Ярослав Волощук "False simplicity of front-end applications"
 
2016-01 Lucene Solr spatial in 2015, NYC Meetup
2016-01 Lucene Solr spatial in 2015, NYC Meetup2016-01 Lucene Solr spatial in 2015, NYC Meetup
2016-01 Lucene Solr spatial in 2015, NYC Meetup
 
Lucene/Solr Spatial in 2015: Presented by David Smiley
Lucene/Solr Spatial in 2015: Presented by David SmileyLucene/Solr Spatial in 2015: Presented by David Smiley
Lucene/Solr Spatial in 2015: Presented by David Smiley
 
Pg intro part1-theory_slides
Pg intro part1-theory_slidesPg intro part1-theory_slides
Pg intro part1-theory_slides
 
Building Location Aware Apps - Get Started with PostGIS, PART I
Building Location Aware Apps - Get Started with PostGIS, PART IBuilding Location Aware Apps - Get Started with PostGIS, PART I
Building Location Aware Apps - Get Started with PostGIS, PART I
 
Lucene solr 4 spatial extended deep dive
Lucene solr 4 spatial   extended deep diveLucene solr 4 spatial   extended deep dive
Lucene solr 4 spatial extended deep dive
 
李俊良/Feature Engineering in Machine Learning
李俊良/Feature Engineering in Machine Learning李俊良/Feature Engineering in Machine Learning
李俊良/Feature Engineering in Machine Learning
 
LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech Projects
 
GeoDataspace: Simplifying Data Management Tasks with Globus
GeoDataspace: Simplifying Data Management Tasks with GlobusGeoDataspace: Simplifying Data Management Tasks with Globus
GeoDataspace: Simplifying Data Management Tasks with Globus
 
Lucene/Solr spatial in 2015
Lucene/Solr spatial in 2015Lucene/Solr spatial in 2015
Lucene/Solr spatial in 2015
 
Geo Location Initial PoC
Geo Location Initial PoCGeo Location Initial PoC
Geo Location Initial PoC
 
Scaling Stack Overflow (QCon NYC 2015)
Scaling Stack Overflow (QCon NYC 2015)Scaling Stack Overflow (QCon NYC 2015)
Scaling Stack Overflow (QCon NYC 2015)
 
Getting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDBGetting Started with Geospatial Data in MongoDB
Getting Started with Geospatial Data in MongoDB
 
Middleware for indoor location-based services
Middleware for indoor location-based servicesMiddleware for indoor location-based services
Middleware for indoor location-based services
 

More from Jody Garnett

GeoServer Orientation
GeoServer OrientationGeoServer Orientation
GeoServer OrientationJody Garnett
 
Open Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeoOpen Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeoJody Garnett
 
Introduction to OSGeo
Introduction to OSGeoIntroduction to OSGeo
Introduction to OSGeoJody Garnett
 
Open Source Procurement
Open Source ProcurementOpen Source Procurement
Open Source ProcurementJody Garnett
 
Java Image Processing for Geospatial Community
Java Image Processing for Geospatial CommunityJava Image Processing for Geospatial Community
Java Image Processing for Geospatial CommunityJody Garnett
 
Open Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeoOpen Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeoJody Garnett
 
Open Source is hard, we are here to help!
Open Source is hard, we are here to help!Open Source is hard, we are here to help!
Open Source is hard, we are here to help!Jody Garnett
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers WorkshopJody Garnett
 
GeoServer Ecosystem 2018
GeoServer Ecosystem 2018GeoServer Ecosystem 2018
GeoServer Ecosystem 2018Jody Garnett
 
State of GeoServer 2.14
State of GeoServer 2.14State of GeoServer 2.14
State of GeoServer 2.14Jody Garnett
 
Working with the OSGeo Community
Working with the OSGeo CommunityWorking with the OSGeo Community
Working with the OSGeo CommunityJody Garnett
 
State of GeoServer 2.13
State of GeoServer 2.13State of GeoServer 2.13
State of GeoServer 2.13Jody Garnett
 
Open Data and Open Software Geospatial Applications
Open Data and Open Software Geospatial ApplicationsOpen Data and Open Software Geospatial Applications
Open Data and Open Software Geospatial ApplicationsJody Garnett
 
Map box styles in GeoServer and OpenLayers
Map box styles in GeoServer and OpenLayersMap box styles in GeoServer and OpenLayers
Map box styles in GeoServer and OpenLayersJody Garnett
 
Quick and easy web maps
Quick and easy web mapsQuick and easy web maps
Quick and easy web mapsJody Garnett
 
Incubation Orientation
Incubation OrientationIncubation Orientation
Incubation OrientationJody Garnett
 

More from Jody Garnett (20)

GeoServer Orientation
GeoServer OrientationGeoServer Orientation
GeoServer Orientation
 
Open Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeoOpen Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeo
 
Introduction to OSGeo
Introduction to OSGeoIntroduction to OSGeo
Introduction to OSGeo
 
Open Source Procurement
Open Source ProcurementOpen Source Procurement
Open Source Procurement
 
Java Image Processing for Geospatial Community
Java Image Processing for Geospatial CommunityJava Image Processing for Geospatial Community
Java Image Processing for Geospatial Community
 
State of JTS 2018
State of JTS 2018State of JTS 2018
State of JTS 2018
 
Open Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeoOpen Source Practice and Passion at OSGeo
Open Source Practice and Passion at OSGeo
 
Open Source is hard, we are here to help!
Open Source is hard, we are here to help!Open Source is hard, we are here to help!
Open Source is hard, we are here to help!
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
 
GeoServer Ecosystem 2018
GeoServer Ecosystem 2018GeoServer Ecosystem 2018
GeoServer Ecosystem 2018
 
State of GeoServer 2.14
State of GeoServer 2.14State of GeoServer 2.14
State of GeoServer 2.14
 
OSGeo AGM 2018
OSGeo AGM 2018OSGeo AGM 2018
OSGeo AGM 2018
 
Working with the OSGeo Community
Working with the OSGeo CommunityWorking with the OSGeo Community
Working with the OSGeo Community
 
State of GeoServer 2.13
State of GeoServer 2.13State of GeoServer 2.13
State of GeoServer 2.13
 
Open Data and Open Software Geospatial Applications
Open Data and Open Software Geospatial ApplicationsOpen Data and Open Software Geospatial Applications
Open Data and Open Software Geospatial Applications
 
Map box styles in GeoServer and OpenLayers
Map box styles in GeoServer and OpenLayersMap box styles in GeoServer and OpenLayers
Map box styles in GeoServer and OpenLayers
 
Quick and easy web maps
Quick and easy web mapsQuick and easy web maps
Quick and easy web maps
 
State of GeoGig
State of GeoGigState of GeoGig
State of GeoGig
 
OSGeo AGM 2017
OSGeo AGM 2017OSGeo AGM 2017
OSGeo AGM 2017
 
Incubation Orientation
Incubation OrientationIncubation Orientation
Incubation Orientation
 

Recently uploaded

Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxPurva Nikam
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 

Recently uploaded (20)

Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptx
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 

Geospatial for Java

  • 1. Geospatial For Java Introduction to GIS for the Java Developer
  • 2. Care and Feeding Instructions 1. Connect to GSI, Credentials: ticket846 / cm52n 2. Download links provided or USB being passed around 3. Coffee / water are over --> 4. Washrooms end of hall on the left 2
  • 3. GeoSpatial for Java • This is a quick introduction to Geospatial concepts and ideas for the Java developer • We will make use of number of Java projects • However the focus is on the ideas
 (we just happen to be using running code) 3
  • 4. Schedule 4 Introduction Quickstart 30 min Feature 25 min Geometry and CRS 25 min Filter 25 min Image 25 min Cover Processor 25 min Style 25 min
  • 5. Welcome 5 Jody Garnett Community Lead jgarnett@boundlessgeo.com @jodygarnett Open Source Geospatial Foundation Board Member OSGeo Incubation Chair GeoTools Project Officer Eclipse Foundation LocationTech Project Steering Committee LocationTech Technology Project Boundless Boundless provides geospatial tools and services for managing data and building applications. Open Source Projects GeoTools GeoServer uDig
  • 6. Welcome 6 Devon Tucker Software Engineer dtucker@boundlessgeo.com github.com/dvntucker Open Source Geospatial Foundation GeoTools Committer (as of last week!) Boundless Boundless provides geospatial tools and services for managing data and building applications. Open Source Projects GeoTools TomightyOSX
  • 8. Geographic Information Systems Humans have been doing this for a long time Cave Art or map to the best hunting ground? 8
  • 9. Distance A common theme is representation of walking time rather than distance. Allows map to be used as a planning tool. 9
  • 10. Navigation and Problem Solving Polynesian stick maps Used for navigating in the pacific ocean. Depicted islands, wave patterns and current direction 10
  • 11. Problem Solving 1854 Broad Street cholera outbreak Source of outbreak found by mapping cases of cholera John Snow discovered that victims all used the same water source 11
  • 13. GeoTools Open Source LGPL Open Development Public Process Anyone can Play 1994 - Present Really old for Java Started in Leads University OSGeo Project in 2006 Active / Diverse committers 13
  • 14. GeoTools 1 GeoTools 1 had more users then documentation Solution was to fire the users ... and GeoTools 2 was formed 14
  • 15. GeoTools 2 We learned our lesson! GeoTools 2 leans on the OGC standards OGC provides public standards anyone can download Easier to follow standards than having to invent names So the “best” docs are often the standards Standards are not intended to as a limitation Only a common starting point Get it Done 15
  • 16. GeoTools and Collaboration The project practices “open development” Easy to take part However we are LGPL so we get lots of forks
 (mostly buried in commercial apps) In the spirit of “Get it Done” We make use of existing projects early and often This is the DRY “Do not repeat yourself” principle in action 16
  • 17. GeoTools and Jars We will introduce these other projects as we go using code as often as possible This does however mean that we will use a lot of jars Maven is the tool we use to manage jars Do you use maven for your project? 17
  • 20. This is Hands On Programming 1. Pair up with a friend (or make a new friend) 2. There is a USB stick if needed 3. Copy the “GeospatialForJava” folder 4. We are going to begin with the “QuickStart” workbook 20 +
  • 21. Development Environment 21 Use Eclipse Maven Support (or Download Jars) Use NetBeans Maven Support (or Download Jars) Use Maven Directly
  • 22. Quickstart 1. Start when ready 2. We have around 30 mins 3. Choose Dev Environment 22 Workbook provides download links; or copy from the USB. 1. geotools-userguide.zip 2. navigate to tutorials Optional: advanced maven magic: 1. cd home directory “.m2“ folder 2. unzip repository.zip
  • 24. What is a Feature (English) • Feature is a prominent or conspicuous part or characteristic –When drawing a person you will often draw the features of a persons face (nose, ears, eyes, mouth) –When drawing a map we draw the features that make up the landscape • When mapping a real world object –We draw the shape (the Geometry) –We also record where the object is 24
  • 25. What is a Feature (Illustration) 25
  • 26. A Feature is an Object • A Feature is an Object (ie “instance”) • Works just like an Object (ie an “instance”) as a representation of an entity in the real world 26 GeometryFactory geomFactory = JTSFactoryFinder.getGeometryFactory(); Flag here = new Flag(); here.location = geomFactory.createPoint(new Coordinate(23.3,-37.2)); here.name = "Here"; here.classification = 3; here.height = 2.0;
  • 27. A Feature is an Object • Record information about the real world entity • Feature properties record information • properties are either attribute or association 27 GeometryFactory geomFactory = JTSFactoryFinder.getGeometryFactory(); SimpleFeatureBuilder f = new SimpleFeatureBuilder( type ); f.add( geomFactory.createPoint( new Coordinate(23.3,-37.2) ) ); f.add("here"); f.add(3); f.add(2.0); SimpleFeature feature = f.buildFeature("fid.1");
  • 28. FeatureType • Group several features that are similar into classes and form these classes into a hierarchy –Feature Type is a “class” • Like Objects, features can be ideas or concepts (like a “urban growth” or rainfall) 28 class Flag { public Point location; public String name; public int classification; public double height; };
  • 29. FeatureType • Like Objects, features can be ideas or concepts (like a “urban growth” or rainfall) 29 SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder(); b.setName( "Flag" ); b.setCRS( DefaultGeographicCRS.WGS84 ); b.add( "location", Point.class ); b.add( "name", String.class ); b.add( "classification", Integer.class ); b.add( "height", Double.class ); SimpleFeatureType type = b.buildFeatureType();
  • 30. Feature Cheat-sheet 30 Geospatial
 (dynamic type system) Java
 (static type system) Feature Object Attribute Field Operation Method FeatureType Class Properties {
  • 31. Feature Model 31 • Lots of ways to access attributes • “SimpleFeature” for flat record data structure
  • 32. org.opengis • Summary –org.opengis.* defines the Interfaces –org.geotools.* implements the Objects • Win: –javadocs are easier than reading standards –Now an “OGC GeoAPI” working group • Fail: –“opengis” was an attempt to promote collaboration between deegree and GeoTools projects –Failed as both parties need funding at the same time 32
  • 33. Feature Workbook • 25 minutes • Great example of
 building features by hand • Data Model –Feature, FeatureType • Data Acess –DataStore –FeatureSource –FeatureStore 33
  • 35. Fundamental Requirement of GIS • We need both: –The shape to draw (ie the Geometry) –The location to draw the shape in 35
  • 36. JTS Topology Suite • Geometry is provided by the JTS project –Implementation of OGC “Simple Features for SQL” –Numerically stable, the rocket science of GIS
 foundation of our open source spatial industry • Team made up of a single Canadian developer –Martin Davis 36
  • 37. Geometry - Port • In the beginning… –Point –A single coordinate of two to four dimensions 37
  • 38. GeometryFactory and WKT 38 GeometryFactory geometryFactory =
 JTSFactoryFinder.getGeometryFactory(); Coordinate coord = new Coordinate(151.211111, -33.859972 ); Point point = geometryFactory.createPoint( coord ); GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(); WKTReader reader = new WKTReader( geometryFactory ); String wkt = "POINT (151.211111, -33.859972)"; Point point = (Point) reader.read( wkt );
  • 39. Geometry - LineString 39 • A set of two of more coordinates linear interpretation of a path between coordinates • Translation: –Java String is a “string of characters” –LineString is a string of straight line segments
  • 40. Geometry - Polygon 40 • A set of one or more linestrings –One ring defines the exterior boundary –The remaining rings define the “holes” in the polygon • Represents an Area
  • 41. Coverage • Coverage represent an area with a function: –feature: used to record an attribute value for an area –coverage: used to record an attribute whose value changes across an area (Land use, Soil types, Zones) 41
  • 42. What is the Point? • Geometry is the shape of our “feature” • We are still missing an important bit of information –“Where” the feature is! • This is similar to the idea of “distance” –Q: how far? –A: 3
 
 We really need to know 3 “what” • The units of distance are important • We really need the meaning of a shape 42
  • 43. Coordinate • Coordinate –ordered list of measurements –X / Y –Latitude / Longitude –Longitude / Latitude • An important part is defining what is being measured –Latitude and Longitude in degrees –Distances measured in meters 43 Coordinate coord = new Coordinate(151.211111, -33.859972 );
  • 44. Coordinate Reference System • CRS is the definition of what coordinates are measuring –Positions are always in 3D space –We often “cheat” and only write down two numbers
 (the ordinates in co-ordinates) • How is this possible? –We treat the numbers as measurements against a model of the earth • Earth model? (ie Geodetic Datum) –Ellipsoid – shape kind of like a sphere –Geoid – gravity field – kind of like sea level 44
  • 45. Where to measure from? 45 Easy to measure on a flat surface Not as easy to measure on a curve
  • 46. Lat / Lon 46 Latitude degrees north or south of the Equator Longitude degrees east/west of the Prime Meridian
  • 47. Warning: Axis Order Issue 47 • Map makers record northing/easting order – Sextant allows you to measure the angle of north star • Computer systems expect x/y order • But the map makers never really agreed –So there is confusion –You need to check the data
  • 48. Feature and Geometry Standards 48 Simple Point Line Polygon Standards GML2 SFSQL Implementation JTS Complex Point Curve Surface Standards GML3 ISO19107 Implementation data structure only
  • 49. Geometry CRS Workbook 49 • 25 minutes –A chance to work with Geometry • Use MathTransform • Process Features –EPSG:32751 EPSG: 32656
  • 51. Filter used to Select information • Filter is used as part of a Query –to “select” information –Think of it as the WHERE clause in an SQL statement • You can run the resulting Filter object yourself • Uses “Filter Expressions” used to access data • Filter / Expressions work with Feature and POJOs 51 if( filter.evaluate( feature ) ){ // the feature was "selected" by the filter System.out.println( "Selected "+ feature.getId(); }
  • 52. Filter is defined by an XML specification (for web standards). SAX, DOM and dynamic parsing solutions available. Filter as XML 52 <Filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogc="http://www.opengis.net/ogc" xmlns="http://www.opengis.net/ogc" xsi:schemaLocation="http://www.opengis.net/ogc filter.xsd"> <PropertyIsEqualTo> <PropertyName>land_code</PropertyName> <Literal>2</Literal> </PropertyIsEqualTo> </Filter>
  • 53. Filter as CQL (text DSL) Constraint Query Language (from library science actually). Utility class provides: CQL.toFilter( cql ) 53 Filter filter = CQL.toFilter("area( SHAPE ) BETWEEN 1000 AND 3000");
  • 54. Filter as Java Finally you can use a FilterFactory directly. 54 FilterFactory ff = CommonFactoryFinder.getFilterFactory(); Filter filter = ff.propertyLessThan( ff.property( "AGE"), ff.literal( 12 ) );
  • 55. Query Tutorial • This is where it gets cool • Ad hoc query against
 Shapefile, PostGIS, WFS • Using the same code 55
  • 57. Grid Coverage • Representing a Coverage –collection of features that “complete cover an area” –grid coverage form a regular grid of features 57 Coverage Feature
 Coverage Grid Coverage
  • 58. Measurements not Pixels • Grid Coverages used to record measurements • The file metadata describes what the values are –Height (called a Digital Elevation Model or DEM) –Height and Depth – Bathymetry –Vegetation Index –Some have RGB measurements 58
  • 59. Raster Formats • GridCoverages look so much like “pixels” we end up using the same file formats (jpeg, png, tiff, etc..) with a text file for location • Spatial formats record (geotiff, eww) –resolution of the grid –the measurements associated with each location –the location of the grid in the real world 59
  • 60. Image Tutorial • 25 minutes • Working with raster files • Grayscale, Color, Multi- band 60
  • 62. Raster Operations • Direct use of GridCoverage –Extract set of records at a specific location • Simple Operations –Crop - trim to a geographic bounding box or envelope –Scale - increase / decrease size –Resample - ad-hoc sampling, such as reprojection • Operations class –Facade class to make this easier to program –CoverageProcessor performs the operations internally –Operations form a chain, lazy evaluation 62
  • 63. Coverage Processor Tutorial • 25 minutes • Using raster operations • Image input/output • Tile Generation 63
  • 64. Style
  • 65. Style • Cartography is the practice of map making • Focus on purpose –What is the map trying to communicate? –Who will be using it? –What projection, scale and symbology are best? 65
  • 66. Cartography - Scale • Scale –Appropriate for task at hand(floor plan vs interstate) • Graphical Representation of Scale –1:25000 is not sufficient –graphical representation works when altered /printed 66
  • 67. Cartography - Projection • Choosing projection is hard –Equal area to measure distance –WGS84 to show entire world –“google” projection for speed? 67
  • 68. Cartography - Symbology • Choose appropriate symbols for audience • Is the audience trained to read the symbols? –MIL2525B symbols for tactical response –Happy Face for planning lunch 68 Surface and Hostile Planned -=Reduced North Direction East Direction Velocity = Red Task Force – No Quantity – 9 Nuclear - Yes Happy
  • 69. Cartography - Colour • Colour also is dependent on audience • Device makes a difference –Projector cannot display as much colour as screen –Will the map be photocopied? • People make a difference –may be colourblind –may be using the map in bright sunlight or at night • ColorBrewer –http://colorbrewer2.org/ –Color brewer palettes built-in toGeoTools 69
  • 70. Colour - Qualitative • Values represent qualities of your data –Use colour to tell values apart –The colour should have the same “impact” • Each groups has the same
 importance. 70
  • 71. Colour - Sequential • Values represent an ordered series –Use colour to tell values apart –Use colour to tell “how close” values are • The amount of colour directly reflects the value 71
  • 72. Colour - Diverging • Values once again form a sequence –Use colour to tell values apart –Use colour to identify extreme values • amount of colour emphasises low and high values 
 72
  • 73. MapContent and Style • MapContent –Layer – data and style used to draw • StyleLayerDescriptor –FeatureTypeStyle – instructions for how to draw features –Rule – choose which features • PolygonSymbolizer • PointSymbolizer • LineSymbolizer • TextSymbolizer • RasterSymbolizer 73
  • 74. Style Layer Descriptor (SLD) • XML File format used to configure WMS servers • We are mostly going to ignore this bit 74
  • 75. Symbology Encoding (SE) • Just the part of SLD that controls rendering 75
  • 77. Style Tutorial 77 • Create Style –Using a simple dialog –From an XML file –By hand • Create style from selection
  • 79. Extensions & Unsupported Modules • Graph module –Shortest route • Web Formats –GML –GeoJson –SVG • Process –Ready to use Functionality –RasterToVector 79
  • 80. Advanced Tutorials • Integration and
 Customization 80