Skip to content

Conversation

@j-tenny
Copy link

@j-tenny j-tenny commented Jun 17, 2025

Fixed case in "outFields" parameter. Parameter "outfields" was being ignored by map service api. Polygons were being returned with one attribute ("name") instead of 25 attributes when tested with url.

Added code to get "supportedQueryFormats" for the layer of interest instead of the whole feature service. Fixes issue where layer and service have different supported formats, as in url

Found these issues and tested the solution as follows:

import pygeoogc
import pygeoutils
twig = pygeoogc.ArcGISRESTful(
    "https://gis.reshapewildfire.org/arcgis/rest/services/Hosted/Years_Since_Treatment/FeatureServer/0", 
    crs=4326, outfields='*', outformat='geojson')
obj_ids = twig.oids_bygeom([-111.75811,35.2,-111.69317,35.35235], 4326)
resp = twig.get_features(obj_ids)
gdf = pygeoutils.json2geodf(resp)
print(len(gdf.columns))

Might be good to add an official test that checks for number of fields. Note, I did not setup nox or do anything in the checklist below.

  • Tests added and nox passes.
  • Passes pre-commit run --all-files
  • Changes and the contributor name are documented in HISTORY.rst.

Fix case in "outFields" parameter. Parameter "outfields" was being ignored, thus it was not possible to download fields other than "name".

Get "supportedQueryFormats" from the layer of interest instead of the whole feature service. Fixes issue where layer and service have different supported formats, as in "https://gis.reshapewildfire.org/arcgis/rest/services/Hosted/Years_Since_Treatment/FeatureServer/0"
@cheginit
Copy link
Collaborator

Thanks for the PR! Can you please add a test to tests/test_pygeoogc.py file and also a description of the fix and your name to the HISTORY.rst file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants