It is possible to do this with MapBasic ?

429 views
Skip to first unread message

Nebojsa Pesic

unread,
Mar 5, 2009, 5:15:17 PM3/5/09
to mapi...@googlegroups.com

Dear friends,


Last  year  I  have  started my first ever project of MapBasic  programming.
A quite simple tool for the start and it's about  making  simple  actions  
with  water  utility  layers  and data (mostly). 
I  have  a  toolbar  with icon for each layer (water mains,

service  lines,  hydrants,  valves  etc.) and user can easily turn on and off layers, set of maps etc..


For now I'm going slowly and well I guess, but of course as my knowledge getting

bigger I have also bigger appetites :)  

This mailing list was crucial for getting all that knowledge in last several years. 
So first, thanks for everything!


Also I started to make custom tools for drawing same mentioned water utility features.

I saw this video today, and I know it's ESRI video ;) but it's also very similar to  

how I imagined how my final application should look.


here is the video:

http://www.youtube.com/watch?v=9iUmA0liTtw


But, as a beginner in MapBasic, what I don’t know is next : 

how many actions in this presentation is actually possible to do only with MapBasic ?


One note: 

My application is currently using simple and native TAB files but  

I'm also planning to learn and use some kind of RDBMS (OracleXE, MS SQL ?)


I’m concerned mostly about topology (connecting nodes with pipes,  

drawing perpendicular to other pipes, automatically connect meters with lines to nearest pipes etc.)


Please, I would be very thankful for all your suggestion and directions where to find more info. 


Thanks!


-- 

Nebojša Pešić, B.Sc. C.E.

Technical Sector - GIS group

JKP "Naissus", Waterworks and Sewerage Company of Niš

Serbia

nebojs...@jkpnaissus.co.rs

unread,
Mar 12, 2009, 1:18:26 AM3/12/09
to MapInfo-L
>here is the video: http://www.youtube.com/watch?v=9iUmA0liTtw
>But, as a beginner in MapBasic, what I don't know is next : how many actions in this presentation is actually possible to do only with MapBasic ?
...

I,m replying to myself :(
Please, could anyone help me about my questions ?
Thanks.

--
Nebojša Pešic, B.Sc. C.E.
Technical Sector - GIS group
JKP "Naissus", Waterworks and Sewerage Company of Niš
Serbia
mailto:nebojs...@naissus.co.rs
http://www.jkpnaissus.co.rs/

Peter Horsbøll Møller

unread,
Mar 12, 2009, 3:27:11 AM3/12/09
to mapi...@googlegroups.com
Nebojša,
 
So how is the whether in Niš? Has spring started? I have been to nice a couple of times on a project. I must say I did prefer the time, when spring had started and the whether was getting warmer.
 
To answer your questions. Nothing of what they demonstrate in this video can't be done with MapInfo Pro on its own or with some help of a MapBasic application. You will not necessary do it in exactly the same way, but it is doable.
 
Let's see what they actual demonstrate:
- Snap to existing features: In MapInfo Pro you can activate snap with the S key on the keyboard. This only allows you to snap to points or nodes on an object. If you need to snap to a line, you need an extra tool.
- Trace existing features: To Trace existing features, you hold down the Ctrl key of the Shift key depending on what way you want to trace. This only works for polygons/regions. If you trace a polyline, there is no difference between Shift and Ctrl. You can also activate Autotrace with the T key on the keyboard.
- Attribute assignment: You can assign values to features thru the browser window or thru the Info window. Not the cleverest tools but they work. If you require extended functionality like dropdown value list, remember last used value, read value from intersecting feature or feature at start end of line you will need a MapBasic application.
- Offset point: You an with the standard MapInfo offset a point, but I would recommend that you use MapCAD. MapCAd has a lot of extra CAD functionality that come in handy when drawing features.
- Connect meter to pipe: This will require an extra tool. I think you should hae a look at the Ddistance Calcualtor that comes with MapInfo Pro. This tool does exactly this - finds the nearest feature to another feature. I would recommend that you create a special tool for this purpose. MapBasic has the Nearest statement that would solve this. And that can also be done either to the closest or the selected.
- Circular Intersections: MapCAD has a tool for calculating the intersection of two circles
- Pass over: Again this can be done with a custom MapBasic application.
 
I my previous job for COWI I made a MapBasic application dedicated to water utilities called WaterReg. This tool has a number of the functionality mentioned above, like assigning values to features from dropdown lists, from intersecting objects and automatic calculated values like length, date and username. It also has the ability to snap points/lines to point/lines. When snapped the feature snapped to can be split into to separate features if you want to. And some other functionality specific for water utilities as well.
 
And I know for sure that there is a bunch of other tools that can do the same stuff. So you can choose to build your own tool or find an existing a just buy that.
 
I hope this did answer your question.
 
Peter Horsbøll Møller
Pitney Bowes Business Insight


Nebojsa Pesic

unread,
Mar 15, 2009, 4:38:53 AM3/15/09
to Peter Horsbøll Møller

>

So how is the whether in Niš? Has spring started? I have been to nice a couple of times on a project. I must say I did prefer the time, when spring had started and the whether was getting warmer.

 

To answer your questions. Nothing of what they demonstrate in this video can't be done with MapInfo Pro on its own or with some help of a MapBasic application. You will not necessary do it in exactly the same way, but it is doable....And I know for sure that there is a bunch of other tools that can do the same stuff. So you can choose to build your own tool or find an existing a just buy that.

 

I hope this did answer your question.


Yes, and thank you very much!

I'm interested in building new tools and I hope it will be OK since I'm beginner in MapBasic programming.

I started with main and basic tools, made a toolbar and now I'm experimenting with my existing data in Oracle XE.

I have problems at start and I will send this question to the list.


p.s (off topic)

About Niš... I knew one guy from COWI, who worked in one of the offices near by me but I didnt knew that you were there also ?!

Oh, its a shame we didnt met :( So, next time if you are in Niš just call ! We have one of the best taverns in Serbia :)


-- 

Nebojša Pešic, B.Sc. C.E.

Technical Sector - GIS group

JKP "Naissus", Waterworks and Sewerage Company of Niš

Serbia

Peter Horsbøll Møller

unread,
Mar 15, 2009, 3:01:47 PM3/15/09
to mapi...@googlegroups.com
Hi,
 
I have found a new job (with Pitney Bowes), so I will probably not go to Nis again, sorry.
 
And yes, you have some very nice places in Nis. I remember we went to a place once where they only spoke Serbian.
So we had brought a consultant from a company in Beograd, that worked with us as well. I can't remember his name.
But this place that to me looked like a garage from the outside was an excellent restaurant with very good food.
 
I really fell in love with the Serbian kitchen in Nis. ;-)
 
I worked with a couple of guys from COWI: Peter Eigaard, Lars Anderson, Karsten Vesth-Hansen and an economist that I can't remember the name of. Yeah, I think we were quite a bunch of COWI people down there during a year or so. And I don't even know if the project is still running. I was mostly involved in the data capture phase.
 
If you meet some of the COWI people tell them I said hello ;-)
 
Building new customized tools in one of the big advantages of MapBasic. It really is amazing what one can do. And now that .NET is support with MapInfo Pro 9.5, you can do even more - or the same but easier.
 
Just post the questions to the list, and I'm sure someone will be able to give you an answer.
 
Peter

2009/3/15 Nebojsa Pesic <nebojs...@naissus.co.rs>



--
Peter Horsbøll Møller
Pitney Bowes Business Insight - MapInfo
Reply all
Reply to author
Forward
0 new messages