Hi, It is just a general SQL query tool and you must, or you have a great opportunity, to add the test directly into your SQL. This might get what you want with PostGIS 2.x
select st_intersection(...) AS geom ... FROM... WHERE ST_GeometryType(geom)='ST_Polygon"; -Jukka- Uwe Dalluege wrote: > > Hi Jukka, > > thank you very much for your help! > Now it works for me. > > But I receive two rows with > GEOMETRYCOLLECTION EMPTY information > in the OJ layer in my example. > > This selection produces empty geometries because it intersects only one of > three geometries. > > Is it possible to check if the geometry is empty and put it not to the OJ > layer? > > Uwe > Am 10.04.2013 15:25, schrieb Rahkonen Jukka: > > Uwe Dalluege wrote: > >> > >> Hi Jukka, > >> > >> thank you for this example. > >> Do you know whether this works? : > >> > >> select st_intersection ( geometry, ${fence:0} ) from "Bauernhof" > >> > >> The table "Bauernhof" contains a geometry-column called "geometry" > >> > > It works so that the resulting SQL for me looks like select > > ST_Intersection(geoloc,ST_GeomFromText('POLYGON > ((3424728.225608409 > > 6715639.342894198, 3424728.225608409 6715738.683124313, > > 3424855.5848777858 6715738.683124313, 3424855.5848777858 > > 6715639.342894198, 3424728.225608409 6715639.342894198))',-1)) from > > test_table; > > > > You can see that the rectangular geometry of the fence itself, not any > features inside it, is placed into the query. The number after ":" is SRID, I > used -1 in my case. The query itself gives an error when I tested it directly > with PSQL "found non-noded intersection between...". OpenJUMP naturally > cannot get a result and it is also unable to show any reasonable error > message, just a general java.sql.SQLException. > > > > -Jukka- > > > >> Inside the fence there is a polygon > >> intersects the geometry from "Bauernhof" > >> But this does not work. > >> > >> 1. I do not see an error message. > >> 2. What is the 0 after fence: ? > >> > >> Regards > >> > >> uwe > >> > >> Am 10.04.2013 11:40, schrieb Rahkonen Jukka: > >>> Hi, > >>> > >>> They are helper shortcuts for adding a spatial filter into the query. > >>> The result will be something like select * from my_layer where > >>> geoloc && ${view:4326} > >>> > >>> Thus only features intersecting the view, box drawn with the fence > >>> tool or > >> total extents of the selected features will be selected. > >>> > >>> -Jukka Rahkonen- > >>> > >>> Uwe Dalluege wrote: > >>> > >>>> Hi, > >>>> > >>>> I like to describe the > >>>> function "Run Datastore Query" in my PostGIS tutorial but I can not > >>>> find a desciption of this. > >>>> What are the buttons > >>>> "View, Fence and Selection" good for? > >>>> > >>>> > >>>> Regards > >>>> > >>>> Uwe > >>>> > >>>> ------------------------------------------------------------------- > >>>> -- > >>>> --------- Precog is a next-generation analytics platform capable of > >>>> advanced analytics on semi-structured data. The platform includes > >>>> APIs for building apps and a phenomenal toolset for data science. > >>>> Developers can use our toolset for easy data analysis & > >>>> visualization. Get a free account! > >>>> http://www2.precog.com/precogplatform/slashdotnewsletter > >>>> _______________________________________________ > >>>> Jump-pilot-devel mailing list > >>>> Jump-pilot-devel@lists.sourceforge.net > >>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > >>> > >>> -------------------------------------------------------------------- > >>> -- > >>> -------- Precog is a next-generation analytics platform capable of > >>> advanced analytics on semi-structured data. The platform includes > >>> APIs for building apps and a phenomenal toolset for data science. > >>> Developers can use our toolset for easy data analysis & visualization. > >>> Get a free account! > >>> http://www2.precog.com/precogplatform/slashdotnewsletter > >>> _______________________________________________ > >>> Jump-pilot-devel mailing list > >>> Jump-pilot-devel@lists.sourceforge.net > >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > >>> > > > > ---------------------------------------------------------------------- > > -------- Precog is a next-generation analytics platform capable of > > advanced analytics on semi-structured data. The platform includes APIs > > for building apps and a phenomenal toolset for data science. > > Developers can use our toolset for easy data analysis & visualization. > > Get a free account! > > http://www2.precog.com/precogplatform/slashdotnewsletter > > _______________________________________________ > > Jump-pilot-devel mailing list > > Jump-pilot-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel