Freitag, 18. November 2016

Punkte in Linien konvertieren - Ein performanter und einfacher Lösungsansatz

In diesem Blog Posting möchte ich einen einfachen Ansatz zum Konvertieren von Punkten in Linien vorstellen. Dieser basiert auf einem Vorschlag von H-J Deicher, dem an dieser Stelle der Dank gilt.

Ausgangssituation ist eine Tabelle mit Punkten (POINTS). Über einen Schlüsselwert (TRACK_ID) sowie einem Wert für die Reihenfolge (ORDER_ID) sollen die Punkte zu Linien zusammengefasst und als Geometrien in eine Tabelle (LINES) geschrieben werden.

Derzeit gibt es noch keine native POINTSTOLINE Funktion in Oracle Locator bzw. Spatial and Graph. Aber ein SELECT Statement mit INSERT in die Ziel-Tabelle kann Abhilfe schaffen.
insert into lines (track_id, geom)
select l.track_id, l.geom
from (
  select  p2.track_id,
          sdo_geometry (
            2002, 3785, null,
            sdo_elem_info_array(1,2,1),
            cast (
              multiset (
                select t.column_value
                from points p1,
                     table (
                       sdo_ordinate_array(p1.geom.sdo_point.x, p1.geom.sdo_point.y)
                     ) t
                where p1.track_id = p2.track_id
                order by p1.order_id, rownum
              )
              as sdo_ordinate_array
            )
          ) as geom
  from points p2
  group by p2.track_id
  order by p2.track_id
) l;
Ohne irgendwelche Optimierungen bereits im Blick zu haben, werden auf diese Weise
  • in 40 Sekunden
  • 61.440 Tracks
  • aus 12.283.904 Punkten
  • auf einem Standard-Laptop mit lokaler Oracle DB 12.1.0.1 Instanz
generiert und persistiert.

Worauf ist zu achten, um wirklich performant zu sein?
  • Für die Punkt-Tabelle wurde ein zusammengesetzer Index auf die Spalten TRACK_ID und ORDER_ID gelegt.
  • Es ist immer empfehlenswert, dem Optimizer aktuelle Statistiken anzubieten.
  • Die Zieltabelle kann NOLOGGING gesetzt werden.
Welche Optimierungsansätze für möglichst noch bessere Performance gibt es?
  • Ein erster Ansatz ist, mit Parallelisierung zu arbeiten.
  • Wenn sehr viele Punkte zu jeweils einem Track gehören, kann auch die Partitionierung der Punkt-Tabelle auf Basis der TRACK_ID sinnvoll sein.
Probieren Sie es einfach aus. Ich bin auf Ihre Ergebnisse gespannt.


DOAG 2016: "Eine Karte sagt mehr als 1000 Worte" von its-people

Die DOAG 2016 hatte wieder einige Beiträge rund um das Thema Geodatennutzung/-analyse und -visualisierung zu bieten. So u.a. von Sven Brömer (its-people). Der Vortrag ist auf der Webseite von its-people jetzt schon abrufbar.

Neu veröffentlicht: Bezugssystemwechsel auf ETRS89/UTM - Grundlagen, Erfahrungen und Empfehlungen

Der Runde Tisch GIS e.V. hat einen neuen Leitfaden zum Thema Bezugssystemwechsel auf ETRS89/UTM vorgestellt. Er ist über diesem Link kostenlos zum Download verfügbar.

Freitag, 15. Juli 2016

Webinar-Empfehlung: Get the most from your data, developers and data scientists using Big Data spatial analysis on Hadoop and NoSQL


Tuesday, July 19th 2016
17:00 - 18:00 Uhr CEST | 8:00 - 9:00 am US Pacific


REGISTER HERE TODAY

Hosted by Directions Magazine

Overview

Just the facts

Hadoop, NoSQL, Spark, and related technologies are at the heart of a powerful new development and analytic platform that enterprises are using to lower cost and discover insights from a wide range of big data sources. Data scientists and software developers use these distributed frameworks to create a new class of solutions designed to analyze and process massive amounts of data. Oracle Big Data Spatial and Graph offers a set of high-performance, commercial spatial analysis components, services and data models that bring location analysis to Big Data workloads and enable Big Data processing of data for use in geospatial workflows.

A geo-enrichment service provides location identifiers to big data, enabling data harmonization based on location. Dozens of pre-built geographic and location analysis functions can be used for analyzing, categorizing and filtering data. For geo-processing and raster processing workloads, the ability to perform large-scale operations for cleansing data and preparing imagery, sensor data, and raw input data is provided. Results of spatial analysis and processing can be displayed using an HTML5 map visualization API.

We will share an overview of the new features, demos and examples showing how to invoke these services for your application, and use cases. Learn how developers and data scientists can handle spatial and raster big data analytics and processing workloads.

In this webinar you will learn

  • Where Hadoop and related technologies fit in vector and raster workflows and how to best use this analytic and processing platform
  • How to discover location relationships and patterns in big data among customers, organizations, and assets, and enrich your big data with location
  • How to enrich, categorize, harmonize, and visualize big data with location services
  • How to handle the most challenging spatial and raster analytic and data processing workloads

More details

Oracle is the world's most complete, open, and integrated business software and hardware systems company. Oracle is a leader for geospatial technologies, offering a wide range of 2D and 3D spatial capabilities based on OGC and ISO standards, for database, middleware, big data, and cloud platforms. Oracle’s spatial technologies are used by numerous 3rd party tools, components, and solutions, as well as by Oracle's enterprise applications for on-premise and cloud deployment.

Speakers

  • James Steiner, Vice President, Server Technologies, Oracle
  • Dr. Siva Ravada, Senior Director of Development, Oracle

Who should attend

Chief information officers; chief data officers; Big Data, IT and GIS developers; Data scientists; anyone responsible for innovation, analytics, Big Data strategy and implementation