LoginSignup
0
0

More than 1 year has passed since last update.

ArcGISで保存した地図を検索する

Last updated at Posted at 2022-07-03

はじめに

ArcGIS API for Pythonでsave関数で保存した地図を検索する方法をまとめた
gis.content.search()を使います

※地図の作成から保存までは別記事参照

前提

1.地図が作成され保存されていること

from arcgis.gis import GIS
# GISクラスの使用
gis = GIS()
# 品川区の地図作成
map = gis.map('品川区')
# 画像の情報を設定(タイトルなど)
sinagawaMapProperty = {'title':'品川区マップ',
            'snippet':'品川区の地図を作成',
            'tags':'sinagawa',
            'extent':map.extent
            }
# 地図を保存
map.save(item_properties=sinagawaMapProperty)

検索方法1

searchResult = gis.content.search('品川区')

print関数で出力すると

print(searchResult)

> [<Item title:"品川区マップ" type:Web Map owner:testuser>]

このように出力されると思います。

検索方法2(titleで検索)

searchResult = gis.content.search('品川区', title='品川区のマップ')

検索方法3(tagで検索)

searchResult = gis.content.search('品川区', tag='sinagawa')
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0