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

From: Christian Weaves <christian.weaves@fugro-robertson.com>
Date: Wed May 19 2004 - 04:17:20 EDT

Klaus,

I remember having some problems when I was setting up a CSV layer. I
have included the openmap.properites for a CSV layer which works for me:
You'll need to make the appropriate layer name changes and also add the
layer (in this example Block_Names) to the openmap.layers

Hope it helps! Christian.

#block names for map
Block_Names.class=com.bbn.openmap.layer.location.LocationLayer
Block_Names.prettyName=Block Names
Block_Names.locationHandlers=Block_names_csv
Block_Names.useDeclutter=false
Block_Names.declutterMatrix=com.bbn.openmap.layer.DeclutterMatrix

#attached to block names above
Block_names_csv.class=com.bbn.openmap.layer.location.csv.CSVLocationHandler
Block_names_csv.prettyName=Block Names
Block_names_csv.locationFile=data/csv/block_names.csv
Block_names_csv.csvFileHasHeader=false
Block_names_csv.locationColor=0080ff
Block_names_csv.nameColor=000000
Block_names_csv.showNames=true
Block_names_csv.showLocations=false
Block_names_csv.nameIndex=0
Block_names_csv.latIndex=2
Block_names_csv.lonIndex=1

and an example of a few CSV lines

Well-140/1 -24.8823242 55.8852882
Well-140/6 -24.8811722 55.811367
Well-141/26 -24.8297997 56.0396729
Well-140/7 -24.7000008 55.7602882
Well-140/2 -24.7000008 55.9269524

----------------------------------------------------------------------------------

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
> <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
>
>
>

--
[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 May 19 04:18:35 2004

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