Set CoordSys Table myTable
or you can read about coordinate systems and just spell it out longhand
as in
Set CoordSys Earth Projection 3, 104, 7, 105.142562, -45.979588, ... etc.
Otherwise you'll get Lat/Longs in the default coordinate system, which
assumes a fairly simple model of earth as a sphere, and I think sans datum.
--
*Bill Thoen*
GISnet - www.gisnet.com <http://www.gisnet.com/>
1401 Walnut St., Suite C
Boulder, CO 80302
303-786-9961 tel
303-443-4856 fax
bth...@gisnet.com
--
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.To post a message to this group, send email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
Once you've saved your new table which consists of only polygons you wish to
create points from:
1) open this new table and make it editable
2) select "All" the polygon objects within this new table
3) open the Mapbasic window
4) type or paste the following script snippet into the Mapbasic Window and
hit enter.
Update Selection Set OBJ = Centroid(OBJ) 'Convert region object to a point
object
5) Save the table and revel in the joy of having your newly created points
table based on the centroid of the original polygons.
Your coordinate system and all table data will be the same as the original
polygon table you first created this new table from.
HTH
David Reid
Just another antiquated/seditious 9-1-1 mapping guy not running ESRI
products
Hello,
Any help greatly appreciated!
Thanls
--
Well, that's why I hang out here. I learn so much all the time. The one
who taught me MapBasic never said a word about it. I think I'm going to
download the actual manual and see what else I've missed. Got a version
for the Kindle yet?
I'd say do a reasonable bit of homework first, and if you don't find the
solution, then ask around. Places like here are pretty good. If you're
still stuck for an answer, then see if you can solve the problems through
other approaches. Then if that fails, consider the buy, borrow(copy) or
build "triangle", probably in that order. Building your own library is good
for a lot of reasons, but it's the most expensive route to take. Really.
There's the benefits of owning your own tools, and the freedom to do what
you like with them, and of course on your next job(s) you can build better
and faster if have some good, well-tested procedures already coded. But it
costs plenty to build, and if time is money to you think twice before going
that way.
DYI has its traps for those who don't use good judgement allocating
time to build a good library. It takes more time than you think, and you
really need to be honest with yourself as to the reasons why you're Doing It
Yourself. In the long run, I think it pays off to have your own library,
but I also buy tools because sometimes the client has a need and wants
something NOW and wants it done right. And if you add up the cost and
divide by your hourly salary, and note that you're also buying from someone
who knows the problems in the task you have, and also has many hours of
testing and debugging behind their product, and you can have it
now, sometimes that way is better.
But if my favorite software package doesn't do what I'd like, I bear if I
can't find/remember any alternatives, or I do something to acquire what I
need, and I'm seldom sure whether I did the right thing. But if the job
gets done, meets the spec, client is happy and I get paid, then I can
afford to build a little more time. And so it grows...
--
> Also consider using templates if your text editor supports this. This
> will make it easier to create a new application, if you have a
> template that with one click create the base module iwht a main
> procedure, some basic menus, an aboutbox, and a EngProgram procedure.
> This template also could contain includes for a number of your most
> used modules in your library.
>
If you editor doesn't support these then you need a new editor. But you
can always maintain a set of empty documents that contain the skeleton
of modules, functions, and so on, but it's a lot more convenient to have
right there in your eidtor. Either way, pre-written, tested, and
bug-free code is money in the bank. There's a lot of redundant material
in a MapBasic program and any technique that speeds up typing, and
doesn't make mistakes is usually worth using.