Your SlideShare is downloading. ×
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Geospatial for Java
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Geospatial for Java


Published on

See for workbooks associated with this presentation. …

See for workbooks associated with this presentation.

Are you new to GeoSpatial? Does scientific mumbo-jumbo make your head hurt? Are you (gasp!) just out to get the job done? Come to this work shop and go home happy.

This GeoTools session is back by popular demand in a new long format workshop. Offering a visual introduction for Java developers we will exploring how you can integrate GIS services into your next project. For those new to the GeoSpatial scene we provide an introduction to current concepts and projects, and how to avoid common pitfalls.
We start off with something nice, fun and visual - displaying local files using the development environment of your choice. Covering both the concepts and the science of map making the workbooks serve as an excellent reference, but the focus is always on you and the code you need to get the job done.

We explore the concept of a Feature (literally something you can draw on a map), Geometry (what to actually draw) and details like coordinate reference systems, units and projections. The good news is all this stuff is captured at the Java level as nice normal objects by the GeoTools and Java Topology Suite projects. There are utility classes around so we can avoid going down into crazy scientific detail.

The workshop offers a steady series of workbooks introducing:
Feature creation
Geometry, Coordinate Reference Systems and Re-projection
Spatial Queries
Handling large format rasters
Working with Style

We will work with a couple of common GeoSpatial data formats, the use of PostGIS, Web Map Servers (such as GeoServer and MapServer) and Web Feature Servers.
Attend this workshop and be well-versed for the Java presentations at this years conference. Attend this workshop and receive one million randomly generated points free of charge. Just show up - it will be fun.

