BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Transforming bna data in TCanvas->Polygon

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics)
View previous topic :: View next topic  
Author Message
Antonio Cava
Guest





PostPosted: Sun Jan 30, 2005 9:50 am    Post subject: Transforming bna data in TCanvas->Polygon Reply with quote



Hi all,
I have a files .bna which contains a vector data and i want to draw these
data in a TCanvas which also contais a bitmap image.

Can anyone help me
Thanks in advance
Antonio Cava


Back to top
David Cameron
Guest





PostPosted: Sun Feb 13, 2005 11:30 am    Post subject: Re: Transforming bna data in TCanvas->Polygon Reply with quote




"Antonio Cava" <antonio24465 (AT) libero (DOT) it> wrote

Quote:
Hi all,
I have a files .bna which contains a vector data and i want to draw these
data in a TCanvas which also contais a bitmap image.

Can anyone help me
Thanks in advance
Antonio Cava


Hi Antonio,
Sounds like an interesting project.

I found a short description of the .bna file format at:
http://www.microimages.com/relnotes/v51/rel5103.htm

here is a quote:

"Atlas GIS products can be used to create or modify existing files in the
AGF format. Atlas Import/Export can be used to transfer data in other
formats from a variety of sources into the AGF format."
"The BNA format is our public format and is the easiest touse for creating,
editing and transferring data."
"2) The Atlas ASCII format, or BNA format is an ASCII, or text, format for
storing geographic data. The following is a VERY brief description of the
BNA file format."
" (note, I use comma delimited for examples here, but BNA files can be tab,
but BNA files can be tab delimited as well). There are four possible feature
types in BNA, but they all follow the same format:"

NAME1, <NAME2,><NAME3,>n
X1,Y1
..
..
Xn,Yn
"Where NAME1 is the primary name, NAME2, and NAME3 are the optional
names/ids, n is an integer (not equal to 0 or -1), and X1,Y1 to Xn,Yn are
the coordinate pairs describing the feature."
"-If n is a positive number greater than 2, then the feature is a REGION,
the number of coordinate pairs listed is equal to n, and the first and last
coordinates must be the same (for closure of the polygon). Also, note that
the coordinates must be in the same order that they would be in if one were
to follow the perimeter of the polygon from coordinate to coordinate."
"-If n is equal to 2, then the feature is a CIRCLE, the number of coordinate
pairs is equal to 2, where X1,Y1 is the center of the circle, and Xn is the
radius of the circle (note that Yn is ignored)."
"-If n is equal to 1, then the feature is a point, the number of XY
coordinates is 1, and it is the coordinates for the point."
"-If n is equal to -2 or less, then the feature is a line, the number of
coordinate pairs is equal to -n, and the coordinates must be in the order
that they make up the line."
"A couple more general notes:"
"The Name values must be surrounded by quotes (and they are string values,
not the number by definition)."
"All coordinates must be in decimal format (you cannot use degrees, minutes,
seconds for Lat/Lons), they are in X value, followed by Y value (LonlLat
rather than Lat/Lon), and they follow the correct conventions for sign
(longitude should be negative)."
"Most regions can be drawn with a single polygon; however, some regions must
be drawn using more that one polygon. These would include regions that have
Lakes inside them or islands outside them. The formatting for these features
is beyond the scope of this email, but if enough people are interested, I
can post these instructions separately."
"If anyone has any questions about this format, please feel free to post to
the AGIS-L server, and I will be happy to answer them. In the meantime, I
will try to work with [a name] to get a better description on the FAQ/FTP,
the WWW, and the FAX BACK server."

***** end of quote *******

From that description it would be pretty easy to plot the data using
polygons, polylines and pixels.
I little more work writing the file parser but still relatively simple.

Did you manage to find a full description of the .bna file format?
If so could you give me a link?

Also, if you have any links to actual .bna files it would be usefull.

Like I said, it sound like an interesting project, so a could write some
code and post you a link.
Infact I will start writing the parsing code now, based on the short
description of the .bna file format I found, but if you have the full
description of the .bna file format and/or some .bna files I could look at
it would be useful.

HTH,
Dave





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.