Schlagwort-Archive: geospatial

MongoDB and geodata part 2 – getting spatial

After importing geodata from the GIS to MongoDB and creating a spatial index (part 1), the exciting (spatial) adventure starts. With “normal” (relational) databases and their spatial extensions (Oracle spatial, PostgreSQL/PostGIS, SQLite/Spatialite,…) a lot of spatial queries and geoprocessing are possible. So let’s try to find out which adresses have to be evacuated 250m around some “event”…

QGIS_Adressen_Umkreis
How to perform a spatial query like this with MongoDB ?

MongoDB and geodata part 2 – getting spatial weiterlesen

MongoDB and geodata part 1 – from Shapefile to MongoDB 3.2

MongoDB (3.2) is a kind of database-hipster at the moment – with improving support for spatial data. So it was time for me to discover some of it’s features concerning spatial data. As a GIS-user my first intention was to get some bigger simple (point) geodata into MongoDB. Part 1 covers this topic, part 2 will cover some spatial operations within MongoDB. I also want to do some performance checks between PostgreSQL/PostGIS and MongoDB related to geodata.

QGIS_mongoDB_adressen
Geodata in QGIS and MongoDB

MongoDB and geodata part 1 – from Shapefile to MongoDB 3.2 weiterlesen

NTv2 Transformation to ETRS89 for Austria(MGI) the commmand-line way (ogr2ogr)

Sometimes (eg. doing it for a bulk of geodatasets) converting and transforming geodatasets from their Source-CRS to another with command line tools like ogr2ogr (http://www.gdal.org/ ) can be helpful.

With ogr2ogr it’s also an easy task to use NTv2-based transformations like for Austria the AT_GIS_GRID.

NTv2 Transformation to ETRS89 for Austria(MGI) the commmand-line way (ogr2ogr) weiterlesen

Basemap.at (WMTS) in Leaflet.js

Mein Problem war es, dass ich in eine Leaflet-Map die “basemap.at”-Grundkarte einbinden wollte.

Hierbei bin ich auf einigen Widerstand gestoßen, denn es gab so gut wie keine Beschreibungen wie man die “basemap.at” als Gurndkarte einzubinden hat.

Doch dank Google-Codesuche hatte ich ein Beispiel gefunden wo genau diese Kombination vorhanden war.

  1. Als erstes benötigen wir eine Javascript-Erweiterung:

    <script src="https://rawgithub.com/mylen/leaflet.TileLayer.WMTS/master/leaflet-tilelayer-wmts.js"></script>
  2. Nun wird eine Variable erstellt welche die Verbindung beinhaltet:
    var ign = new L.tileLayer("http://{s}.wien.gv.at/basemap/geolandbasemap/normal/google3857/{z}/{y}/{x}.png", {
        subdomains : ['maps', 'maps1', 'maps2', 'maps3', 'maps4'],
        attribution: '&copy; <a href="http://basemap.at">Basemap.at</a>, <a href="http://www.isticktoit.net">isticktoit.net</a>'
    });
  3. jetzt noch zur Leaflet-Map hinzufügen und fertig:

    map.addLayer(ign);

Man kann auch die Punkte 2 und 3 in einem Schritt durchführen.

Will man die derzeit verfügbaren anderen “Kartenlayer” von basemap.at einbinden (zB die Orthophotos, Basemap grau,…), so muss man einfach die Tiles-URL in L.tileLayer anpassen – entsprechend den Angaben, die sich im getCapabilities.xml des WMTS-Dienstes finden.

Link-Grundkarte: Basemap.at

UPDATE:

Hier ein volles Beispiel mit Basemap & OSM & Blank: Leaflet & Basemap example