Skip to main content
Solved

Table Where clause in PostGIS. How do I sort out all objects that are within an polygon?

  • February 26, 2018
  • 4 replies
  • 45 views

Forum|alt.badge.img+1

Hey!

I have a problem with my PostGIS database. Trying to get it much more efficient. It contains information from several counties, which means I read a lot of unnecessary information that I do not need and the computer is giving up.

Something similar "Fastkart.ak = '2085' and all information within 2085 from Fastkart.by" is what I need to do. But can’t figure out how. I’ve tried many hours to write clause under feature type and also by using sqlexecutor.

Figure 1 shows all tables in the database. Often when I am going to read information from my municipality, it must read all the municipalities' buildings eg which makes it very big amounts. Of course, you can drive a clipper directly after the base but would be better if I could get the data base to read no information other than it by 2085.

Anyone know if it’s possible to write "Where clause" directly in the database when you do not have matching information I attribute table?

(That would be the best option)

Option 2 belongs to the pictures 2,3,4

The pictures 3.1.3.2 show the attribute tables that I am interested in. They have no attribute matching each other and therefore I need to do intersect, within, spatial join or similar.

Stored fixed map.ak contains the polygon that shows the surface of my municipality. That has reached 2085. Fastkart.by contains all buildings.

Would you like to write a "Where clause" where I get all the information from fastkart.by that is located within fastkart.ak2085.

In Figure 4 you will see my last attempt to do this with the sql executor.

Can’t load workbench with database for privacy reasons.

Best answer by david_r

Try the FeatureReader rather than the SQLExecutor. You can send the municipality polygon to the FeatureReader and it will automatically filter the features using the geometry.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

david_r
Celebrity
  • 8394 replies
  • Best Answer
  • February 26, 2018

Try the FeatureReader rather than the SQLExecutor. You can send the municipality polygon to the FeatureReader and it will automatically filter the features using the geometry.


takashi
Celebrity
  • 7843 replies
  • February 26, 2018

Hi @flugan87, the @Value function should starts with uppercase V.

The SQLExcutor might work after correcting the function name, but I think using the FeatureReader (set 'Contain' to the Spatial Filter parameter) would be easier in this case.


takashi
Celebrity
  • 7843 replies
  • February 26, 2018

Hi @flugan87, the @Value function should starts with uppercase V.

The SQLExcutor might work after correcting the function name, but I think using the FeatureReader (set 'Contain' to the Spatial Filter parameter) would be easier in this case.

oops, duplicate answer.

 

 


Forum|alt.badge.img+1
  • Author
  • 25 replies
  • February 27, 2018

Try the FeatureReader rather than the SQLExecutor. You can send the municipality polygon to the FeatureReader and it will automatically filter the features using the geometry.

Thank you!!

 

Still a newbie at this and have alot to learn.