SlideShare a Scribd company logo
2
Most read
7
Most read
10
Most read
Mapping With Drupal
Geotagged Image
                              KML
              Address
                              GPX




Shapefiles
  KML

                                          Styles    Maps
                        Views GeoJSON



  Lat / Lon
   HTML5
Draw on Map
                                          Layers   Behaviors




                            TileStache
Bounding Box
Top
Bottom
Left
Right                                                     GeoPHP is used to
        Centroid                                          calculate the
        Lat                                               Bounding Box and
        Lon                                               Centroid from the
                                                          Geometry.
Geometry
Stored in WKT Format                                      Geometry Types:
Soon will be WKB                                          • Point
WKT Example:                                              • LineString
POLYGON ((30 10, 10 20,                                   • Polygon
20 40, 40 40, 30 10))                                     • MultiPoint
                          Query-able and indexable        • MultiLineString
                                                          • MultiPolygon
                          Not Query-able. SELECTs only.   • GeometryCollection
•   User enters an address     •   KML (Google Earth)
         •   Address is stored          •   GPX (Hand-held GPS)
             independently              •   Geo-tagged Image
         •   Does not store lat / lon       (smart-phone)




         Handlers call service              Handlers parse
         • Google                           uploaded file into a
         • Yahoo                            geoPHP geometry
         • Yandex                           object
         • MapQuest




                      Lat / Lon
Direct user input      HTML5
Is also supported   Draw on Map
                       More!
ESRI Shapefiles can imported into
geofields using OSGeo’s GDAL ogr2ogr
library

Requires download and install of ogr2ogr
Latitude, Longitude 127 24’ 66’’ N, 23 23’ 56’’ W

  GeoJSON {"type":"Point","coordinates":[-123.3,30.78]}

  WKT POLYGON ((30 10, 10 20, 20 40, 40 40, 30 10))




OpenLayers Map
OpenLayers and Views

              Repeat after me




“I need to create two views. One view hold
the layer. The other view holds the map.”
GeoJSON View
      (views_geojson module)
                                                                                GeoJSON Layer
1.   Create a page view
2.   Add geofield field to field list        /feeds/layer.json
3.   Set format to GeoJSON feed                                              Layer should automatically
     and select geofield                                                      appear in your layers list
                                         Exposed & Contextual Filters




     OpenLayers Map View
1.   Create a page, block or pane                                              OpenLayers Map
     view
2.   Set format to OpenLayers Map                                       1.    Add layer to map and
3.   Optional: set-up exposed                                                 configure map as desired
     filters identically to first view                                  2.    Click “Preview” to make sure
4.   Profit!                                                                  your map is working
Maps

        Styles          Brings Behaviors and
  Provide static and    Layers (and implicitly
  dynamic styling to   Styles and Layer-Types)
   olverlay layers.    together in a JavaScript
                        widget for displaying
                             spatial data.




       Layers
                             Behaviors
Two classes:
                            Behaviors are
1. Base-Maps such as
                         JavaScript snippets
   google maps or
                         that make the map
   other “tiles”
                       interactive in different
2. Overlays that
                        ways or provide map
   come from views
                           UI functionality.
   or feeds
Geometry
Stored in WKB Format




                                  Query-able and indexable
-- Find all pubs located within 250 meters of a hospital.
SELECT h.name, p.name FROM bc_hospitals h, bc_pubs p WHERE ST_DWithin(h.geom, p.geom, 250);

-- What is the largest municipality in British Columbia, by area?
SELECT name, ST_Area(geom) as areaFROM bc_municipality order by area limit 1;

-- What is the total length of all roads in BC, in kilometers?
SELECT sum(ST_Length(geom))/1000 as km_roads from bc_roads;
PostGIS can be used as a spatial-query service in the same way that solr is used as a
search-query service. This example show us associating “Location” nodes with “Region”
nodes using Geofield, node-references, and SyncPostGIS.


                                     Sync PostGIS
                                    Entity-save or cron
   GeoField (Polygon)




                           Spatial Query on entity-save
                           SELECT id from postgis where
                           bundle = ‘region’ AND                  Entity Type
                           ST_WITHIN($point, geom)
                                                                  Entity ID
     GeoField (Point)
                                                                  Entity Bundle
     Node-Reference                                               Field Name
                                     Node ID of region            Field Delta
PostGIS      TileMill
ShapeFiles
GeoTIFF
KML
More!

More Related Content

