Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harvester arcgis #8229

Merged
merged 162 commits into from
Oct 25, 2021
Merged

Harvester arcgis #8229

merged 162 commits into from
Oct 25, 2021

Conversation

ricardogsilva
Copy link
Member

@ricardogsilva ricardogsilva commented Oct 11, 2021

This PR implements a harvester for ESRI ArcGIS REST services catalogues. Supported services:

These are the same services that were supported in the older GeoNode services implementation, which the harvesting is aiming to replace.

This uses the GeoNode arcrest package in order to interface with the remote ESRI services - this was already a dependency for GeoNode.

It introduces the harvesting.harvesters.arcigs.ArcgisHarvesterWorker as an additional harvester. This harvester is able to recognize remote URLs of these formats:

  • {base}/rest/services - AKA the ArcGIS REST services catalog URL. The harvester worker is able to discover the relevant services offered by the catalog. Example: https://carto.nationalmap.gov/arcgis/rest/services

  • {base}/rest/services/{service-name}/{service-type} - AKA the ArcGIS REST services service URL. Users can use this URL when they are specifically interested in a single service's resources. Example: https://carto.nationalmap.gov/arcgis/rest/services/transportation/MapServer

Available configuration options for the harvester worker:

  • harvest_map_services - Whether the harvester should harvest resources from services of type MapServer. Defaults to True;
  • harvest_image_services - Whether the harvester should harvest resources from services of type ImageServer. Defaults to True;
  • resource_name_filter - Only harvest resources whose name contains the supplied string. Defaults to None, which will fetch all resources;
  • service_names_filter - Only harvest resources from services whose name contains the supplied string. This is a list of service names. It defaults to None, which will look through all the services specified in the remote ArcGIS REST services catalog. Note that if the harvester's base_url already mentions a single service it has the same effect as setting this parameter to the name of the service. This means that these are equivalent:
    • base_url = "https://carto.nationalmap.gov/arcgis/rest/services" and service_names_filter = ["transportation"]
    • base_url = "https://carto.nationalmap.gov/arcgis/rest/services/transportation/MapServer"

NOTE: As of now, it seems the GeoNode mapstore frontend is not being able to correctly render the harvested services. This is something that this PR did not try to address, and was discussed offline with @afabiani - I imagine it will be done on a future iteration.

giohappy and others added 30 commits January 20, 2021 09:37
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.2 to 1.26.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/1.26.3/CHANGES.rst)
- [Commits](urllib3/urllib3@1.26.2...1.26.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Toni <toni.schoenbuchner@csgis.de>
…6881)

* [Fixes GeoNode#6880] Circle CI upload tests fail irregulary

* CircleCI test fix: sometimes expires due to upload timeout in the test environment

* - Avoid infinite loop on upload testing

* Revert "CircleCI test fix: sometimes expires due to upload timeout in the test environment"

This reverts commit 66139fd.

Co-authored-by: Alessio Fabiani <alessio.fabiani@geo-solutions.it>
Co-authored-by: afabiani <alessio.fabiani@gmail.com>
…de#6911)

* get meaningful document filenames on download

* - Strip extension from document title before slugify it (e.g.: image.jpg instead of imagejpg.jpg)

Co-authored-by: afabiani <alessio.fabiani@gmail.com>
Co-authored-by: Alessio Fabiani <alessio.fabiani@geo-solutions.it>
…ng slash at the end of GEOSERVER_LOCATION (GeoNode#6913)

* [Fixes GeoNode#6916] gsimporter.api.NotFound caused by missing trailing slash at the end of GEOSERVER_LOCATION

* [Fixes GeoNode#6916] unit test for GEOSERVER_LOCATION
Bumps [django-cors-headers](https://github.com/adamchainz/django-cors-headers) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/adamchainz/django-cors-headers/releases)
- [Changelog](https://github.com/adamchainz/django-cors-headers/blob/master/HISTORY.rst)
- [Commits](adamchainz/django-cors-headers@3.6.0...3.7.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [amqp](https://github.com/celery/py-amqp) from 5.0.3 to 5.0.5.
- [Release notes](https://github.com/celery/py-amqp/releases)
- [Changelog](https://github.com/celery/py-amqp/blob/master/Changelog)
- [Commits](celery/py-amqp@v5.0.3...v5.0.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pip](https://github.com/pypa/pip) from 21.0 to 21.0.1.
- [Release notes](https://github.com/pypa/pip/releases)
- [Changelog](https://github.com/pypa/pip/blob/master/NEWS.rst)
- [Commits](pypa/pip@21.0...21.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [coverage](https://github.com/nedbat/coveragepy) from 5.3.1 to 5.4.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](nedbat/coveragepy@coverage-5.3.1...coverage-5.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@6.2.1...6.2.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [djangorestframework-gis](https://github.com/openwisp/django-rest-framework-gis) from 0.16 to 0.17.
- [Release notes](https://github.com/openwisp/django-rest-framework-gis/releases)
- [Changelog](https://github.com/openwisp/django-rest-framework-gis/blob/master/CHANGES.rst)
- [Commits](openwisp/django-rest-framework-gis@v0.16.0...v0.17.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… it has… (GeoNode#6923)

* [Fixes GeoNode#6922][REST API v2] Expose the curated thumbnail URL if it has been uploaded

* - Add REST APIs test suite to CircleCI
* [Cleanup and Refactor] Remove QGIS server backend dependencies

* [Cleanup and Refactor] Remove QGIS server backend dependencies

* - Fix LGTM issues
…iddleware

Feature#650 basic auth middleware
@ricardogsilva ricardogsilva marked this pull request as ready for review October 21, 2021 15:01
@ricardogsilva
Copy link
Member Author

@afabiani please review at your earliest convenience - this is based on #8197, so please review that one first

afabiani
afabiani previously approved these changes Oct 22, 2021
@afabiani
Copy link
Member

@ricardogsilva I have updated this and aligned with #8197
Except for the MapStore client issue (to be fixed on client side) so far so good for me.

If you could also fix the WMSHarvester accordingly by following the same approach you have done here, that would be awesome.

@afabiani afabiani added this to the 4.0.0 milestone Oct 25, 2021
@ricardogsilva
Copy link
Member Author

@afabiani

I've made the WMS fixes, including your patch (sent through another channel). Seems to be working fine now. Please review this and discard #8197, as this PR was based on that one - this includes both the GeoNode unified harvester, the ArcGIS one and the latest changes to the WMS one

afabiani
afabiani previously approved these changes Oct 25, 2021
@ricardogsilva
Copy link
Member Author

@afabiani failing test in CI seems to be unrelated to this PR

Ricardo Garcia Silva and others added 3 commits October 25, 2021 18:32
…se harvester

This was a regression. Since GeoNode documents do not have a name, this field must only be added when relevant (e.g. when creating datasets)
@afabiani afabiani merged commit b2f2ddc into GeoNode:master Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed CLA Bot: community license agreement signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants