Bestand wählen
Merken

GeoScript - A Geospatial Swiss Army Knife

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
so just some quick introductions money just meal there but I work for boundless but my contributor on the just a project and are some of the other Jabber projects in ecosystem like GeoTools GeoServer and I'm sure extend I work for your carrier which is a local government between Portland and Seattle were actually just south of Seattle and I'm a member of goes which is the Cascadia geospatial Utica that it's in Seattle WA yes I will try to give a talk into the mike from here and but OK so the 1st
question what what is your script um what do script is a library that does spatial stuff so it provides you with a spatial utilities and that you would use in building application some like that so sort of along the same vein is a lot of the other libraries a price to working with which he argued all and similar Python libraries Fiona arrest stereo Shapley you know along that to the same idea but your script is targeted on at the JVM so it's only supported by languages that run on the Java Virtual Machine um and those languages include the following list here and and this list is actually sort of in the order of completeness but others implementations of a groovy Python and JavaScript and again and these are the jab implementation so that when I say Python I don't mean C Python means the j-th on were and the same for a JavaScript's start talking about nodes the raw VA talking about death the java right no script engine but there's also implementations 1st scale and Ruby but they're somewhat less complete at this point of i'm SUCH a script is sort spatial library for this language and Our for these different languages and across the different languages and we do their ideas to have a role to we consistent API but at the same time recognize that different languages often have very different syntax and paradigms so so but what we try to maintain things like package names in an overall structure and utilities and know syntax across the the languages that can vary i'm and so that geo script is uh builds on top of the you tools library so do tools that Java library that provides the all sorts of spatial geo utilities but Java-based it's been around forever but key parts of a lot of projects such as GeoServer that you dig and the list goes on but so really ideal scripts can be looked at as sort of script bindings and for for geo tools now uh sort the same way that a lot of the seed-based that libraries provide Python bindings the the some so what sort of stuff can you and your strips so that the API sort of broken up into modules and a lot of these modules from you know our our our just things you'd expect from sort of any sort of spatial libraries sorry if that's hard to see but term so that the core of the library there's utilities for interacting with geometries and projections and then sort of building on that there is the idea of format abstractions so all your spatial formats both vector a roster but then we get into visualization capabilities styling and rendering I'll talk a little bit about that uh coming through and then you know sort of upper level we get into sort of more specialized staff and doing some statistical stuff of plotting um support for that use media processing stuff like that and mostly show and who some some examples of so the idea the idea is to provide a really convenient lightweight API uh past where you get with libraries like TJ TS and tools and just for a few examples alright so is just said this is due script is really a scripting API on top of GTS and you tools we're gonna show some examples of how we make things easier in this isn't a knock GTS digital because those about really powerful Java libraries it's just the very powerful and with some of the scripting bindings working making easier so the 1st cases you this is how you buffer point with the job at apology Suite User geometry factories that decree point the 1st critic on it 1st then you can buy for friends on in green Python you we get rid of their geometry factory just creates geometry objects directly so you would with 3 lines turns into woman a code of so take a more complex example of how the renderer maps using dude tools this is actually the same rendering technology that you server uses so we we have to read Nestle from files have to create a style factory in SLT person we have to access your data so using a shapefile datastore we have to wrap this up in a map layer feed that to that non that context we create a buffered image here there's a lot of ceremony here and then we find these the streaming render it actually paints RGS stated the image name means in the child actually writing desk it's actually pretty terse but you are the
scripting bindings we make it a lot easier so here's the example in groovy were were reading a shapefile as a layer were attaching a style from Nestle the end test and you use a map renderer which takes an an array of layers with high and then renders it out so if you were just trying to make things easier select some some features from my oppose just table in tools you there's a connection map so we're we're putting all of our connection information that map we get a datastore from that and then we get that feature source which is the actual you PostGIS table but we get a feature collection them user feature iterator to go through it and we can access you the attributes the geometry here it's it's not too bad we have to do a lot of try finally is to make sure that we're closing connections databases and things like that in in Python you know that 10 lines of code terms in the like 3 we get rid of the whole mapped data store instruction we just use PostGIS layer we feed it had that database and then some sensible defaults so you local goes by default from the I grew up on this so sample verifies that the version so I tell so it's it's just it is prudent Python yes yes so that occur in New England that and then that our last example is you know how do you create highly crater shapefile in tools you use a simple feature take builder on you probably noticing that and you tools there's lots of design patterns which is wonderful for billing library not so much for actually using it and were building up this scheme and you created features simplefeature type which is like that the schema from that were creating shapefile file we actually create the shape file on that line to the feature store and then we use a simple feature it it it's pretty long it's not bad but the Joschka version is much more of a it's easier to make sense of were doing the same thing work readership file were feeding it that's scheme i on using some simple Javascript object and then we had centered OK so I lose sort of you know just a few short little code samples again trying stressed that you know the idea is really just to provide as convenient an API as possible and to make the simple things easy but some GeoTools in GATS like Garrett said do a ton of very cool that stuff but it's not always easy to do simple stuff so some sort of the the problem we're trying to address and we just go through source of more apps samples here of things you might you know do on sort of a day-to-day basis so the army of translating between spatial formats is a pretty common tasks that people do so and so you know here's an example uh from groovy that you know shows just by taking a shape file or a directory of files and converting them to importing them into posters with this uh um again sort sticking with the whole idea of special formats from the at the number of exchange formats you Jason GML and and it's really easy desolate convert between different representations so analyzing data so you know oftentimes you download data we have no idea what it looks like when actually to make it available what it's words distribution of might look like if it's you know only small or something and so on Explore so I you know here's an idea of actually taking a D M by getting histogram and actually plotting the you know the result so
um you don't get a nice little bar chart of my elevation values and how the distributed my data answers school because you know that I can take that and maybe you know create a color map a style or something like that and so you know sort of exploratory tape task so again sir getting into general processing this is this is about taking out again a shape Sri projecting an on fly and dumping it into put that post just the analysis we projecting on the fly so the generating styles so and this is something that's actually really painful if you just do with straight but you was something really focused on to make uh equated easier but i'm and so you any GeoServer user has uh see this style it's very beautiful we spent a lot of time on it as you can tell some and you know that cell the phalangeal server is out something like 70 lines or something like that of XML and you know really collapsing and down to you know for lines here but this 1 I I was inspired by this morning by and the talk from my From might in and out the ideology of chloroplast maps so here's a bit 5 or 6 lines of Python that you know to generate a style that looks like that the so it's and should trying to build up my Python functional programming cred here is its use lots of members of MapReduce sends it so I think I could become covered do some
now this is a cool example that Gerrard came up with that taking a roster and cropping it based on not just as a bounding box but actual geometry so in this case using
a circle but the roster that has the you know the cropped the cropped image in at the most of good but still bit Hank OK so we have all these great modules and G scripts for dealing with vector data geometries you're protecting so how how how can you use salinity some ideas that the 1st way is really there the reason why we did this so you can use it on the command line you can start a new erectile redevelop loop and you know explore your geospatial data so this is an example of the session using the your script groovy shall you can not connect you purse just database list upper layers gravel layer you find the balance find the count and then iterate through the features you can do that interactively and then you can have also right this is a script in edges topology is quot JS and then running and the 2nd way is this is actually there is a community module to plunge your script into GeoServer and so you can do things like you can write your own WPS scripts using the scripting languages you can now you can write filter functions to that you can embed uracil these you can also write just like like many applications so it's it's like a REST endpoints in Python Java script angry which is bringing in a new in GeoServer to 6 we got we did a user interface for this before you'd action to get on the server Maria scripts now we have like you wanna GeoServer shrill strong points that has a really nice you why so we provide GUI for this and so this is an example is showing you the describes you can create a new 1 and this is how you create a process to a buffer geometry and later the justice commissioner really nice example of a much more complicated when processing of service that he wrote using Python and then there's an easier script also comes embedded in Niger Dick in the spatial toolbox and the neatest thing about this is we didn't have to do it the I think he did developers it on Andrea Antonelli schema happened in this province he he he did this and said script comes embedded c you can run IGS ship scripts for and you did and so this is an example of using the style API that just showing in actually creating a style and then in displaying on the screen that the 1 limitation scripting support needed right now is you can access the unique objects so if you've done any Python scripting liking just where you can mean a crater land and attitude to that you can't do that yet we need it but still is pretty neat that becomes embedded in and then you also you can you can use it as a library so you can embed your script in your job applications on this is easy is having a dependency and may even for us you can use this to write your own RESTful web services to write your own web apps Command Line Apps desktop apps whenever you gonna right and
I here's that the same sorta depending dependency information cradle the OK
as and this could be mentioned and so on off you does a familiar with location text and it's sort of this given you were initiative to bring together a lot of special projects or you know along same lines is sort of what was you does an so yeah strip is actually and In incubation for location tech uh right now so that more still very early stages with it but you know we were Deaf looking forward to that so I mean about 5 minutes here so we're going to a talk and show you some uh as real world examples that Jared of hinted at this before and going which the 1st of the but it should so we have to real-world examples that the 1st 1 is the sort of like a typical GIS analysts spatial analysis type of an example my goal was to take the West Nile virus data from the CDC in actually creating animated map cis exercises several things and your script you being able to read write spatial data being implementing will render it all in 1 library so I went to the CDC actually find this information the information isn't a pdf which is great for printing but it's it's not so good for scraping and so 1 of the 1 of the really key selling points a geo script is it is on the targets the Java virtual machine so you can access in a Geo scriptscript you all the Java libraries use any problem you have is probably 5 libraries that will solve it for you have to pick 1 it's an embarrassment of riches stories in high text actually extract the text from that and then there's some really boring code actually turned that extracted text is not pretty into assist people but this is what the see is the file looks can look that and then you know were downloading data from natural or so you just text this is using energy Jewish but this is just using the Java features group features to download this if the shape file stick shape file name we actually wanna join all of that data on the accounts of West Nile virus incident per state per year I so we read in the states file we create a new layer we write all the features and then move and we actually stand here at the bottom we actually iterate through the features find the data in the sees the file and then attach sisters updating shapefiles in place and then
finally to the interesting part action drawing those maps for each year we're going to create an image treating a gradient style which is online using equal never equal in all in born were actually using color blue which that's with the Reds is that a color blue style that like parks Boston talked about earlier we create the image with our map and then this part that was me you can I wanted to put the you draw the year I'm on top of that image so you we provide really nice CPIs direct your tools but you can always drop down to Java and you know use needed to each other to the stuff and then we just and wrote a really nice of animated GIF because who I mean everybody loves gifts right and so he he wrote a really nice support for that in our library and
so this is what you end up with and I put this team watercolor base map underneath it because that just makes demos the research there there the real real quickly years so sort of a 2nd sample and that this is actually something that was actually done by some some folks of the US Gs and they were the experimenting with some of your script stuff to do some processing so all of this is kind of supply version of it but I you know basically the idea was to take bounds and protected lands data and basically do a classification over a specific area and all you know this is so what was the application looks like but I can actually show you a demo so you know what what
this is doing here is that some you know it's there it's using the scripting support in GeoServer so I'm GeoServer has a processing extension WPS and and so you know not only can you you know serve up we have data server data from a server b can actually run your own processes on and so and so it's kind of a perfect use case for geo script because you know often in processes are very sort of ad hoc you know you wanna be able to protect them quickly so and you know it's it's about of a nice match so um I'll show you that you know some of the code here but the action open to and Albert term this is or what a
process that for all the looks like you know in in g services in Python the you know moment ago gloss over but the details here but you know it's about 30 lines in it's now showing off some intersection nasty stuff that took a back to the browser here so you know the idea is that so that my protected lands overlay of and then you know just drop polygon on the map and then you know that I get a nice classification rate there this is all being done you know on the server by another process that you should use this new piece out the the so uh again I'll just where the charters using the 3 and
yes so um so again this is sort of what a process looks like you know you define a run function you have to define some metadata about inputs and outputs so this is really sort of part of the WPS protocol so and then you know very simple I can access my data so this you know of protected area datasets and then uh you know obviously just take a polygon that blue user draws on the map iterate over some features do an intersection simple area calculation and as you know sort of aggregated results so the missing from the very bottom part there but once they are so pretty easily able to sort of extend GeoServer through scripts which is really nice because um you know you could do the same thing in Java but now I have to recompile everything after restart server anytime something changes your strips the engines work but you know it's all loaded on fly dynamically as you would expect from a scripting environment know this is that it at a time yeah the and so that's it and thanks
everybody for listening but I think we have a few minutes for questions and I'm and if you ask questions please wait for the gentleman with the mike to you come around to you so it's raise your hand if you have a question yeah it so 1 how much performance hit my taken for dead we scripting the question and it's really dependent on the language and so with that the Python 1 that we actually take quite a bit of a hit them so that you prepared to see Python versus j on there's there's quite a noticeable difference um you know the other languages not so much like the to the Java version of Ruby is actually claims to be faster than the C version of Ruby so it's really dependent on that you know the language but it's a crossing the barrier from your jab at to the scripting engine is that you know fairly minimal what's the level of feature parity between all the different birds as you mentioned I found Ruby Groovy and script inevitably there's always some level of that difference yeah there is and so you know uh going back the 1st slide you know the group B the implementation which Jared is responsible for is you know the most complete but Python is fairly close and then you JavaScript's knows a few things missing and then it drops off pretty fast so 1 of the things we actually you and and this is part of the but know part of that make but that location tech incubation is really standardize on that can come up with a version of scheme that you know indicates a know this is our complete this implementation is and it's really just young on people to note that the features that you get from of the very at the the Japanese and Skoda
final more downloads offered a play around understood your . and enough based on the
Freier Ladungsträger
Stellenring
Projektive Ebene
Extrempunkt
Resultante
Distributionstheorie
Bit
Prozess <Physik>
Punkt
Selbstrepräsentation
Applet
Formale Sprache
Versionsverwaltung
Iteration
Kartesische Koordinaten
Computeranimation
Übergang
Last
Prozess <Informatik>
Volumenvisualisierung
Visualisierung
Programmierparadigma
Skript <Programm>
Punkt
Default
Gerade
Softwaretest
App <Programm>
Zentrische Streckung
Schnelltaste
Suite <Programmpaket>
Shape <Informatik>
Vervollständigung <Mathematik>
Datenhaltung
Abstraktionsebene
Gebäude <Mathematik>
Entwurfsmuster
Volumenvisualisierung
Nummerung
Ähnlichkeitsgeometrie
Quellcode
Kontextbezogenes System
Arithmetisches Mittel
Softwarewartung
Histogramm
Rechter Winkel
Digitalisierer
Dateiformat
Projektive Ebene
Information
Ordnung <Mathematik>
Verzeichnisdienst
Tabelle <Informatik>
Lesen <Datenverarbeitung>
Subtraktion
Stab
Zahlenbereich
Abgeschlossene Menge
Implementierung
Term
Räumliche Anordnung
Code
Task
Pufferspeicher
Knotenmenge
Modul <Datentyp>
Datentyp
Stichprobenumfang
Programmbibliothek
Speicher <Informatik>
Datenstruktur
Bildgebendes Verfahren
Attributierte Grammatik
Leistung <Physik>
Einfach zusammenhängender Raum
Green-Funktion
Softwarewerkzeug
Mailing-Liste
Vektorraum
Elektronische Publikation
Modul
Quick-Sort
Objekt <Kategorie>
Mapping <Computergraphik>
Basisvektor
Hypermedia
Mereologie
Wort <Informatik>
Faktor <Algebra>
Speicherabzug
Shape <Informatik>
Bit
Shape <Informatik>
Prozess <Physik>
Quader
Magnetbandlaufwerk
Zellularer Automat
Räumliche Anordnung
Quick-Sort
Computeranimation
Mapping <Computergraphik>
Task
Explorative Datenanalyse
Server
Kantenfärbung
Funktionale Programmiersprache
Gerade
Analysis
Server
Punkt
Prozess <Physik>
Gruppenoperation
Formale Sprache
Applet
Schreiben <Datenverarbeitung>
Kartesische Koordinaten
Euler-Winkel
Zählen
Räumliche Anordnung
Computeranimation
Netzwerktopologie
Loop
Puffer <Netzplantechnik>
Benutzerbeteiligung
Prozess <Informatik>
Programmbibliothek
Skript <Programm>
Inverser Limes
Softwareentwickler
Touchscreen
App <Programm>
Benutzeroberfläche
Kreisfläche
Datenhaltung
REST <Informatik>
sinc-Funktion
Mailing-Liste
Vektorraum
Hochdruck
Modul
Summengleichung
Objekt <Kategorie>
Dienst <Informatik>
Server
Benutzerführung
Information
Computervirus
Natürliche Zahl
Gruppenoperation
Applet
Gruppenkeim
Inzidenzalgebra
Räumliche Anordnung
Analysis
Code
Virtuelle Maschine
Reelle Zahl
Datentyp
Minimum
Programmbibliothek
Skript <Programm>
Bildgebendes Verfahren
Gerade
Analysis
Shape <Informatik>
Dichte <Stochastik>
Elektronische Publikation
Quick-Sort
Mapping <Computergraphik>
Mereologie
Ablöseblase
Projektive Ebene
Kantenfärbung
URL
Information
Aggregatzustand
Demo <Programm>
Prozess <Physik>
Matching <Graphentheorie>
Gruppenoperation
Versionsverwaltung
Kartesische Koordinaten
Term
Räumliche Anordnung
Code
Quick-Sort
Gebundener Zustand
Mapping <Computergraphik>
Perfekte Gruppe
Flächeninhalt
Server
Skript <Programm>
Maßerweiterung
Resultante
Lineares Funktional
Prozess <Physik>
Protokoll <Datenverarbeitungssystem>
Momentenproblem
Browser
Applet
Mathematisierung
Iteration
Ein-Ausgabe
Rechnen
Bitrate
Overlay-Netz
Polygon
Quick-Sort
Mapping <Computergraphik>
Metadaten
Dienst <Informatik>
Flächeninhalt
Mereologie
Server
Skript <Programm>
Maßerweiterung
Programmierumgebung
Gerade
Bit
Subtraktion
Kreisring
Formale Sprache
Gruppenkeim
Versionsverwaltung
Implementierung
Nummerung
Übergang
Rechenschieber
Gerade Zahl
Mereologie
Skript <Programm>
URL
Feuchteleitung

