Skip to main content
Question

Pass a shape to a reader to spatially select an sde feature so a large amount of data doesn't have to be read


slade_bridges
Forum|alt.badge.img

i have a feature in the sde db that is 1.7M records, the data i am trying to select has a field i want the user to select from. the 1.7M records data set does not have that field so i want to select them spatially, which i am doing now, without all 1.7M records having to be read by the workbench. 1000 or so records to select takes about an hour due to the workbench reading all the records before the spatial selection happens. is there any way to pass my buffer results from the users selection to the reader in the envelope section of the reader before all the record are read?

14 replies

redgeographics
Celebrity
Forum|alt.badge.img+50

Yes, you can use a FeatureReader transformer to read from your database. It needs to be triggered by a feature and can use that feature to do a spatial selection.


slade_bridges
Forum|alt.badge.img

"it needs to be triggered by a feature" does that mean the buffer i am creating from the users selection will work?

 


redgeographics
Celebrity
Forum|alt.badge.img+50
slade_bridges wrote:

"it needs to be triggered by a feature" does that mean the buffer i am creating from the users selection will work?

 

Yes. You do need to make sure it's in the same coordinate system as the data you're reading and set the spatial filter option.


slade_bridges
Forum|alt.badge.img

that will be an issue, i am reprojecting because the sde is in nad83 and i need it in wgs1984

 


redgeographics
Celebrity
Forum|alt.badge.img+50
slade_bridges wrote:

that will be an issue, i am reprojecting because the sde is in nad83 and i need it in wgs1984

 

So reproject that buffer to nad83, use it to read the sde and then reproject the resulting data to whatever you want.


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • July 21, 2022

If you use a feature reader you can send your bounding box as the trigger for that and use it as a spatial filter

image


slade_bridges
Forum|alt.badge.img

how do i call my shape in the spatial filter, i see attributes and user parameters but not a feature

 


redgeographics
Celebrity
Forum|alt.badge.img+50
slade_bridges wrote:

how do i call my shape in the spatial filter, i see attributes and user parameters but not a feature

 

The Initiator feature is used as the spatial filter.


slade_bridges
Forum|alt.badge.img

ok, so the initiator is not the large data set, its the shape and in the reader configure the db connection to the feature?

 


redgeographics
Celebrity
Forum|alt.badge.img+50
slade_bridges wrote:

ok, so the initiator is not the large data set, its the shape and in the reader configure the db connection to the feature?

 

Exactly. It'll only read features from the large dataset that have a spatial relation with the initiator feature.


slade_bridges
Forum|alt.badge.img

THAT IS AWESOME, you guys saved me like 50 min of processing, ran my test in 5 min 48 sec as opposed to 59 min


redgeographics
Celebrity
Forum|alt.badge.img+50
slade_bridges wrote:

THAT IS AWESOME, you guys saved me like 50 min of processing, ran my test in 5 min 48 sec as opposed to 59 min

😃


slade_bridges
Forum|alt.badge.img

stupid question: how do i clear the data that was pulled into the workbench? i have to make this for other groups with other sde db connections, i have changed the db connections in the readers and feature readers but the data i just ran is still there, i tried to purge temp files but the data is still there.


redgeographics
Celebrity
Forum|alt.badge.img+50
slade_bridges wrote:

stupid question: how do i clear the data that was pulled into the workbench? i have to make this for other groups with other sde db connections, i have changed the db connections in the readers and feature readers but the data i just ran is still there, i tried to purge temp files but the data is still there.

That data is only there in your cache. If you close Workbench it's gone. If somebody else opens the .fmw file (on another machine), they won't see that data.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings