Re: [OpenMap Users] SpatialIndex Class

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Fri, 6 May 2011 19:02:06 -0400

Hi Will,

That's been fixed in the beta, you can check that out of svn using instructions on the download page on the website.

  Thanks,

-- Don

On May 4, 2011, at 7:41 PM, "Will Washington" <wrwashington_at_fedex.com> wrote:

> First of all, I am fairly new to OpenMap and GIS in general so please let me know if I am off-base here.
>
>
>
> However, I recently upgraded to a newer version of OpenMap (4.6.5) and found that the spatial index file is no longer created automatically (if missing) and is instead created in memory.
>
>
>
> This causes my application to produce the “Creating spatial index file: ” message, although no file is actually created in the directory with the shp file.
>
>
>
> The documentation for the SpatialIndex class requires only two arguments to create the ssx file manually; however, SpatialIndex.java is looking for 3 args.
>
>
>
>
>
> From OpenMap API
>
> ----------------------
>
> java com.bbn.openmap.layer.shape.SpatialIndex -c file.shp
>
> Creates spatial index file.ssx from shape file file.shp.
>
>
>
>
>
> From SpatialIndex.java
>
> ----------------------
>
> public static void main(String argv[]) throws IOException {
>
> int argc = argv.length;
>
>
>
> if (argc == 0) {
>
> // No arguments, give the user some help
>
> printUsage(System.out);
>
> System.exit(0);
>
> }
>
>
>
> if (argv[0].equals("-d")) {
>
> if (argc == 2) {
>
> String name = argv[1];
>
> SpatialIndex si = new SpatialIndex(name);
>
> si.dumpIndex(false);
>
> } else if ((argc == 3) && (argv[1].equals("-b"))) {
>
> String name = argv[2];
>
> SpatialIndex si = new SpatialIndex(name);
>
> si.dumpIndex(true);
>
> } else {
>
> printUsage(System.err);
>
> System.exit(1);
>
> }
>
> } else if ((argc == 3) && argv[0].equals("-c")) {
>
> String shapeFile = argv[1];
>
> SpatialIndex.FileIndex.create(shapeFile);
>
> } else {
>
> printUsage(System.err);
>
> System.exit(1);
>
> }
>
> }
>
>
>
> ------------------------------------------
>
> Finally, I used a dummy value as a placeholder for the third arg and the ssx file was created successfully.
>
>
>
> java com.bbn.openmap.layer.shape.SpatialIndex -c file.shp dummyvalue
>
>
>
> Is this a known issue and if so, has this been address in the next release?
>
>
>
> Regards,
>
> Will W.


--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri May 06 2011 - 19:04:25 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:10 EDT