19
Wide Open Spaces: MySQL as a Web Mapping Service Backend Don Beesing Alion Science and Technology USJFCOM Experimentation Modeling and Simulation April 22, 2009

Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Wide Open Spaces: MySQL as a Web Mapping Service

Backend Don Beesing

Alion Science and Technology USJFCOM Experimentation

Modeling and Simulation

April 22, 2009

Page 2: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Overview   Going to show MySQL in one aspect of GIS World   Security Restrictions   Feel free to ask questions

Page 3: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Problem   Experiment based environment   How to share geospatial information   Many different government organizations   Disparate systems on each site   Fallback systems to use

Page 4: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Solution   WMS (Web Mapping Service)   OpenGIS Standard   Http request returns images   Can be a queryable service

Page 5: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Constraints   Typical commercial setup   Timing & dollar issues   Unofficial open source policy   Our idea   MySQL & MapServer

Page 6: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Diagram of Implementation

HTTPDServer

MapServer CGI

Users with access to WMS Publishing

Users without access to WMS

Publishing

COP COP/WMS Server

WMS Feed WMS Feed

HTTP Feed

MySQL Server

Point and click GUI

Page 7: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

MySQL •  Already a key component of lab •  Proof of concept •  Stubbornness of lab manager

Page 8: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

MySQL Implementation •  Schema setup – geometry type •  Parent/child tables for updates •  Roads not taken – Shapefile import

Page 9: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

MapServer •  Open source •  Standards compliant •  OGR connector to link w/MySQL •  Standards version issues •  Reliance on linked WFS

Page 10: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

MapServer Format Example Meta Data Header

WEB METADATA "wms_title" "J9 Noble Resolve WMS Server" "wms_onlineresource" "https://yoursite.com/mapserv?map=nr.map&" "wms_srs" "EPSG:4269 EPSG:4326" "wfs_title" "J9 Noble Resolve WFS Server" "wfs_onlineresource" "https://yoursite.com/mapserv?map=nr.map&" "wfs_srs" "EPSG:4326" END END

Page 11: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Format Example Layer Info

LAYER CONNECTIONTYPE OGR CONNECTION "MYSQL:noble_resolve_08,user=test,password=test,host=127.0.0.1,port=3306" DATA "SELECT geom,id,max(update_id) as `update_ref`,object_title,IF(u.description IS NULL, g.description, u.description) as `description`, IF(u.attachments IS NULL, SUBSTRING_INDEX(SUBSTRING(g.attachments,2),',',1), SUBSTRING_INDEX(SUBSTRING(u.attachments,2),',',1)) as `Attachment` FROM geoint g LEFT JOIN geoint_updates u ON id=record_id WHERE object_type IN ('POINT','MULTIPOINT') AND incident_type='fire' GROUP BY id, update_id;" NAME "fire_points" METADATA ##wms metadata "wms_title" "fire_points" "wms_author" "USJFCOM J9" "wms_srs" "EPSG:4269 EPSG:4326" "wms_include_items" "all"

##wfs metadata "wfs_title" "fire_points" "gml_featureid" "id" "gml_include_items" "all" "gml_geometries" "standard" "gml_standard_type" "point"

Page 12: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Format Example Layer Info (cont) END TYPE POINT STATUS ON DUMP TRUE TOLERANCE 3 TRANSPARENCY 90 TEMPLATE "test.php" PROJECTION "init=epsg:4326" END CLASS NAME "fire_points" SYMBOL graphics/flames.gif END END

Page 13: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Giesken

James

J9 Control

Screenshot Demo

Page 14: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Screenshot Demo

Page 15: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

How did MySQL grade out?   Pros   Cons   Incompletes

Page 16: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Unresolved Issues – Steps Forward •  Speed of Google Maps •  Grouping of layers •  Standards Assessment •  MySQL GIS function usage expansion

Page 17: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Thanks •  Would like to thank Steve Judy who was instrumental

in the front end design and design of some of the subtables used for this project

•  Also would like to thank Chris Kannan of NGA who I bounced a lot of these ideas off of and who put me in contact with people who had used MapServer before

Page 18: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

Questions

Any Questions after the conference can be directed to: Don Beesing

[email protected]

Page 19: Wide Open Spaces Using My Sql As A Web Mapping Service Backend

References •  http://mapserver.org •  http://www.gdal.org/ogr •  http://www.opengeospatial.org •  http://www.jfcom.mil/about/experiment.html

jo