Published in: Technology
1 Comment
No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide
  • Found in the Ukraine, 10-12,000 years old, Carved onto a Mammoth tusk.
  • The stick maps are really cool – they are actually really big – and the navigator lies down on them to read them. Snow's use of mapping represents the usual start of “western” GIS. The point of all this is to convey information - communicate Where to hunt What is nearby Solve problems Visualise data to discover patterns Answer otherwise unsolvable questions Analysis to support decisions, find trends, etc
  • How much is a lot? GeoTools “bin” download ships ready-to-use with 148 jars! Only 58 of those are “geotools”
  • Looks like everything has been set up just fine; so while there will be a DVD for your amusement you can start when ready.
  • Mapping is already object oriented; indeed they use the same plato ideas of classification as we do – and they started in th 1400s
  • The ISO 19107 geometry ideas used by GML3 have not been implemented yet as open source ... they have been implemented as data structures (indeed twice in GeoTools) – but the important operations have not yet been done. People convert to JTS and then covert back.
  • Transcript

    • 1. GeoSpatial for Java Introduction to GIS for the Java Developer
    • 2. GeoSpatial for Java
      • This is a quick introduction to Geospatial concepts and ideas for the Java developer
      • 3. We will make use of number of Java projects
      • 4. However the focus is on the ideas (we just happen to be using running code)
    • 5. Schedule
      • We have three hours; and a break for caffeine
      Introduction Quickstart 30 min Feature 25 min Geometry and CRS 25 min Caffeine Filter 25 min Image 25 min Style 25 min
    • 6. Introduction Jody
      • Jody Garnett
        • Australia
        • 7. GeoTools since 2003
        • 8. Spent the first 2 months being unable to compile
        • 9. Decided to contribute to documentation
        • 10. Not done yet
    • 16. Introduction Justin
      • Justin DeOlivera
        • Canada
        • 17. GeoTools since 2005
        • 18. Spends his time pruning complicated api
        • 19. Strangely enough Justin is not done yet either
      • Commercial arm of the Open Planning Project
      • 20. OpenGeo Stack
      • 21. Responsible for the majority of GeoTools development at present
    • 22. Geographic Information Systems
      • Humans have been doing this for a long time
      • 23. Cave Art or map to the best hunting ground?
      • 24. A common theme is representation of walking time rather than distance. Allows map to be used as a planning tool.
    • 25. Navigation and Problem Solving
      • Polynesian stick maps
        • Used for navigating in the pacific ocean.
        • 26. Depicted islands, wave patterns and current direction.
      • 1854 Broad Street cholera outbreak
        • John Snow discovered the source of the outbreak by mapping cases of cholera.
        • 27. Cholera victims all used the same water source
    • 28. GeoTools – Java GIS Toolkit
      • 1994 - Present (Really old for Java)
      • 29. Started in Leads University
      • 30. OSGeo Project in 2006
      • 31. Active / Diverse committers
      • Open Source
        • LGPL
      • Open Development
        • Public Process
        • 32. Anyone can Play
    • 33. GeoTools and “Standards”
      • GeoTools 1 had more users then documentation
        • Solution was to fire the users
        • 34. ... and GeoTools 2 was formed
      • GeoTools 2 leans on the OGC standards
        • OGC provides public standards anyone can download
        • 35. Easier to follow standards than having to invent names
        • 36. So the “best” docs are often the standards
      • Standards are not intended to as a limitation
        • Only a common starting point
        • 37. Get it Done
    • 38. GeoTools and Collaboration
      • In the spirit of “Get it Done”
        • We make use of existing projects early and often
        • 39. This is the “Do not repeat yourself” principle in action
      • The project practices “open development”
        • Easy to take part
        • 40. However we are LGPL so we get lots of forks (mostly buried in commercial apps)
      • 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
        • 41. Do you use maven for your project?
    • 42. This is Hands On Programming
      • Recommend you pair up with a friend (or make a new friend)
      • 43. The machines have the software we are using today already downloaded
      • 44. There is a DVD being passed around; copy the “GeospatialForJava” folder
      • 45. If you succeed raise your hand and you will get a “Quickstart” workbook!
      + + ICON_Person_Q308 ICON_Person_Q308 ICON_CD-DVD_Q308
    • 46. Eclipse or Netbeans Quickstart
      • Start when ready
      • 47. You have about 30 mins
      ICON_Person_Q308 NetBeans Quickstart Eclipse Quickstart Jars Maven M2Eclipse Jars Maven
    • 48. Feature
    • 49. Feature Definition
      • Definition
        • a prominent or conspicuous part or characteristic
        • 50. When drawing a person you will often draw the features of a persons face (nose, ears, eyes, mouth)
        • 51. 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)
        • 52. We also record where the object is
    • 53. Feature for Java Developers
      • Explaining the concept of a Feature to Java Developers is easy
        • A Feature is an Object
      • Just like an Object (ie an “instance”) that represents an entity in the real world
        • Feature is an “instance”
      • You can record information about the real world entity
        • Feature attributes record information
      • You can group several features that are similar into classes and form these classes into a hierarchy
        • Feature Type is a “class”
      • Like Java Objects, features can be ideas or concepts (like a “urban growth” or rainfall)
    • 54. Feature for Java cheatsheet
      • Here is a handy table showing the similarities
      • 55. This is a “dynamic type system”
      GeoSpatial Java Feature Object Attribute Field Operation method FeatureType Class properties {
    • 56. Feature Model
      • Here is what that looks like in Java
        • Lots of ways to access attributes
      • “SimpleFeature” for a flat record / tuple data structure
    • 57. GeoAPI
      • Originally started to promote collaboration between GeoTools and the deegree project
        • Mostly failed at this objective
        • 58. Collaboration requires both parties to have funding at the same time
      • Adopted as an “OGC” working group to promote the development of common Java API
        • GeoAPI javadocs are an alternative to reading standards
      • Summary
        • GeoAPI defines the Interfaces
        • 59. GeoTools implements the Objects
    • 60. Feature Workbook
      • CSV2SHP
      • 61. Great example of building features by hand
      • 62. Data Model
        • Feature, FeatureType
      • Data Acess
        • DataStore / FeatureSource / FeatureStore
    • 63. Geometry and CRS
    • 64. JTS Topology Suite
      • Remember we need both:
        • The shape to draw (ie the Geometry)
        • 65. The location to draw the shape in
      • Geometry is provided by the JTS project
        • Implementation of OGC “Simple Features for SQL”
        • 66. Numerically stable
        • 67. This is the rocket science of GIS
        • 68. Literally the foundation of our open source spatial industry
      • Team made up of a single canadian developer
        • Martin Davis
        • 69.
    • 70. Geometry - Point
      • In the beginning…
        • Point
        • 71. A single coordinate of two to four dimensions
      x=151.211111 y=-33.859972
    • 72. GeometryFactory and WKT
    • 73. Geometry - LineString
      • A set of two of more coordinates linear interpretation of a path between coordinates
      • 74. Translation:
        • Java String is a “string of characters”
        • 75. LineString is a string of straight line segments
    • 76. Geometry - Polygon
      • A set of one or more linestrings
        • One ring defines the exterior boundary
        • 77. The remaining rings define the “holes” in the polygon
      • Represents an Area
    • 78. Concept - Coverage
      • Polygons that share an edge, completely covering an area
        • Examples: Land use, Soil types, Zones
      • Often represented as a collection of features
      • 79. Efficient “wing edge” data structures to represent a coverage
        • I don't know a good implementation in Java
    • 80. What is the Point
      • With Geometry we can draw the shape of our “feature”
      • 81. We are still missing an important bit of information
        • “Where” the feature is!
      • This is similar to the idea of “distance”
      • We really need to know 3 “what”
      • 83. The units of distance are important
      • 84. We really need the meaning of a shape
    • 85. Coordinate
      • Coordinate –ordered list of measurements
        • X / Y
        • 86. Latitude / Longitude
        • 87. Longitude / Latitude
      • An important part is defining what is being measured
        • Latitude and Longitude in degrees
        • 88. Distances measured in meters
    • 89. Coordinate Reference System
      • CRS is the definition of what coordinates are measuring
        • Positions are always in 3D space
        • 90. We often “cheat” and only write down two numbers (the ordinates in co-ordinates)
      • How is this possible?
      • 91. We treat the numbers as measurements against a model of the earth
      • 92. Earth model? (ie Geodetic Datum)
        • Ellipsoid – shape kind of like a sphere
        • 93. Geoid – gravity field – kind of like sea level
    • 94. Where to measure from Easy on a flat surface Not as straight forward on a sphere Start with a point of origin Latitude – degrees north or south of the Equator Longitude – degrees east or west of the Prime Meridian
    • 95. Axis order Issue
      • Map makers have been recording information using northing/easting order ... because of Sextant
      • 96. However Computer GIS systems often expect x/y order
      • 97. But the map makers never really agreed
        • So there is confusion
        • 98. You need to check the data
    • 99. Feature and Geometry Standards
      • Complex
      • Standards
      • Implementation
        • data structure only
    • 106. Geometry CRS Lab
      • The Shape of GIS
      • 107. And what it means
    • 108. Filter
    • 109. Filter used to Select information
      • Filter is used as part of a Query to “select” information
      • 110. Think of it as the WHERE clause in an SQL statement
      • 111. Several formats
        • XML (used by WFS)
        • 112. Common Query Langague (CQL)
      • You can run the resulting Filter object yourself
        • filter.evaulate( object )
      • Makes use of “Filter Expressions” used to access data
        • expression.evaualte( object, String.class )
      • Both filter and expression work on Feature and Java Beans
    • 113. Filter Workbook
      • This is where it get's cool; add hock query against
      • Using the same code!
    • 116. Raster Data
    • 117. Grid Coverage
      • Remember a Coverage is a collection of features that complete “cover” an area
      • 118. A grid coverage is a special case – the coverage forms a regular grid of features
      • 119. This looks so much like “pixels” we end up using the same file formats (jpeg, png, tiff, etc..) with a text file for location
      • 120. Spatial formats record location in file metadata (ecw, geotiff)
    • 121. Not Pixels but Measurements
      • Grid Coverages are used to record measurements
        • Height (called a Digital Elevation Model or DEM)
        • 122. Height and Depth – Bathymetry
        • 123. Vegetation Index
      • Some have Red, Green, Blue measurements
      • 124. The file metadata can tell you what the values are for
    • 125. Image Lab
      • Working with raster files
    • 128. Style
    • 129. Cartography - Scale
      • Cartography is the practice of map making
      • 130. Focus on purpose
        • What is the map trying to communicate?
        • 131. Who will be using it?
        • 132. What projection, scale and symbology are best?
      • Scale
        • Appropriate for task at hand (floor plan vs interstate)
        • 133. Graphical Representation of Scale works even when altered/printed
    • 134. Cartography – Projection and Symbols
      • Choosing projection is hard (equal area to measure distance or WGS84 to show world)
      • 135. Choose symbols appropriate to audience (and their training)
        • MIL2525B symbols for tactical response
        • 136. Happy Face for planning lunch
    • 137. Cartography - Color
      • Color brewer palettes built-in to GeoTools
    • 140. Map Definition and Style
      • MapContext
        • Layer – data and style used to draw
      • StyleLayerDescriptor
        • FeatureTypeStyle – instructions for how to draw features
          • Rule – choose which features
    • 145. Style Layer Descriptor – Mostly Ignore
    • 146. FeatureTypeStyle – the Good Stuff
    • 147. constraint Content Style Portrayal (ie Drawing) Composition line symbolizer line symbolizer point symbolizer text symbolizer NAME point symbolizer text symbolizer NAME point symbolizer Features Raster type=City type=Road constraint surface=hiway Rule max scale: 50k Rule Pop > 500000 max scale: 50k Rule Other Rule capital=true Rule Queanbeyan
    • 148. Style Lab
      • Going to work on putting a Style together
      • Advanced
        • Dynamically Generate a Style to Show Selection
    • 151. Other Java Projects
    • 152. Much More to Do
      • Graph module
        • Shortest route
      • Web Formats
      • Processes
        • RasterToVector
    • 155. There are Many More Java Projects
      • Also at FOSS4G
    • 164. Questions
    • 165. Thanks!
      • Thanks for Attending this Workshop
      • 166. Shout out to Micheal Bedward who wrote many of the source code examples
      • 167. Thanks to co-workers who reviewed