One Star

perform a intersection on postgis and export the result to a shapefile

Hi,
Sorry for my english :
I want to perform a spatial intersection between 2 postgis tables and export the result into a shape file.
I have a problem to configure the tmap. My originals tables are in the left panel, my destination schema in the right one.
I can't specify correctly the intersection condition between my 2 postgis table.
I want to use GeoOperation.Intersects(null,null)...
Can someone help me ?
Thanks,
Mathieu Bossaert

  • SDI
6 REPLIES
One Star

Re: perform a intersection on postgis and export the result to a shapefile

Hi Mathieu,
You just have to activate the expression filter (green button) in one of the entry in the left panel.
Then will be able to use the GeoOperation.Intersects bteween your two geometrics rows (ie GeoOperation.Intersects(row1.the_geom, row2.the_geom))
--
Mathieu
One Star Fxp
One Star

Re: perform a intersection on postgis and export the result to a shapefile

Hello Mathieu,
in the left side, you should add an expression filter to one of the input (usually the main one) with something like GeoOperation.Intersects(row1.the_geom,row2.the_geom). Then drag & drop to the output flow the columns required.
Then if you want to create an intersection of the 2 geometries for each rows, you could type some JTS operations in the output but it's a bit tricky right now. We're working on improving that part providing some utility functions such as GeometryOperation.Intersection (row1.the_geom, row2.the_geom) to create the resulting geometry.
HTH.
Francois
One Star

Re: perform a intersection on postgis and export the result to a shapefile

Hi,
it's all right now! Thank you, I had a training few month ago in Chambery but I forgot some basics.
Thanks.
Mathieu.
One Star

Re: perform a intersection on postgis and export the result to a shapefile

Hi Mathieu,
I'm a student of Geodetic & Geomatics Engineering, Gadjah Mada
University, Indonesia.
I have been working in my final project (minithesis) about 3D spatial
database design for my bachelor's degree.
I am interesting in your presentation
(http://www.foss4g2007.org/presentations/view.php?abstract_id=224)
about user-defined function to create polyhedralsurface & TIN type in
PostGIS.
I have installed latest version of PostgreSQL & PostGIS on my windows
successfully. I want to use polyhedron & TIN function, but I think
there are no such functions in my PostGIS.
What should I do so I can use these functions?
Could You give me tutorial to create these functions (especially on
Windows), please?
regards,
Febri
One Star

Re: perform a intersection on postgis and export the result to a shapefile

Hi,
Sorry for my english :
I want to perform a spatial intersection between 2 postgis tables and export the result into a shape file.
I have a problem to configure the tmap. My originals tables are in the left panel, my destination schema in the right one.
I can't specify correctly the intersection condition between my 2 postgis table.
I want to use GeoOperation.Intersects(null,null)...
Can someone help me ?
Thanks,
Mathieu Bossaert

In the left side, you should add an expression filter to one of the input (usually the main one) with something like GeoOperation.Intersects. Then drag & drop to the output flow the columns required.
Then if you want to create an intersection of the 2 geometries for each rows, you could type some JTS operations in the output but it's a bit tricky right now. We're working on improving that part providing some utility functions such as GeometryOperation.Intersection. to create the resulting geometry.
nuoc hoa | nuoc hoa nam | nuoc hoa nu
One Star

Re: perform a intersection on postgis and export the result to a shapefile

Hi,
I want to perform a spatial intersection between two Shapefiles. The first one contains polygons (landuse data), the second one contains points (instrument data). I want to do the intersection to see in which polygons the points are located.
I connected the Shapefile Input steps with a tMap step and activated filter expressions. I used GeometryOperations -> Intersection. But I always get an error which says that the Operator ! is not defined for the type Geometry. But what type except Geometry can I use?
Can someone help please?
Thanks,
Kristin