Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Using Java XML Tool to Using Java XML Tool to
process OSM XML dataprocess OSM XML data
Fangli Ying Peter MooneyPadraig CorcoranAdam Winstanley
Department of Computer ScienceNational University of Ireland, MaynoothCo.Kildare,Ireland
Commenced PhD project - Since October 2009Project supervisors: Peter Mooney ,Padraig CorcoranDirector of Study: Adam C.Winstanley
Publications:
• Polygon Processing in OpenStreetMap XML, GISRUK conference 2010
• Using Shape Complexity to guide simplification of geospatial data for use in Location-based Services (To Appear) , The 7th International Symposium on LBS & TeleCartography 2010
• Using Java XML Tool to Process OSM Data (Abstract), State of the Map 2010 Spain
• A Model for Progressive Transmission based on Shape Complexity, Submited to ACM GIS 2010
A model for progressive transmission of spatial data A model for progressive transmission of spatial data based on shape complexitybased on shape complexity -- OSM is a case studyOSM is a case study
OpenStretMapOpenStretMapOpenStretMap
XMLXMLXML
UTMUTMUTM
OpenStreetMap---------a free geographic data
OpenStreetMapOpenStreetMap------------------a free geographic dataa free geographic data
OSM Data IssuesOSM Data Issues
OSM data : available for download as XML format
� Large geographical area� Large number of vector data� Many kinds of custom feature tags� Hard to Process
Why are we using OSM XML
• Global coverage• On the fly transmitting• Custom data selection• Easy to edit• Analysis and comparing the data• Data Consistency• … …
Data Extraction: download OSM data for LBS device
Many limitations in Location-based Service device� —limited storage space, lack of GPS capable component, poor
network speed
Our Software
� ---Select the OSM data in a small area and Process Data by Stream:
Using OSM 6.0 API:
Java provides good support for working with XML data
Real Time Processing
Spatial Analysis
Editing dataWorking with OS XML Tools:JDOM,XMLBean,Sax,vtd-
xml,woodstox ….
An example of DOM XML Processing
DOM for OSM XML processing
• Easy Program• Efficient Query• Call the data any time
• Memory consuming• Slow pre build tree• No support for
streaming transmitting
Java Heap Error!
Java Heap Error!
Java Heap Error!
Java Heap Error!
An example of SAX XML Processing
SAX for OSM XML processing
• Streaming process• Efficient Memory handling
• Hard to program and maintain• Poor navigation ability to fetch the data• Element based queries
An example of STAX XML Processing
STAX for OSM XML processing
• Supports streaming• Memory efficient• Easy to Program and maintain• Event driven• Easy handling of custom
attributes/features
OSM XMLOSM XML
Scores of Opensource XML Tools
(1~10 is the score of convenience of use)
Stax covers more advantage for XML Processing
428Keeps data in memory
739Easy to program
794Speed
893Memory Usage
STAXSAXDOM
Query/navigating the OSM XML to the spatial data and information
For vector:
Way
Node
Ref
Latlon
For interesting features:
Waterway
Highway
Forest
Real Time Processing ProposalReal Time Processing Proposal
� User select Area from the OpenstreetMap and send request
� Using OSM API fetch XML file(Streaming)
� Process the XML Data Stream
� Create Java Objects for the XML Data
� Display or visualize the results of analysis(ie query or generlisation etc)
PhD Research Topic: PhD Research Topic:
OSM Data for LBSOSM Data for LBSFaster, dynamic, display of OSM data for LBS applications by using shape complexity and polygon representation to guide data delivery
Some related topics:
Spatial Data Access
Polygon Generalization and Simplification
Progressive Transmission
Location Based Streaming
Many FOSS products
+ OSM XML Processing
Streaming OSM XML data using selective progressive transmission to LBS devices
Simplify the OSM data before delivery? Apply Shape Complexity Measures to Decide
Kmean=0.05800859
(measure of angles in the polygon)
N=77
(C,A):
Circularity=0.861512427
Area Ratio=0.011622088
Simple
Simplify
(Over-represented)
Combine a number of shape complexity measures to control the transmission of data
Kmean<0.01
N=647
(C,A):
Circularity=0.049611775
Area Ratio=0.515551784
Complex
Simplify
(Over-represented)
Selective Progressive TransmissionSelective Progressive Transmission
� Applying Shape Complexity Measures to Spatial Data
� Preserving the Contour of the Shape Representation
This work is focused on efficient delivery of spatial data to LBS devices
• Using OSM-XML data as a case-study (global-coverage)• Fast XML processing required• Progressively transmit data by selecting portions of the data
based on shape complexity criteria• Future Work: Full implementation of our selective
progressive transmission model