0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

file geodatabaseの中身をサクッと参照する

Posted at

ArcGISを使っていると、
ちょっとしたときにあのデータの中身なんだったっけなと思うことがたびたびある割に
エクスプローラでは参照できないため、ArcGIS Proなどを起動しないと参照できないのがめんどくさい。

ということで、以下をNotebookで実行させて確認するとたぶん速い

from arcgis.features import SpatialDataFrame
import arcpy
import os
gdb = r"C:\temp\sample.gdb"
arcpy.env.workspace = gdb
arcpy.ListFeatureClasses()

これで中身のフィーチャクラスが参照できるので、下で名称を指定する

fc = os.path.join(gdb, "参照したいフィーチャクラス名")
SpatialDataFrame.from_featureclass(fc)

image.png

こんな感じ。

自分の備忘録としても残しておく。 

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?