Opened 2 years ago

Closed 6 months ago

#6895 closed defect (wontfix)

GeoJSON: ArcGIS-REST hardcoded variable

Reported by: TobWen Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

Hi there,

in https://trac.osgeo.org/gdal/browser/trunk/autotest/ogr/ogr_geojson.py#L2259 the output-type &f=geojson is hardcoded.

This leads to Error 400 on several servers when this filetype has another name. On some servers, this output type is named &f=json or even &f=pjson (of course, GeoJSON gets delivered).

Solution: When there's a output-format string in the URL, you don't need to change it:

https://localhost/arcgis/rest/services/web/trees/MapServer/0/query?where=objectid+is+not+null&outFields=*&outSR=25832&resultRecordCount=500&f=json"

Change History (9)

comment:1 Changed 2 years ago by Even Rouault

Can be reproduced with "https://geoservice.bochum.de/arcgis/rest/services/Internet/Baumkataster/MapServer/0/query?where=objectid+is+not+null&outFields=*&resultRecordCount=500&f=json"

2 issues :

  • GetExtent?() indeed not working because f=geojson not supported and returnExtentOnly=true not supported in f=json
  • GetNextFeature?() doesn't support properly paging and iterates forever on the first features

comment:2 Changed 2 years ago by Even Rouault

Scrolling could potentially be implemnted by issuing a returnIdsOnly=true request, and then using requests like "where=OBJECTID < 50 AND OBJECTID > 0"

comment:3 Changed 2 years ago by Even Rouault

In 38519:

ESRIJson: avoid endless looping on servers that don't support resultOffset (refs #6895)

comment:4 Changed 2 years ago by Even Rouault

In 38520:

ESRIJson: avoid endless looping on servers that don't support resultOffset (refs #6895)

comment:5 Changed 2 years ago by Even Rouault

In 38521:

ESRIJson: avoid endless looping on servers that don't support resultOffset (refs #6895)

comment:6 in reply to:  1 Changed 2 years ago by TobWen

Replying to Even Rouault:

2 issues :

  • GetExtent?() indeed not working because f=geojson not supported and returnExtentOnly=true not supported in f=json
  • GetNextFeature?() doesn't support properly paging and iterates forever on the first features

Yep, paging got implemented in v10.3 and needs to be activated by the administrator. 10.1 and 10.2 don't support paging at all.

comment:7 in reply to:  2 Changed 2 years ago by TobWen

Replying to Even Rouault:

Scrolling could potentially be implemnted by issuing a returnIdsOnly=true request, and then using requests like "where=OBJECTID < 50 AND OBJECTID > 0"

Or (when the list has whole/jumps etc.): &objectIds=1,3,5,19,39,43 ... until the limit (normally of 1000).

comment:8 Changed 2 years ago by TobWen

Maybe even better: WHERE=OBJECTID_1 BETWEEN 1 and 1000

comment:9 Changed 6 months ago by Even Rouault

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub?. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.