Metadaten

Formale Metadaten

Titel GeoScript - A Geospatial Swiss Army Knife
Serientitel FOSS4G 2014 Portland
Autor Deoliveira, Justin
Lizenz CC-Namensnennung 3.0 Deutschland:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
DOI 10.5446/31625
Herausgeber FOSS4G, Open Source Geospatial Foundation (OSGeo)
Erscheinungsjahr 2014
Sprache Englisch
Produzent FOSS4G
Open Source Geospatial Foundation (OSGeo)
Produktionsjahr 2014
Produktionsort Portland, Oregon, United States of America

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract GeoScript adds spatial capabilities to dynamic scripting languages that run on the JVM. With implementations in Python, JavaScript, Scala, and Groovy, GeoScript provides an interface to the powerful data access, processing and rendering functionality of the GeoTools library.GeoScript provides concise and simple apis that allow developers to perform tasks quickly making it a great tool for the day to day data juggling that comes with geopspatial data. This talk will focus mainly on real world examples that showcase the power of the library.Come check this talk out if you are interested in learning about a new tool to add to your geospatial hacking toolbox. Maybe you have tried to use GeoTools but find it too difficult and complex to use. Or perhaps your java skills are not where you would like them to be. If that is the case this talk, and GeoScript, might be just what you are looking for.
Schlagwörter GeoScript
JVM
GeoTools Library

Ähnliche Filme

Loading...
Feedback