KEY
Drupal mapping
PDF
Mapping in Drupal using OpenLayers
PDF
Mapping in Drupal 7 using OpenLayers
PPTX
OpenLayer's basics
PDF
51811680 open layers
ODP
OpenLayers vs. Leaflet
PDF
OpenLayers 3
PDF
Answer togoogleearthuniverseandevrythingelse abbreviated
Drupal mapping
Mapping in Drupal using OpenLayers
Mapping in Drupal 7 using OpenLayers
OpenLayer's basics
51811680 open layers
OpenLayers vs. Leaflet
OpenLayers 3
Answer togoogleearthuniverseandevrythingelse abbreviated

What's hot (20)

PDF
Marble Virtual Globe 1.6 Factsheet (English)
PDF
Marble Virtual Globe 1.4 Factsheet (English)
PDF
Marble Virtual Globe 1.3 Factsheet (English)
PDF
Marble - ein Schweizer Taschenmesser für Karten
ODP
Answer To Google Earth Universeand Evrything Else Abbreviated
PDF
Web Mapping with Drupal
PPTX
Open layers
PDF
以 Leaflet 濫用^H^H呈現開放街圖資料
PDF
PDF
Vector Tiles with GeoServer and OpenLayers
PDF
LocationTech Tour 2016 - Vectortiles
PDF
Visualization and Level-of-detail of Metadata for Interactive Exploration of ...
PDF
Cartaro Workshop at the Geosharing Conferenc in Bern
PDF
Where in the world is Franz Kafka? | Will LaForest, Confluent
PPTX
Yet Another Solar System
PDF
Integrating Geospatial Data to your Applications
PDF
Using QGIS to create 3D indoor maps
PDF
QGIS training class 1
KEY
Game Design 2 (2010): Lecture 7 - Micro and Macro Design
Marble Virtual Globe 1.6 Factsheet (English)
Marble Virtual Globe 1.4 Factsheet (English)
Marble Virtual Globe 1.3 Factsheet (English)
Marble - ein Schweizer Taschenmesser für Karten
Answer To Google Earth Universeand Evrything Else Abbreviated
Web Mapping with Drupal
Open layers
以 Leaflet 濫用^H^H呈現開放街圖資料
Vector Tiles with GeoServer and OpenLayers
LocationTech Tour 2016 - Vectortiles
Visualization and Level-of-detail of Metadata for Interactive Exploration of ...
Cartaro Workshop at the Geosharing Conferenc in Bern
Where in the world is Franz Kafka? | Will LaForest, Confluent
Yet Another Solar System
Integrating Geospatial Data to your Applications
Using QGIS to create 3D indoor maps
QGIS training class 1
Game Design 2 (2010): Lecture 7 - Micro and Macro Design
Ad

Similar to Drupal mapping modules (20)

PPT
Server side geo_tools_in_drupal_pnw_2012
PDF
Where2009 - Hacking Map APIs
PDF
Hacking Map API's Workshop - Where2.0 2009
KEY
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece
PDF
Building a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to hero
PDF
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.
PDF
Drupal and the GeoSpatial Web
PDF
MongoDB + GeoServer
PDF
FOSS4G2011 Report
PDF
Geospatial technologies
PDF
Putting Your Data on a Map
PDF
State of the Art Web Mapping with Open Source
PPTX
Building good web_maps, Esri, Joris Bak
PPT
The FOSS4G Map
PPT
The 21st Century Harvard Map
PDF
PyDX Presentation about Python, GeoData and Maps
PPT
White Paper on OS Master Map
PDF
Pycon2011
PDF
Optimizing your Map Services
Server side geo_tools_in_drupal_pnw_2012
Where2009 - Hacking Map APIs
Hacking Map API's Workshop - Where2.0 2009
Ioannis Doxaras on GIS and Gmaps at 1st GTUG meetup Greece
Building a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to hero
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.
Drupal and the GeoSpatial Web
MongoDB + GeoServer
FOSS4G2011 Report
Geospatial technologies
Putting Your Data on a Map
State of the Art Web Mapping with Open Source
Building good web_maps, Esri, Joris Bak
The FOSS4G Map
The 21st Century Harvard Map
PyDX Presentation about Python, GeoData and Maps
White Paper on OS Master Map
Pycon2011
Optimizing your Map Services
Ad

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPT
Teaching material agriculture food technology
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPTX
Machine Learning_overview_presentation.pptx
PPTX
1. Introduction to Computer Programming.pptx
NewMind AI Weekly Chronicles - August'25-Week II
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Network Security Unit 5.pdf for BCA BBA.
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Approach and Philosophy of On baking technology
Empathic Computing: Creating Shared Understanding
Programs and apps: productivity, graphics, security and other tools
Agricultural_Statistics_at_a_Glance_2022_0.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Teaching material agriculture food technology
gpt5_lecture_notes_comprehensive_20250812015547.pdf
cuic standard and advanced reporting.pdf
MYSQL Presentation for SQL database connectivity
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
The Rise and Fall of 3GPP – Time for a Sabbatical?
SOPHOS-XG Firewall Administrator PPT.pptx
Machine Learning_overview_presentation.pptx
1. Introduction to Computer Programming.pptx

