Re: [OpenMap Users] Problem using VPFLayer

From: Don Dietrick <dietrick_at_email.domain.hidden>
Date: Wed Jul 02 2008 - 17:48:46 EDT

Kennedy Roberts wrote:
> So it sounds like there is no easy way to programmatically create and
> display a VPF layer like you can an RPFLayer. With the RPFLayer you
> basically construct one and point it to the directories that contains
> RPF data.
>
> Based on your description, it sounds like you would need a pretty
> intimate knowledge of the VPF format and the data you want to display in
> order to show it in OpenMap.

You don't have to know anything about the the format, but you should
know what you want to display. The VPF data contains many different
kinds of coverages (and feature types).

The types of coverages and features available from a VPF database are
contained inside the database, but different types of VPF data contain
different types of features.

So, you could analyze the data and set up layers for the features, you
probably wouldn't want to do one layer for the whole database.

>
> I guess I should explain: Our software does not use the OpenMap
> properties file setup at all. Everything is done programmatically. To
> take that a step further: We have set up or software so that it can
> dynamically recognize map data on the system it is installed on and show
> it on the map. The user basically points to their "data directory", and
> the software crawls the directory structure looking for RPF, ETOPO,
> DTED, and (hopefully) VPF data. If it finds it, it creates a layer, and
> adds it to the map.
>
> So, as you can see, your suggestion of manually inspecting the data
> files with utility classes provided by OpenMap, and then setting up a
> bunch of properties will not work.

I meant to suggest that you use the utility to look at a VPF database to
see what you are dealing with.

For the kind of automated setup you're looking for for VPF data, you'll
have to do some pre-management of the layer(s) in order to display all
the information in some way that makes sense to the user.

- Don

> ----- Original Message ----- From: "Don Dietrick" <dietrick@bbn.com>
> To: "Kennedy Roberts" <kroberts@syrres.com>
> Cc: <openmap-users@bbn.com>
> Sent: Wednesday, July 02, 2008 3:21 PM
> Subject: Re: [OpenMap Users] Problem using VPFLayer
>
>
>> 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@bbn.com>
>>> To: "Davidian" <kroberts@syrres.com>
>>> Cc: <openmap-users@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@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Jul 2 17:52:21 2008

This archive was generated by hypermail 2.1.8 : Wed Jul 02 2008 - 17:52:22 EDT