Hi,
I was thinking about the basic "fill the screen" query. This is the minimum
bbox query which works for me:
SELECT AsBinary("way") FROM osm_line WHERE way && SetSRID('BOX3D(3602438.0
7016321.0,3604342.0 7017928.0)'::box3d,2393)
User should build the main query
SELECT AsBinary("way") FROM osm_line
OpenJUMP should add BBOX filtering part:
WHERE way && SetSRID('BOX3D(3602438.0 7016321.0,3604342.0
7017928.0)'::box3d,2393)
If query contains WHERE set by user it should be naturally
AND way && SetSRID('BOX3D(3602438.0 7016321.0,3604342.0 7017928.0)'::box3d,2393)
- && SetSRID('BOX3D()'::box3d,) is always the same
- BOX3D values should come from map window.
- Name of the geometry column (here "way" is harder; would it be reliable to
believe that it is the column name used in AsBinary(), or should the user give
it through user interface?
- Same with the projection (here 2393); OJ has a function "Change projection
code" under the Layers menu, it could be taken from there, or user could give
it.
Of course the query could be made better, for example by adding "AND
intersects" if it is important to avoid extra features which may be returned by
bounding box comparison. Another idea fascinating me would be to use the
geometry of one selected feature for building the query
SELECT ID, NAME FROM ROADS_GEOM WHERE GEOM &&
GeomFromText('POLYGON((191232 243117,191232 243119,191234
243117,191232 243117))',-1);
User would select or draw a polygon with OJ and ask database to fill the area
with intersecting features.
-Jukka Rahkonen-
-----Alkuperäinen viesti-----
Lähettäjä: Michaël Michaud [mailto:[email protected]]
Lähetetty: ke 11.11.2009 13:50
Vastaanottaja: OpenJump develop and use
Aihe: Re: [JPP-Devel] Enhancement to Run datatore query
Hi,
I use "Run datastore query panel " a lot and your suggestion seems very
useful to me.
I'll try to dive into the code to see if I can add this feature, but it
may be difficult to manage every case in a clean way (because the
geometry column name is not fixed and because the query may be complex,
with where conditions, joins, group by...).
I think one approach could be to identify the geometry column
(asbinary() or asewkb()), to create an alias
ex. asbinary(geomcolumn) as GEOMETRY4OJ
then to create a new query like
select * from (userquery) where GEOMETRY4OJ && bbox.geometry and
intersects(GEOMETRY4OJ,bbox.geometry)
not sure if it works
any idea ?
Michaël
Rahkonen Jukka a écrit :
> Hi,
>
> While playing with SkyJUMP and pdf printing which does not work with Add
> datastore layer I soon realised that I would like to see a "Use view extents
> as BBOX filter" check box in the Run datastore query panel.
>
> -Jukka Rahkonen-
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Jump-pilot-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel