Thanks very much Andrea.  That was the key!  I used JTS to convert the
ReferencedEnvelope into a JTS Polygon, apply the proper transform and the
intersect filter now works.  

 

Hal

 

From: [email protected] [mailto:[email protected]] On Behalf Of
Andrea Aime
Sent: Thursday, September 12, 2013 8:42 AM
To: Hal Mirsky; Jody Garnett
Cc: geotools users
Subject: Re: [Geotools-gt2-users] null pointer expection in
ShapefileFeatureSource

 

On Thu, Sep 12, 2013 at 5:26 PM, Hal Mirsky <[email protected]> wrote:

Hello,

 

I found that if I changed the filter from 

filter = ff2.intersects(ff2.property(poigeometryAttributeName),
ff2.literal(bbox));

 

to

       filter = ff2.bbox(ff2.property(poigeometryAttributeName), bbox);

 

No exception is raised and the correct set of features is returned.

 

Hum...a second here. What the type of bbox?

Is it a Envelope of some kind?

 

If so the first filter does not make sense (at least not to me), the second
operand of

a intersects filter should be a JTS geometry, not an Envelope.

The old data store was probably lenient towards this use case which,
personally,

I've never seen in practice.

 

Jody, do you know if we ever supported spatial filters against envelope
objects?

 

Cheers

Andrea

 

-- 

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

==

 

Ing. Andrea Aime 

@geowolf

Technical Lead

 

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054  Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39  339 8844549

 

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

 

-------------------------------------------------------

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to