Download GeoJSON-Map from ArcGis-Server

huangapple go评论52阅读模式
英文:

Download GeoJSON-Map from ArcGis-Server

问题

I just added f=geojson to the REST-URL but then nothing happens although the GeoJSON-format should be supported. Where did I make a mistake?

我只是在REST-URL中添加了 f=geojson,但什么也没有发生,尽管应该支持GeoJSON格式。我犯了哪个错误?

英文:

I'm trying to download a map of all roads in the German state of North Rhine Westphalia in the GeoJSON-format. I found an ArcGIS-hosted server using a REST-Api and tried to understand how it works but as I am completely new to using these services, I might have made a mistake somewhere. Maybe anyone can help me...

I just added f=geojson to the REST-URL but then nothing happens although the GeoJSON-format should be supported. Where did I make a mistake?

The address is: https://www.arcgishostedserver.nrw.de/arcgis/rest/services/Verkehrswege_NRW/MapServer/0/

So in my case I tried https://www.arcgishostedserver.nrw.de/arcgis/rest/services/Verkehrswege_NRW/MapServer/0/f=geojson.

答案1

得分: 1

以下是翻译好的部分:

"The URL you mentioned is meant to provide general information about a single layer (id=0) in a Map Service.

To get the actual data, you need to use the Query operation. You can see a link to the supported operations in the end of the HTML page of the layer (first URL in your question), and you can also add the f=geojson parameter to get it in GeoJson format. Note that you must provide at least where parameter to specify the query.

For example, this will fetch all features where OBJECTID field is lower than 10, as GeoJson:

链接

If you set f=html (or just omit f), you'll get an HTML form for setting all optional parameters."

英文:

The URL you mentioned is meant to provide general information about a single layer (id=0) in a Map Service.

To get the actual data, you need to use the Query operation. You can see a link to the supported operations in the end of the HTML page of the layer (first URL in your question), and you can also add the f=geojson parameter to get it in GeoJson format. Note that you must provide at least where parameter to specify the quety.

For example, this will fetch all features where OBJECTID field is lower than 10, as GeoJson:

https://www.arcgishostedserver.nrw.de/arcgis/rest/services/Verkehrswege_NRW/MapServer/0/query?where=OBJECTID+%3C+10&f=geojson

If you set f=html (or just omit f), you'll get an HTML form for setting all optional parameters.

答案2

得分: 0

我也是新手,但只需更改f值。它有效。

2个图层:

Strassennetz_Stand20190731_Dis(0)

https://www.arcgishostedserver.nrw.de/arcgis/rest/services/Verkehrswege_NRW/MapServer/0/?f=pjson

Bahnstrecken_Stand012019(1)

https://www.arcgishostedserver.nrw.de/arcgis/rest/services/Verkehrswege_NRW/MapServer/1/?f=pjson
英文:

I am new too but just change f value. It works

2 Layers:

Strassennetz_Stand20190731_Dis (0)

https://www.arcgishostedserver.nrw.de/arcgis/rest/services/Verkehrswege_NRW/MapServer/0/?f=pjson

Bahnstrecken_Stand012019 (1)

https://www.arcgishostedserver.nrw.de/arcgis/rest/services/Verkehrswege_NRW/MapServer/1/?f=pjson

huangapple
  • 本文由 发表于 2023年2月24日 17:20:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/75554715.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定