[R-sig-Geo] Binary Map File

Roger Bivand Roger.Bivand at nhh.no
Thu Nov 29 08:44:21 CET 2007


On Wed, 28 Nov 2007, Iqbal Jamal wrote:

> Thanks for your response.
>
> This is the limit of my understanding to date:
>
> For "binary" I was referring to the files with extensions *.G, *.L which
> I gather are built using gmake and lmake. I'm trying to understand the
> format for the *.gon and *.line files that can be built into *.G and *.L files
> for use with package 'map'.
>
> Please let me know if I am thinking about this in the right way.

You can go that way if you choose. You'll need first to break out the line 
segments into a text file, then massage them manually into the required 
unique format. They will then need to have their topologies built, and as 
a final exercise in patience, you'll need to find out which built polygons 
belong to which counties. All of this is described in:

Richard A. Becker, and Allan R. Wilks, "Constructing a Geographical 
Database", AT&T Bell Laboratories Statistics, Research Report [95.2], 
1995. http://public.research.att.com/areas/stat/doc/95.2.ps

as mentioned in ?map.

On the other hand, you might find it easier to read the boundary data file 
by functions in the rgdal, maptools, shapefiles, or RArcInfo packages, 
read it in, and use it directly? The difference is mostly that map() style 
polygons must have a built topology because the line segments are only 
stored once, while most external formats and there representations in R 
(such as the sp package SpatialPolygons class) use a list of closed rings, 
avoiding building topologies.

Usually, finding the data file is the most difficult, and you'll need it 
anyway irrespective of your choice.

Roger

>
> Iqbal
>
>
> ----- Original Message -----
> From: Roger Bivand <Roger.Bivand at nhh.no>
> Date: Wednesday, November 28, 2007 1:46 pm
> Subject: Re: [R-sig-Geo] Binary Map File
> To: Iqbal Jamal <iqbaljamal at shaw.ca>
> Cc: r-sig-geo at stat.math.ethz.ch
>
>> On Mon, 26 Nov 2007, Iqbal Jamal wrote:
>>
>>> Greetings:
>>>
>>> I'm trying to create a county map of Alberta, Canada and wondering
>>> how best to use the lat/lon data that I have. Do I need to
>> create a binary map file?
>>> If so, how? Do these files exist at an ftp site, etc?
>>
>> It seems possible that the boundaries you want may be found on
>> the WMS
>> service at http://www.geobase.ca/geobase/en/index.html, but a
>> WFS service
>> would have been more use. There may be other sources - could
>> anyone with
>> insight into boundary data for counties in Alberta, presumably
>> as vector
>> polygons, please help?
>>
>> I'm not sure what is meant by a binary map here - digital?
>>
>> Roger
>>
>>> I wanted to recreate the examples using the dataset "state".
>>>
>>> Thanks
>>>
>>> Iqbal
>>>
>>>
>>>  	[[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> R-sig-Geo at stat.math.ethz.ch
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>
>>
>> --
>> Roger Bivand
>> Economic Geography Section, Department of Economics, Norwegian
>> School of
>> Economics and Business Administration, Helleveien 30, N-5045 Bergen,
>> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
>> e-mail: Roger.Bivand at nhh.no
>>
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no


More information about the R-sig-Geo mailing list