Re: [OpenMap Users] Problem using VPFLayer

From: Don Dietrick <dietrick_at_bbn.com>
Date: Wed, 02 Jul 2008 15:21:14 -0400

Looking at the setProperties(...) method, you probably have to call
checkWarehouse(), or create a warehouse and set it on the layer.

The warehouse needs to be set up with the features you want to pull out
of the database, however. This is usually done with properties.

The VPFConfig class will let you inspect the coverage and feature types
available in a VPF database, and will print out the properties needed.

You can step through the VPFLayerGraphicWarehouse to figure out how to
set up warehouse to look for features, if you want to set that up
programmatically.

Hope this helps,

Don

Kennedy Roberts wrote:
> Don,
>
> Thanks for the response. Even though you can't tell from the
> pseudo-code snippet that I posted, I am getting the directory path
> programmatically, I'm not just specifying it with a hardcoded string.
> Basically, I'm recursively crawling a directory structure (from a
> specified root directory) and recording any directory that contains a
> "lat" or "lat." file in it. I then pass all of those directory paths to
> the setPath method of VPFLayer as a String array. I do all of this
> using the methods provided in the java.io.File class.
>
> I mention all this because I am positive that my problem is not related
> to forward/back slash issues or typos in the directory path. I'm not
> sure what else it might be, but is there anything else I have to do to
> initialize a VPFLayer?
>
> Thanks,
>
> Kennedy
>
>
> ----- Original Message ----- From: "Don Dietrick" <dietrick_at_bbn.com>
> To: "Davidian" <kroberts_at_syrres.com>
> Cc: <openmap-users_at_bbn.com>
> Sent: Wednesday, July 02, 2008 2:27 PM
> Subject: Re: [OpenMap Users] Problem using VPFLayer
>
>
>> Hi Kennedy,
>>
>> Make sure you use forward slashes in path names when specifying them
>> in code. You can use double backslashes, but forward slashes seem to
>> work more consistently for me.
>>
>> Also, make sure there is a "lat" or "lat." file in the noamer directory.
>>
>> - Don
>>
>>
>> Davidian wrote:
>>> I know that there are multiple posts about using VPFLayers, but my
>>> situation is a little different: I am creating everything
>>> programatically, rather than via the properties file. For some
>>> reason, when I construct a VPFLayer and call setPaths, I get the
>>> following error:
>>>
>>> * *** ERROR *** *
>>>
>>> *VPFLayer.getRectangle: Data path probably wasn't set correctly
>>> (C:\map_imagery_data\vector data\v1078\noamer). The warehouse not
>>> initialized.*
>>>
>>> My code is basically:
>>>
>>> VPFLayer layer = new VPFLayer();
>>> layer.setPath(IMAGERY_DIRECTORY_PATH); //the full path to the directory
>>>
>>> Does anyone have any suggestions?
>>>
>>> Thanks,
>>>
>>> Kennedy
>>>
>>> ------------------------------------------------------------------------
>>> View this message in context: Problem using VPFLayer
>>> <http://www.nabble.com/Problem-using-VPFLayer-tp18243484p18243484.html>
>>> Sent from the OpenMap mailing list archive
>>> <http://www.nabble.com/OpenMap-f16955.html> at Nabble.com.
>>

--
[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 Wed Jul 02 2008 - 15:22:19 EDT

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