Code Monkey home page Code Monkey logo

geosoftware-ii-aallh's Introduction

Geosoftware II Project of the Group "A²HL²", WWU

Aysel Tandik, Anika Graupner, Henry Fock, Lia Kirsch, Lukas Jahnich

Project order: This project will close the gap between geospatial data formats and repositories respectively geospatial metadata catalogues and similarity measurements. Project groups will extend an existing Free and Open Source Software (FOSS) project with the functionality to retrieve and view similar records. This comprises both the API and UI, namely providing an HTTP endpoint to retrieve an ordered list of records based on a provided record and displaying/linking similar records in a detail view of a record respectively.

Table of Contents

Instructions to start pycsw

  • install docker: https://docs.docker.com/install/
  • clone our repository to your computer
  • make sure, docker is running
  • open Windows PowerShell (or Docker Toolbox) on your computer and navigate into the pycsw folder:
cd .../pycsw
  • add the following in PowerShell (just completely copy and paste):
docker run --name pycsw-dev --volume ${PWD}/pycsw:/usr/lib/python3.5/site-packages/pycsw --volume ${PWD}/docs:/home/pycsw/docs --volume ${PWD}/VERSION.txt:/home/pycsw/VERSION.txt --volume ${PWD}/LICENSE.txt:/home/pycsw/LICENSE.txt --volume ${PWD}/COMMITTERS.txt:/home/pycsw/COMMITTERS.txt --volume ${PWD}/CONTRIBUTING.rst:/home/pycsw/CONTRIBUTING.rst --volume ${PWD}/pycsw/plugins:/home/pycsw/pycsw/plugins --volume ${PWD}/our.cfg:/etc/pycsw/pycsw.cfg --volume ${PWD}/db-data:/db-data/ --publish 8000:8000 geopython/pycsw --reload
  • sometimes you could get an input/output error, if so, simply restart Docker and try again
  • go to localhost:8000 in your browser, when you see a xml tree, everething went fine
  • to remove the container, add the following in powerShell (necessary if the container should be restarted with the above command):
docker rm -f pycsw-dev

Test our additional features:

  • we added two own functions for the api in pycsw/pycsw/ogc/csw/csw2.py (for code review):
    • def getsimilarrecords(self)
    • def getsimilaritybbox(self, raw=False)

In your Browser, test our new requests by adding the following endpoints:

Using the CLI-Tools

If you have cloned our repository and installed Python, open the commandline and navigate to the CLI Tools folder in our project folder and type python masterExtract.py --help to show the options you can chose from.

Options:
  --path TEXT  Path to Folder containing Geofiles
  -c, --clear  Clear screen before showing results
  -t, --time   execute time extraction for one file
  -s, --space  execute boundingbox extraction for one file
  -h, --hull   execute convex-hull extraction for one file
  --help       Show this message and exit.

Those are only options, you do not have to use them. However, if you do not choos any of the execution flags (-t / -s / -h), the folderextraction will be triggered and gives you the spatial and temporal extent of each of your Geofiles within the chosen folder in addition to the full spatial and temporal extent of the folder.

You are not limeted to choose only one option but all of them at once except for --help.

If you do not use --path, the path will be prompted. That means it is a shortcut only.

Examples

$ python masterExtract.py -t -s -h
Pleas enter path to Folder: <path>
Pleas enter filename: <filename>

Timeextent:
['1935/01/01 00:00:00 GMT+0', '2014/01/01 00:00:00 GMT+0', 365.253164556962]


Spatialextent:
[-179.5, -89.5, 179.5, 89.5]


Spatialextent as Convex Hull:
[(-179.5, -89.5), (-179.5, 89.5), (179.5, 89.5), (179.5, -89.5)]

The Timeextent starts with the beginning and ends with the end date as ISO8601 standard. the last number is the average intervall in which measurements have been taken.

The spatial extent is shown as a boundingbox. [minX/minLong, minY/minLat, maxX/maxLong, maxY/maxLat]

For more percission the -h / --hull flag gives you the spatial exnent as a convex hull. That means from all the points of a dataset the outer most points are beeing calculated and returned in correct order.

Folderextraction

If you want to extract your hole folder, the -c / --clear flag is recommended because a long list of processing outputs is generated before the final output appears.

$ python masterExtract.py -c --path "<folder path>"

geosoftware-ii-aallh's People

Contributors

anikagraupner avatar atlanta11950 avatar henfo avatar cherry13579 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.