Re: [OpenMap Users] Labeling Shape Layer..

From: JR Andreassen <janrune_at_io.com>
Date: Wed, 04 Oct 2006 13:50:32 -0500

Hello again...
 I have another problem....
 I need to load a shape file dataset that has a 1.1gig dbf. !
More than 80 % of the fields are junk or blank.

I was thinking about creating a filter on the DBF reader.
Something like
<shapefile>.selectFields=<field name1>{,<field name2> {...{, <field name
N>}}}
Extend DbfTableModel
    getDbfTableModel()
    public void setWritable(boolean set) { }
    public boolean getWritable() { return false; }
    commitEvents(...) {}
Extend DbfInputStream overriding
        readHeader();
        readFieldDescripters();
        readData();

Now, we could ofcourse achieve the same by copying and modifying the table.
But given the size, the costs would be enormus.

Anyone see any issues with that ??
Also, I'm hoping to ad a label to the Shape Layer.
 Issues anyone ??
   Thanks
       JR

> Hi Stephane.
> Thanks for the info, that helped.
>
> Next I was going to add a label to the shape layer.
> I found the spot to add it.
> By adding a property (Label attribute) it would do it.
> Has anyone done any work on this ???
> Thanks
> JR
>
>
>> Hi JR !
>>
>> I don't know much about shapeFiles in openMap for the moment, but I
>> may help you for OMTextLabelers :
>> You can use a DeclutterMatrix. If you have an OMGraphicHandlerLayer,
>> here is what you could do in your "prepare()" method :
>>
>> Projection projection = getProjection();
>> declutterMatrix.setWidth(projection.getWidth());
>> declutterMatrix.setHeight(projection.getHeight());
>> declutterMatrix.create();
>>
>> Then, you can change all the OMTextLabeler's positions in the
>> prepared graphics list using the declutterMatrix. This is a little
>> tricky because you must tell the declutterMatrix which positions and
>> sizes the labelers occupies in the matrix.
>> I advise you to use the code given in the "declutterLabel" method of
>> the "Location" class.
>> And don't forget to use a declutter limit (last parameter of
>> DeclutterMatrix.setNextOpen()) or else you could get your labels very
>> far away from their original positions...
>>
>> In fact, all these things are already handled in the LocationLayer,
>> using Location objects instead of OMTextLabelers... You should have a
>> look at it, maybe it is sufficient for your needs.
>>
>> But beware of multiple lines labelers : I found an issue in
>> "declutterLabel" when using multiple lines labelers (it should be in
>> the archives) ...
>> Also note that decluttering is a slow process.
>> I think I will try to build a kind of "DeclutterLayer" in a few
>> month, in order to have the labels decluttered in a separate layer
>> (=> in a separate worker thread) and let this layer always be on top
>> of other layers... I'll send it to this list as soon as it will work !
>>
>> Hope this helps !
>>
>> Regards,
>> Stephane
>>
>>
>>
>> Le 17:02 28/09/2006, vous avez écrit:
>>
>>> Hi Folks...
>>>
>>> I've gone through the List archive looking for the way to Label
>>> Shape files.
>>> I found quite a few references to people looking for it.
>>> Though, no permanent solution.
>>> Has anyone done this ?? I'd prefer not to duplicate effort, but I'll
>>> do it and share it if there is not something out there.
>>>
>>> Also, on that note.
>>> Has there been any work done on the OMTextLabler to prevent
>>> cluttering ?
>>> It get's very bussy with City street names when you zoom out.
>>> Any thoughts on approach ?
>>> Thanks
>>> JR
>>>
>>> --
>>> [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"]
>>>
>
> --
> [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"]
>

--
[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 Oct 04 2006 - 14:55:22 EDT

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