Git Product home page Git Product logo

hypermap-registry's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hypermap-registry's Issues

fix Worldmap layers appearing blank on search results

Looks like Worldmap layers do not have the Resource.xml field populated when registered. This is reproducible when registring Worldmap to HH and doing a CSW search which will display Worldmap layers as blank Dublin Core records.

Include usage stats from WorldMap

Usage stats from WorldMap layers and remote layers (ratings, number of maps a layer is in, certifications) included in results weightings in HyperSearch.

Therefore we need to index for a layer:

  • rating
  • number of map the layer is in
  • is certified?

Those attributes must be exposed also in the WorldMap API.

CSW HTTP POST requests hang

In master, running a CSW HTTP POST request hangs/times out. To reproduce:

From HHypermap

python manage.py runserver 0.0.0.0:8000

From another console

import requests
print(requests.post('http://host:8000/search/csw', data='<GetCapabilities xmlns="http://www.opengis.net/cat/csw.2.0.2" service="CSW" version="2.0.2"/>').text)

The timeout is rooted in reading the wsgi.input environment variable (https://github.com/geopython/pycsw/blob/master/pycsw/server.py#L229)

Observations

  • sending an empty POST works fine (i.e. print(requests.post('http://host:8000/search/csw', data='').text). The problem arises when there is POST data to read
  • the environment is Django's default dev WSGI setup. We are currently on Django 1.8.7
  • attempting the same test in GeoNode (similar enough dev setup, endpoint is instead http://host:8000/catalogue/csw) works fine
  • all other WSGI envs (Apache/mod_wsgi) work fine
  • we have been advised not to rely on the django WSGI server from Django devs (http://django-irc-logs.com/2016/jul/20#2381982)
  • perhaps there are slight differences in HHypermap dev setup compared to GeoNode

I realize this is the bare minimum environment and that folks will/should never deploy like this to production, however this is a quick way to stand up an instance which will also help in standing up integration tests in Travis.

MapProxy Integration

We need to integrate MapProxy in hypermap.
MapProxy should:

  1. cascade services to Web Mercator when is not available
  2. cascade WMS
  3. cascade Esri REST and enable as OGC services (not sure this is possible)

Error deploying HHypermap (Django)

installHHM.txt
While searching for a monitoring tool to gain insight in the use of QGC web services I found both GeoHealthCheck (GHC) and HHypermap (HHM).
As i succeeded installing GHC, I keep getting errors on HHM and I wonder if someone can help me out.
Tom Kralidis replied on my mail with the request to create a ticket "for this looks like bug of some sort"

My laptop is a Ubuntu 16.04 LTS with python 2.7 (and 3.5) and following the description on the Github page I am getting to the final stage without any error.
But starting the " ./manage.py runserver " command Django crashes with an error (in the file attached)
Who can point me in the right direction to solve this? I've been googeling for the last 2 days to find a solution.

I attached the install script i made from the readme.md (which works great until the last command ;-( ) as well as the error generated by Django
ErrorHHMinstall.txt

btw: the skip_celery_task switch in the install script did not solve it.....

Thanx in advance, Cor

Back down if domain is throttling our harvester

[2016-08-03 23:00:45,145: WARNING/Worker-2] HTTPSConnectionPool(host='ngamaps.geointapps.org', port=443): Max retries exceeded with url: /arcgis/rest/services (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd9122e0d50>: Failed to establish a new connection: [Errno -2] Name or service not known',))

finalize support for Esri REST

Both service and folder of services.

@bglewis : Esri REST includes much more information than WMS/WMTS... services, for example Geometry Type (Points, Lines, Polygons).
Should we track this additional information?

ESRI rest endpoints with custom spatial references.

This is a common problem where some rest endpoints have projections that are not standard. Causing harvesting to stop. i.e
PROJCS["NAD_1983_StatePlane_Michigan_South_FIPS_2113_IntlFeet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",13123359.58005249],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-84.36666666666666],PARAMETER["Standard_Parallel_1",42.1],PARAMETER["Standard_Parallel_2",43.66666666666666],PARAMETER["Latitude_Of_Origin",41.5],UNIT["Foot",0.3048]]
Problem lies with the ArcRest library
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/TaxParcel/TaxParcelQuery/MapServer

[Error Link Hypermap Harvard Branch:Registry] Importing Hypermap as endpoint on aggregator

I tried to import Hypermap endpoint, and celerylog displayed me the following error:

celery_1         |   File "/usr/src/app/hypermap/aggregator/models.py", line 280, in update_layers
celery_1         |     update_layers_wm(self)
celery_1         |   File "/usr/src/app/hypermap/aggregator/models.py", line 1030, in update_layers_wm
celery_1         |     data = json.loads(response.content)
celery_1         |   File "/usr/local/lib/python2.7/json/__init__.py", line 338, in loads
celery_1         |     return _default_decoder.decode(s)
celery_1         |   File "/usr/local/lib/python2.7/json/decoder.py", line 366, in decode
celery_1         |     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
celery_1         |   File "/usr/local/lib/python2.7/json/decoder.py", line 384, in raw_decode
celery_1         |     raise ValueError("No JSON object could be decoded")
celery_1         | ValueError: No JSON object could be decoded

When I did a debug on models.py I noticed trying to add hypermap as endpoint, a get resquest is made to 'http://worldmap.harvard.edu/data/search/api?start=0&limit=10', as you can see in the following code:

def update_layers_wm(service):
    """
    Update layers for an WorldMap.
    Sample endpoint: http://worldmap.harvard.edu/
    """
    response = requests.get('http://worldmap.harvard.edu/data/search/api?start=0&limit=10')
    data = json.loads(response.content)
    total = data['total']

I also did a get request to the same link and it showed me the following message:

Internal Server Error

An internal error occurred. Please try again, and if the problem continues, contact your site administrator.

So, it means there is a linking problem or it doesn't exist

Full code: https://github.com/cga-harvard/HHypermap/blob/registry/hypermap/aggregator/models.py

Implements an upload endpoints list feature

The logged user should be able to upload a text file containing endpoints.
The endpoints will be processed by hypermap.
If a endpoint is recognizable (as WMTS/WMS etc...) and is not already existing, then it is added as a service.
The application should keep track of uploaded endpoints with relative results (SUCCESS, ALREADY EXISTING, FAILURE)

[API] Exclude layers bigger than the viewport from heatmap

  • When ingesting, add an area parameter and a centroid parameter (if it does not exist)
  • When searching, exclude layers that are bigger than the viewport and cover it completely (partial covering does not have to be excluded). Talk to David about the implementation. Think about the case where a layer is the same size as the bbox
  • Count how many layers that cover the viewport were included in the count
  • Subtract those layers from the heatmap when returning the heatmap via the API
  • Add a new output parameter with the number of excluded layers.

Port the BOP-Kotlin functions to Registry-Python

BOP API implementation can be found at:

https://github.com/dsmiley/hhypermap-bop

The idea is to mirror the definition and implementation for time based search, spatial based search, etc. That code does not have a LICENSE file so it's better to check with David and Ben about it before starting the work.

Work can be divided in three steps:

  • Implement Python functions
  • Write unit tests for the Python functions
  • Implement Swagger Interface

Use quad tree for heatmap array request instead of geohash

Comment by @bglewis:
The problem is with geohash the system chooses an array resolution that has a range of 1 to 32. That leads to very crude heatmaps or too accurate ones which are very slow. Quad tree provides a smaller range 1 to 4. This is what we need to implement. Talk to Smiley and perhaps Ariel about how to implement.

Implements a text classification feature

It would be possible to automatically classify layers from metadata parsing.
We could use a geographic names thesaurus.
We need to discuss about this before we proceed.

Have warper layers included as WMS in service Type category

Currently we have the following service types enum:

SERVICE_TYPES = (
('OGC:CSW', 'Catalogue Service for the Web (CSW)'),
('OGC:WMS', 'Web Map Service (WMS)'),
('OGC:WMTS', 'Web Map Tile Service (WMTS)'),
('OSGeo:TMS', 'Tile Map Service (TMS)'),
('ESRI:ArcGIS:MapServer', 'ArcGIS REST MapServer'),
('ESRI:ArcGIS:ImageServer', 'ArcGIS REST ImageServer'),
('Hypermap:WorldMap', 'Harvard WorldMap'),
('Hypermap:WARPER', 'Mapwarper'),
)

In the Hypermap UI and in the Hypersearch client we would like to see the Hypermap:WARPER layers as OGC:WMS.

Therefore we could have another enum just for the UI like this:

UI_SERVICE_TYPES = (
('OGC:CSW', 'Catalogue Service for the Web (CSW)'),
('OGC:WMS', 'Web Map Service (WMS)'),
('OGC:WMTS', 'Web Map Tile Service (WMTS)'),
('OSGeo:TMS', 'Tile Map Service (TMS)'),
('ESRI:ArcGIS:MapServer', 'ArcGIS REST MapServer'),
('ESRI:ArcGIS:ImageServer', 'ArcGIS REST ImageServer'),
('Hypermap:WorldMap', 'Harvard WorldMap'),
)

Note that this requires a schema change or we need to modify the query to Solr.

[Errno 104] Connection reset by peer

Hi, after successfully installing HHypermap on closure of #125 i ran into another problem.
loading my endpoint list (attached) results in a error (104, connection reset by peer) (also attached with .txt for uploading purpose, it is the page save of the website response)
HHM_endpoint_list.txt
error at admin_aggregator_endpointlist_add.html.txt

it could be my fault because on being unknown to how to operate HHypermap?
I am running this from my work laptop (ubuntu 16.04) with internet access (port 80).
tried our url in the list with different endings: geoserver/ows , geoserver/wms, etc....
is this a bug or am i missing something?

Thanks for your effort in advance, Cor

AMQP error when doing vagrant up

TASK: [web | Load initial demo services] ************************************** 
failed: [default] => {"cmd": "python manage.py loaddata aggregator/fixtures/aggregator.json --settings=settings._vagrant", "failed": true, "path": "/webapps/hypermap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "state": "absent", "syspath": ["/home/vagrant/.ansible/tmp/ansible-tmp-1455293058.27-133680234972419", "/usr/lib/python2.7", "/usr/lib/python2.7/plat-x86_64-linux-gnu", "/usr/lib/python2.7/lib-tk", "/usr/lib/python2.7/lib-old", "/usr/lib/python2.7/lib-dynload", "/usr/local/lib/python2.7/dist-packages", "/usr/lib/python2.7/dist-packages", "/usr/lib/python2.7/dist-packages/PILcompat"]}
msg: 
:stderr: Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_from_command_line(sys.argv)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/webapps/hypermap/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 55, in handle
    self.loaddata(fixture_labels)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 84, in loaddata
    self.load_label(fixture_label)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py", line 140, in load_label
    obj.save(using=self.using)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/django/core/serializers/base.py", line 164, in save
    models.Model.save_base(self.object, using=using, raw=True)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/django/db/models/base.py", line 582, in save_base
    update_fields=update_fields, raw=raw, using=using)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 185, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/webapps/hypermap/hypermap/hypermap/aggregator/models.py", line 438, in service_post_save
    check_service.delay(instance)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/celery/app/task.py", line 453, in delay
    return self.apply_async(args, kwargs)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/celery/app/task.py", line 560, in apply_async
    **dict(self._get_exec_options(), **options)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/celery/app/base.py", line 354, in send_task
    reply_to=reply_to or self.oid, **options
  File "/webapps/hypermap/local/lib/python2.7/site-packages/celery/app/amqp.py", line 305, in publish_task
    **kwargs
  File "/webapps/hypermap/local/lib/python2.7/site-packages/kombu/messaging.py", line 172, in publish
    routing_key, mandatory, immediate, exchange, declare)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/kombu/connection.py", line 457, in _ensured
    interval_max)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/kombu/connection.py", line 369, in ensure_connection
    interval_start, interval_step, interval_max, callback)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/kombu/utils/__init__.py", line 246, in retry_over_time
    return fun(*args, **kwargs)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/kombu/connection.py", line 237, in connect
    return self.connection
  File "/webapps/hypermap/local/lib/python2.7/site-packages/kombu/connection.py", line 741, in connection
    self._connection = self._establish_connection()
  File "/webapps/hypermap/local/lib/python2.7/site-packages/kombu/connection.py", line 696, in _establish_connection
    conn = self.transport.establish_connection()
  File "/webapps/hypermap/local/lib/python2.7/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
    conn = self.Connection(**opts)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/amqp/connection.py", line 180, in __init__
    (10, 30),  # tune
  File "/webapps/hypermap/local/lib/python2.7/site-packages/amqp/abstract_channel.py", line 67, in wait
    self.channel_id, allowed_methods, timeout)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/amqp/connection.py", line 241, in _wait_method
    channel, method_sig, args, content = read_timeout(timeout)
  File "/webapps/hypermap/local/lib/python2.7/site-packages/amqp/connection.py", line 330, in read_timeout
    return self.method_reader.read_method()
  File "/webapps/hypermap/local/lib/python2.7/site-packages/amqp/method_framing.py", line 189, in read_method
    raise m
socket.error: [Errno 104] Connection reset by peer

Swagger on Hypermap

We need to define what the best Django package is for what we need and which Django API framework it should be based on.

The requirement is that it relies as little as possible on Django models and that it is lightweight and well integrated with Swagger.

This ticket can be closed once the right package has been added to setup.py as a PR.

Let's post the options as comments here and decide together.

Error from MapProxy: unknown layer

When using the hypersearch client, WMS and ESRI layers are not rendered, both in preview and in map.
We have the following error coming from MapProxy:

screenshot 2016-07-13 17 31 56

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.