Re: [OpenMap Users] Question Regarding an Error Message When Loading Shapefiles

From: Don Dietrick <dietrick@bbn.com>
Date: Thu May 27 2004 - 21:44:14 EDT

Hi Piotr,

I'm hoping that the recent changes in the beta version of OMGraphics
will help this cause, where OMGraphics can store attributes. I'm
working toward enabling the different ShapeLayer classes to have the
option of loading the dbf file contents into their particular
OMGraphics, so the lookup and text location would be much easier.

If someone would contribute existing code that did this, though, it
would be appreciated by many people.

Cheers,

Don

On May 27, 2004, at 2:05 AM, Piotr Kaminski wrote:

> Hi Don, hi everyone,
> I've seen similar question on the list a few times:
> "How to display street names for particular shape file?"
> As I understand ShapeLayer can't do that. Steet names
> are collected in dbf file and you have to put them manualy
> on the map (as separate layer probably). If such problem
> appears frequently maybe OpenMap should have built in
> support for such operations? I mean: someone who has
> implemented such feature might send its source code to
> group. This source could be added to OpenMap's code base.
> Regards
> Piotr Kaminski
>
> ----- Original Message -----
> From: "Don Dietrick" <dietrick@bbn.com>
> To: "Klaus, Erich P." <erichklaus@zai.com>
> Cc: <openmap-users@bbn.com>
> Sent: Wednesday, May 19, 2004 3:50 PM
> Subject: Re: [OpenMap Users] Question Regarding an Error Message When
> Loading Shapefiles
>
>
>> Hi Erich,
>>
>> The layers do not show street names as they are written. To get that
>> to happen, you'll have to write the code to create OMText objects from
>> the dbf files, and then use the corresponding geometries from the shp
>> to figure out where to put them (the OMText). The
>> com.bbn.openmap.plugin.esri.EsriPlugIn is an example of using the
>> DbfTableModel object to read the dbf file.
>>
>> You might want to look at the com.bbn.openmap.layer.shape.areas
>> package, and check out the AreaHandler. It does work in matching up
>> the geometries with the dbf file contents, too. But there isn't any
>> code in place to actually lay out the text on the map.
>>
>> Regards,
>>
>> - Don
>>
>>
>> On May 18, 2004, at 4:12 PM, Klaus, Erich P. wrote:
>>
>>> One Update to report,
>>>
>>>
>>>
>>> By commenting out the line in the properties file regarding the ssx
>>> file,
>>>
>>> A new ssx file was generated and the street lines were displayed,
>>>
>>> However I still lack all street names being displayed.
>>>
>>>
>>>
>>> I also added the following line to my properties file:
>>>
>>>
>>>
>>> ShapeRoads.csvFile=/data/tigershapefiles/roads/tgr51600lkA.csv
>>>
>>>
>>>
>>> I also converted tgr51600lkA.dbf into tgr51600lkA.csv with microsoft
>>> excel and dropped that into my data dir with the .csv extension
>>>
>>>
>>>
>>> Any suggestions as to what I did wrong or how to get the street names
>>> to show?
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Erich Klaus
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: owner-openmap-users@bbn.com
>>> [mailto:owner-openmap-users@bbn.com]
>>> On Behalf Of Klaus, Erich P.
>>> Sent: Tuesday, May 18, 2004 5:38 PM
>>> To: openmap-users@bbn.com
>>> Subject: [OpenMap Users] Question Regarding an Error Message When
>>> Loading Shapefiles
>>> Importance: Low
>>>
>>>
>>>
>>> Hello,
>>>
>>>
>>>
>>> I recently downloaded some shapefiles that should show roads from:
>>>
>>>
>>>
>>> http://www.esri.com/data/download/census2000_tigerline/index.html
>>>
>>>
>>>
>>> and I get the following on loading OpenMap:
>>>
>>>
>>>
>>> OpenMap(tm) Version 4.6
>>>
>>> Copyright (C) BBNT Solutions LLC. All rights reserved.
>>>
>>> See http://openmap.bbn.com/ for details.
>>>
>>>
>>>
>>>
>>>
>>> *** ERROR ***
>>>
>>> ShapeLayer SpatialIndex: problem setting up the shape files:
>>>
>>> shape file: data/tigershapefiles/roads/tgr51600lkA.shp
>>>
>>> spatial index file: data/tigershapefiles/roads/tgr51600lkA.ssx
>>>
>>>
>>>
>>>
>>>
>>> Does anyone know any gotchas with loading data from these files.
>>>
>>> I get nothing showing up on my map.
>>>
>>>
>>>
>>>
>>>
>>> Error Checking:
>>>
>>> ---------------
>>>
>>>
>>>
>>> As Per:
>>>
>>> http://groups.google.com/groups?hl=en&lr=&ie=UTF
>>> -8&selm=63b239a8.0206230953.121b86cc%40posting.google.com
>>>
>>>
>>>
>>> java com.bbn.openmap.layer.shape.SpatialIndex -d -b
>>> /data/tigershapefiles/roads/tgr51600lkA.shx
>>>
>>> Record 1: 50, 40; 5.075885452090478E-116, 5.075886284092647E-116,
>>> 5.075887116094817E-116, 5.075887948096986E-116
>>>
>>> Record 2: 270, 40; 5.075884771435294E-116, 5.075885603437464E-116,
>>> 5.075886435439633E-116, 5.075887267441802E-116
>>>
>>> Record 3: 490, 48; 5.075884242053232E-116, 5.075885074055402E-116,
>>> 5.075885906057571E-116, 5.07588673805974E-116
>>>
>>> Record 4: 718, 48; 1.7272337239631866E-77, 5.075884695946461E-116,
>>> 5.07588552794863E-116, 5.0758863599508E-116
>>>
>>> Record 5: 954, 40; 5.075888023955138E-116, 5.075884015291278E-116,
>>> 5.075884847293447E-116, 5.075885679295616E-116
>>>
>>> Record 6: 1174, 40; 5.075887343299954E-116, 5.075888175302124E-116,
>>> 5.075884166638263E-116, 5.877473287209275E-39
>>>
>>>
>>>
>>> Are these valid values above?
>>>
>>>
>>>
>>> OpenMap Properties File:
>>>
>>> ------------------------
>>>
>>>
>>>
>>> openmap.layers=date dtlayer distlayer quake daynight cities test
>>> graticule demo shapePolitical ShapeRoads
>>>
>>> openmap.startUpLayers=graticule drawing shapePolitical ShapeRoads
>>> shap
>>>
>>>
>>>
>>> ### ShapeFile layer, tigerline census data line features - roads
>>>
>>> ShapeRoads.class=com.bbn.openmap.layer.shape.ShapeLayer
>>>
>>> ShapeRoads.prettyName=Roads
>>>
>>> # Specify shapefile and spatial-index file as a filename or pathname.
>>>
>>> # If the former, you must reference the directory where this file
>>>
>>> # lives in your CLASSPATH
>>>
>>> ShapeRoads.shapeFile=/data/tigershapefiles/roads/tgr51600lkA.shp
>>>
>>> ShapeRoads.spatialIndex=/data/tigershapefiles/roads/tgr51600lkA.ssx
>>>
>>> # Colors (32bit ARGB)
>>>
>>> ShapeRoads.lineColor=ffffffff
>>>
>>> ShapeRoads.fillColor=ff666666
>>>
>>>
>>>
>>
>>
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> Don Dietrick, dietrick@bbn.com
>> BBN Technologies, Cambridge, MA
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>
>> --
>> [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"]
>>
>
> --
> [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"]
>
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick@bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[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 Thu May 27 21:45:45 2004

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:38 EDT