Thanks Michael. I've had a closer look at the data and it looks like a few of 
the features have null geometries, so nothing to do with the index.

Nick

On 5 Aug 2011, at 10:59, Michael Bedward wrote:

> Hello Nick,
> 
> From the error trace, I don't think this is related to the number of
> features but rather to something odd about the bounding envelope of
> one of the features being inserted into the index. However, you're
> probably better of posting this question on the JTS list.
> 
> Michael
> 
> 
> On 5 August 2011 19:26, Nick Malleson <[email protected]> wrote:
>> Hi,
>> 
>> I'm trying to read in features from a shapefile and add them to a spatial
>> index for later processing. It has been working OK but when trying to read a
>> relatively large file (OpenStreetMap roads in England) I get this error:
>> 
>> Exception in thread "main" java.lang.IllegalArgumentException: Exponent out
>> of bounds
>>        at
>> com.vividsolutions.jts.index.quadtree.DoubleBits.powerOf2(DoubleBits.java:55)
>>        at com.vividsolutions.jts.index.quadtree.Key.computeKey(Key.java:97)
>>        at com.vividsolutions.jts.index.quadtree.Key.computeKey(Key.java:91)
>>        at com.vividsolutions.jts.index.quadtree.Key.<init>(Key.java:65)
>>        at com.vividsolutions.jts.index.quadtree.Node.createNode(Node.java:52)
>>        at 
>> com.vividsolutions.jts.index.quadtree.Node.createExpanded(Node.java:62)
>>        at com.vividsolutions.jts.index.quadtree.Root.insert(Root.java:79)
>>        at 
>> com.vividsolutions.jts.index.quadtree.Quadtree.insert(Quadtree.java:143)
>>        at
>> uk.ac.leeds.mass.spatialanalysis.spacesyntax.SpaceSyntax.populateSpatialIndex(SpaceSyntax.java:678)
>>       ...
>> 
>> As I said, it works with other files (e.g. OSM for Scotland) so I'm guessing
>> that it's something to do with the number of features, but I can't work out
>> what DoubleBits is trying to do. Any ideas?
>> 
>> Thanks,
>> Nick
>> 
>> 
>> --
>> View this message in context: 
>> http://osgeo-org.1803224.n2.nabble.com/Exponent-out-of-bounds-when-adding-to-a-spatial-index-tp6655807p6655807.html
>> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>> 
>> ------------------------------------------------------------------------------
>> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
>> The must-attend event for mobile developers. Connect with experts.
>> Get tools for creating Super Apps. See the latest technologies.
>> Sessions, hands-on labs, demos & much more. Register early & save!
>> http://p.sf.net/sfu/rim-blackberry-1
>> _______________________________________________
>> Geotools-gt2-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>> 


------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to