Transcription
Introduction à lacartographie Web opensourceAu-delà de Google Maps
Julien-Samuel LacroixMapgearsjlacroix@mapgears.com
Géomatique 101Navigation webCôté serveurBase de données
Géomatique 101
La géomatique en quelques motsDiscipline ayant pour objet la gestion des donnéesgéographiques en faisant appel aux sciences ettechnologies reliées à l'acquisition le stockage le traitement et la diffusion. de données géographiques. (réf: OQLF)
La géomatique en 1000 motsAcquisitionDiffusionStockageTraitementet analyse
Google Maps Depuis 2005La cartographie disponible pour tousNéogéographe vs Paléogéographe
Les logiciels libres en géomatique freegis.org356 entréesOSGeo14 projets logiciels 7 en cours d'incubation
La cartographie aCRSDiffusionTraitementGRASSet analyse Quantum GISgvSIGOSSIM
La cartographie rDonnéesPostGIS
Côté sMetaCRSDiffusionTraitementGRASSet analyse Quantum GISgvSIGOSSIM
MapServerPermet de construire ses propres cartes avec ses propresdonnées géospatiales. MapServer lit des données géoréférencées et retourne desimages standards dans le format désiré. Implémente les normes OGC : WMS WFS SLD GML KML
MapServer
MapServer
Configuration
Configuration
Configuration
Polyvalence Windows, Linux, Unix, Mac, etcFormat de fichier d'entrée multiple via GDAL/OGRStandard OGC
Performance
Performance
Données?Shapefile : roads.shp roads.shx roads.dbfFichiers statiquesAttributs stockés dans un fichier DBFL'extension dbase de PHP est encore utile!!!
Base de lsMetaCRSDiffusionTraitementGRASSet analyse Quantum GISgvSIGOSSIM
PostGISBase de données relationelleAjout de nouveaux types “spatiaux”Opérateurs et fonctions géographiques- interrogation- édition- analyseAussi puissant qu'un SIG
PostGISExtension spatiale pour PostgreSQL Stockage, requête et manipulation d'objets spatiauxdirectement dans la base de données Suit la spécification OGC Simple Features for SQL Base de données relationnelle.
Jonction de 2 tablesTable avec géométrieTable avec géométrie et attributs
Jonction de 2 tables
Jonction de 2 tablesSELECT * FROM roadsLEFT JOIN roads attrON roads.gid roads attr.gid;
PostGIS et MapServerLAYERCONNECTIONTYPE POSTGISCONNECTION "host yourhost dbname db user you password pass port pgport"DATA "the geom FROM roads".
PostGIS et MapServerLAYERCONNECTIONTYPE POSTGISCONNECTION "host yourhost dbname db user you password pass port pgport"DATA "the geom FROM (SELECT *FROM roadsLEFT JOIN roads attrON roads.gid roads attr.gid) as jointable”.
Fonctions spatialesL'hôpital le plus proche?
SELECTdistance(hospitals.the geom,roads.the geom)FROM hospitals, roads;
the geom,r.the geom)) asmin distanceFROM roads,hospitalsGROUP BY road.gid, street;
CLASSEXPRESSION ([dist] 1000)COLOR 0 255 0ENDCLASSEXPRESSION ([dist] 1000 AND [dist] 2000)COLOR 255 255 0ENDCLASSEXPRESSION ([dist] 2000 AND [dist] 4000)COLOR 192 192 0ENDCLASSEXPRESSION ([dist] 4000)COLOR 255 0 0END
PostGISIl y a beaucoup de fonctions comme rence.html
OpenLayershttp://openlayers.org/ Cartographie dynamiqueAPI completLibrairie JavaScriptAucune dépendance àun logiciel serveurLicence de type BSDOffre lesfonctionnalitésde base de navigation
À la base: JSfunction init(){map new OpenLayers.Map('map');layer new OpenLayers.Layer.WMS("OpenLayers ers: 'basic'});map.addLayer(layer);}
Pour en faire plus
Sources de données GYMOKMLFichier texteWMSvar map new OpenLayers.Map({div: "map",pointtitledescription iconlayers: [10,20my orange titlemy orange descriptionnew OpenLayers.Layer.WMS(2,4my aqua titlemy aqua description"WMS", urpletitledescription br/ is great{layers: .123title2description2new OpenLayers.Layer.Vector("KML", {strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: "kml/lines.kml",format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepAth: 2})})})],center: new OpenLayers.LonLat(-112.169, 36.099),zoom: 11});
acheMapGuideMapServerMapServer. MSWMS. UntiledWMS.PostWorldWindYahooXYZGoogle/ v3.jsWMTSZoomify
Vecteurs Points, lignes, polygones, textesFormats multiples: GML GeoJSON KML Texte etcCSSOutils d'éditionOutils d'analyse
Architecture
Attributsvar aussie new OpenLayers.Rule({filter: new OpenLayers.Filter.Comparison({type: OpenLayers.Filter.Comparison.LIKE,property: "location",value: "Australia"}),symbolizer: {fillColor: "red"}});
Cluster
lZoomToMaxExtent
Édition Disponible pour tous les types de géométrieDifférents protocoles de sauvegarde :HTTPWFSSQL
lZoomToMaxExtent
DocumentationDocumentation de l'APIListes de discussion très actives (Users, Dev)- Plusieurs centaines de messages par mois sur 2 listesExemples!
Exemples OpenLayersAccessibleOpenLayers Document DragGML ParserAll Overlays with Google and OSMDouble Set CenterGoogle with OverlayOpenLayers Overlays OnlyDrag FeatureGoogle (v3) allOverlays Layermap.panToOpenLayers Draw FeatureGoogle (v3) LayerArcGIS Server 9.3 Rest APIDynamic POIs via a Text LayerGoogle LayerArcIMS ThematicEditing ToolbarNamed GraphicsArcIMSEvent HandlingGraticuleAttributionOpenLayersGutterBase LayersFilter StrategyOpenLayers Select and Highlight FeatureVector Behavior (Fixed/HTTP/GML)Filter EncodingHover HandlerBingFractional ZoomImage LayerBoxesFull ScreenOpenLayers Geometry IntersectionShowing Browser NameGeoJSONKaMapBufferGeoRSS from Flickr in OpenLayersKML LayerCanvas RendererGeoRSS MarkerParsing gx:Track in KMLClick HandlerGeoRSSKML ParserClick EventWFS GetFeature (GeoServer)Late RenderingMap ControlsFeature InfoLayer OpacityCustom ControlFeature Info in PopupLayer Load MonitoringCustom StyleFeature InfoLayer SwitcherDebugGML LayerBasic Single WMS
Paging StrategyRule Based StyleStyleMapFeature StylesExemples OpenLayersMapGuide LayerAdvanced OSM LayerSnappingMapServer LayerBasic OSMSOS clientMapServer Single Tile ModeOverview MapOpenLayers Spherical MercatorResize a MarkerPan and Zoom PanelsOpenLayers Split FeatureMarkers LayerCustom Control.PanelBBOX StrategyUsing a Layer.Text to display markersGeoRSS PointTrack in OpenLayersCluster Strategy ThresholdOpenLayers MeasurePopup MatrixCluster StrategyMultiMapPopup MayhemPaging StrategyOpenLayers Modify FeatureLayer ProjectionsRule Based StyleMousePosition ControlGears ProtocolStyleMapOpenLayers Mousewheel IntervalOpenLayers Regular PolygonFeature StylesMultiMap MercatorResize Features ProgramaticallyRotation StyleMultiple Server URLSOpenLayers Restricted ExtentUnique Value StylesNavigation ControlRotate vector featuresOSM Google Maps KML ReprojectionMap Navigation HistoryOpen Popup on Layer.VectorKML LayerA navToolbar with an alwaysZoom ZoomBoxOpenLayers Select FeatureOpenLayersNavigation Toolbar: Outside the MapSetting a Visual ExtentMap "Teleportation" and RenderingNavToolbar DemoSLD ParserTileCacheUntiledStyled Layer Descriptor (SLD)Tiled Map ServiceZ-Index/Y-OrderSLD based selection on WMS layersVector Feature Transformation BoxOSM and Google TogetheSnapping & SplittingTransitionWorldWind layersSnappingWorldWindWrapping the Date LineSOS clientVirtual EarthXHTMLOpenLayers Spherical MercatorVirtual EarthXML FormatOpenLayers Split FeatureOpenLayers Labeled featuresBasic ESRI Map CacheBBOX StrategyDrawing Simple Vector FeaturesYahoo Base LayerCluster Strategy ThresholdVector FormatsZoomify LayerCluster StrategyOpenLayers Spherical MercatorZoom LevelRotation StyleUnique Value StylesOSM Google Maps KML ReprojectionKML LayerMap "Teleportation" and RenderingTileCacheTiled Map ServiceVector Feature Transformation BoxTransitionWorldWindXYZ Layer with OffsetVirtual EarthOpenLayers Labeled featuresDrawing Simple Vector FeaturesVector FormatsOpenLayers Spherical MercatorWFS Protocol and FilterWFS TransactionVector BehaviorWFS ReprojectionSnap/Split and Persist via WFSWFS United States (GeoServer)WMCWMS UntiledWMS version 1.3 (axis order)WMSWMSDescribeLayer ParserBasic WMS via HTTP-POST protocol with a large SLD includedWMS TimeWeb Map Tile Service (WMTS) Capabilities ParsingWMTS GetFeatureInfo ControlWeb Map Tile Service (WMTS) Layer
OpenLayers
Interface usager anel
ConceptAbsence de la composante géospatiale dans ExtJS Absence des concepts pour les applications riches dansOpenLayers Présence de la carte dans un panel ExtJS Encapsulement des objets d'OpenLayers dans descomposantes data d'ExtJS
MapPanelnew Ext.Window({title: "GeoExt in Action",height: 280, width: 450, layout: "fit",items: [{xtype: "gx mappanel",Layers: [new OpenLayers.Layer.WMS("Global ice/wms",{layers: "bluemarble"})],zoom: 1}]}).show();
MapPanel
Exemples GeoExtAttribute FormAttribute Store & ReaderGrid with FeaturesLayer TreeLayer Opacity SliderLegend PanelMap PanelMap Panel (in a Viewport)Map Panel (in a Window)PermalinkFeature PopupModifying PopupsInteractive Print ExtentPrint Your MapPrint Preview WindowFeature RendererFilter Form PanelToolbar with ActionsTree NodesTree LegendVector LegendWMS Capabilities StoreWMS Capabilities TreeScale ChooserZoom Slider
Questions?
Julien-Samuel LacroixMapgearsjlacroix@mapgears.com
Google Maps Depuis 2005 La cartographie disponible pour tous Néogéographe vs Paléogéographe