Select to view content in your preferred language

Filter down a featureset created from local data?

238
2
Jump to solution
a month ago
AlfredBaldenweck
MVP Regular Contributor

I have data stored locally in a geodatabase. I'd like to use the arcgis module to get this data as a featureset, filtered to where it intersects a hosted layer.

I only seem to be able to get my local data as a feature set, but only feature layers have a query() method. How can I do this?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
Clubdebambos
MVP Regular Contributor

Hi @AlfredBaldenweck,

One option is to use the GeoAccessor class where you have from_featureclass() (from disk/local) and from_layer() (FeatureLayer) options. You now have both as a spatially enabled dataframe (SEDF) and can use the GeoAccessor overlay() method with an intersection option.

Once you have the returned SEDF from the overlay you can use the to_featureset() to have a FeatureSet object.

Let me know if that gets you on the right path or if there are any follow questions. The documentation is not the greatest of help for these types of workflows.

All the best,

Glen

~ learn.finaldraftmapping.com

View solution in original post

2 Replies
Clubdebambos
MVP Regular Contributor

Hi @AlfredBaldenweck,

One option is to use the GeoAccessor class where you have from_featureclass() (from disk/local) and from_layer() (FeatureLayer) options. You now have both as a spatially enabled dataframe (SEDF) and can use the GeoAccessor overlay() method with an intersection option.

Once you have the returned SEDF from the overlay you can use the to_featureset() to have a FeatureSet object.

Let me know if that gets you on the right path or if there are any follow questions. The documentation is not the greatest of help for these types of workflows.

All the best,

Glen

~ learn.finaldraftmapping.com
AlfredBaldenweck
MVP Regular Contributor

That looks like it would work. 

I just don't know why you can't filter a featureset object you already have, though...

Thanks!

0 Kudos