Drupal mapping modules

  • 2. Geotagged Image KML Address GPX Shapefiles KML Styles Maps Views GeoJSON Lat / Lon HTML5 Draw on Map Layers Behaviors TileStache
  • 3. Bounding Box Top Bottom Left Right GeoPHP is used to Centroid calculate the Lat Bounding Box and Lon Centroid from the Geometry. Geometry Stored in WKT Format Geometry Types: Soon will be WKB • Point WKT Example: • LineString POLYGON ((30 10, 10 20, • Polygon 20 40, 40 40, 30 10)) • MultiPoint Query-able and indexable • MultiLineString • MultiPolygon Not Query-able. SELECTs only. • GeometryCollection
  • 4. User enters an address • KML (Google Earth) • Address is stored • GPX (Hand-held GPS) independently • Geo-tagged Image • Does not store lat / lon (smart-phone) Handlers call service Handlers parse • Google uploaded file into a • Yahoo geoPHP geometry • Yandex object • MapQuest Lat / Lon Direct user input HTML5 Is also supported Draw on Map More!
  • 5. ESRI Shapefiles can imported into geofields using OSGeo’s GDAL ogr2ogr library Requires download and install of ogr2ogr
  • 6. Latitude, Longitude 127 24’ 66’’ N, 23 23’ 56’’ W GeoJSON {"type":"Point","coordinates":[-123.3,30.78]} WKT POLYGON ((30 10, 10 20, 20 40, 40 40, 30 10)) OpenLayers Map
  • 7. OpenLayers and Views Repeat after me “I need to create two views. One view hold the layer. The other view holds the map.”
  • 8. GeoJSON View (views_geojson module) GeoJSON Layer 1. Create a page view 2. Add geofield field to field list /feeds/layer.json 3. Set format to GeoJSON feed Layer should automatically and select geofield appear in your layers list Exposed & Contextual Filters OpenLayers Map View 1. Create a page, block or pane OpenLayers Map view 2. Set format to OpenLayers Map 1. Add layer to map and 3. Optional: set-up exposed configure map as desired filters identically to first view 2. Click “Preview” to make sure 4. Profit! your map is working
  • 9. Maps Styles Brings Behaviors and Provide static and Layers (and implicitly dynamic styling to Styles and Layer-Types) olverlay layers. together in a JavaScript widget for displaying spatial data. Layers Behaviors Two classes: Behaviors are 1. Base-Maps such as JavaScript snippets google maps or that make the map other “tiles” interactive in different 2. Overlays that ways or provide map come from views UI functionality. or feeds
  • 10. Geometry Stored in WKB Format Query-able and indexable -- Find all pubs located within 250 meters of a hospital. SELECT h.name, p.name FROM bc_hospitals h, bc_pubs p WHERE ST_DWithin(h.geom, p.geom, 250); -- What is the largest municipality in British Columbia, by area? SELECT name, ST_Area(geom) as areaFROM bc_municipality order by area limit 1; -- What is the total length of all roads in BC, in kilometers? SELECT sum(ST_Length(geom))/1000 as km_roads from bc_roads;
  • 11. PostGIS can be used as a spatial-query service in the same way that solr is used as a search-query service. This example show us associating “Location” nodes with “Region” nodes using Geofield, node-references, and SyncPostGIS. Sync PostGIS Entity-save or cron GeoField (Polygon) Spatial Query on entity-save SELECT id from postgis where bundle = ‘region’ AND Entity Type ST_WITHIN($point, geom) Entity ID GeoField (Point) Entity Bundle Node-Reference Field Name Node ID of region Field Delta
  • 12. PostGIS TileMill ShapeFiles GeoTIFF KML More!

Editor's Notes

  • #4: Howgeofield stores data
  • #5: Getting data into geofield
  • #6: NEED MORE INFO
  • #7: Geofield Formatters