Opened 7 years ago

Closed 5 years 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 by Even Rouault, 7 years ago

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 by Even Rouault, 7 years ago

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

comment:3 by Even Rouault, 7 years ago

In 38519:

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

comment:4 by Even Rouault, 7 years ago

In 38520:

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

comment:5 by Even Rouault, 7 years ago

In 38521:

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

in reply to:  1 comment:6 by TobWen, 7 years ago

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.

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

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 by TobWen, 7 years ago

Maybe even better: WHERE=OBJECTID_1 BETWEEN 1 and 1000

comment:9 by Even Rouault, 5 years ago

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.