[MI-L] Thanks Re Basic Material

2006-09-01 Thread Thomas.Clements
As it says on the tin, thanks to all who responded regarding getting started 
with learning MapBasic.  With the network system in my company I unfortunately 
can't get access to MapBasic itself or the code examples in the installed 
folder but I've ordered some of the recommended reading and will be sure to 
bother you all with daft queries in the coming months!

Thanks again,

Tom
**
It is the policy of the MPS that:

MPS personnel (or agents working on behalf of the MPS) must not use
MPS systems to author, transmit or store documents such as electronic mail 
(e-mail) messages or attachments:

*  containing racist, homophobic, sexist, defamatory, offensive,
   illegal or otherwise inappropriate material;

*  containing material requiring a protective marking higher than
   RESTRICTED, (and not higher than NOT PROTECTIVELY MARKED across
   the internet) without the use of approved encryption;

*  containing personal data for use other than in accordance with
   the notification(s) under the Data Protection Act, 1998 of the
   system(s) from which the data originates.

*  This Email message has been scanned for viruses and contents.

**

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


[MI-L] Unsubscribe

2006-09-01 Thread Rex Ballard

This email may contain advice and comment on a matter which is currently being considered by Council or may be considered by Council in the near future. Any advice or comments are the views of the Officer sending this email and should not be construed as a formal Council position. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
This footnote also confirms that this email message has been swept by McAfee for the presence of computer viruses.

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Ang. [MI-L] Thanks Re Basic Material

2006-09-01 Thread Mats Elfström

Hi Tom!

Excuse me? You have MapBasic but cannot
get access to the code examples?
I wonder, what's the point of buying
a program if you cannot use all that is provided with it?
I get so tired of all these IT talibans
and their stupid restrictions.

Remember that the systems administrator
is there to service you, you are his client.
And refuse to be treated as a malicious
wrongdoer or blundering fool.
 
Hälsning / Best regards Mats.E

FB Engineering AB
Södra Förstadsgatan 26
211 43 Malmö

Tel: 040-660 25 50
Mobil: 0705-27 60 27
Fax: 040-660 25 99
[EMAIL PROTECTED]
www.fbe.se___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


[MI-L] MapInfo-L Reminder

2006-09-01 Thread Bill Thoen
To: MapInfo-L@lists.directionsmag.com
From: [EMAIL PROTECTED]
Subject: MapInfo-L Reminder

This is just a reminder to help you manage your MapInfo-L subscription. This 
will be posted automatically each week, and please feel free to respond with 
suggestions or improvements.

Check out the MapInfo-L wiki at http://www.mapinfo-l.com set up for us by Eric 
Frost <[EMAIL PROTECTED]>. Wikis are a very cool tool for building a community 
knowledge base. Join in and make your mark! 

- Bill Thoen and Peter Horsb?ll M?ller
[EMAIL PROTECTED]

CONTENTS
0. HOW TO POST MAIL TO MAPINFO-L
1. HOW TO SUBSCRIBE/UNSUBSCRIBE
2. HOW TO CHANGE YOUR SUBSCRIPTION SETTINGS
3. WHERE TO GO TO FIND NEWS WHEN THE LIST BREAKS
4. MAPINFO-L ARCHIVES

--
0. HOW TO POST MAIL TO MAPINFO-L

If you are subscribed to the list, then sending mail to
MapInfo-L@lists.directionsmag.com will send your message to everyone on the
list.


1. HOW TO SUBSCRIBE/UNSUBSCRIBE

You can subscribe, unsubscribe or change your account settings by going to
http://www.directionsmag.com/mailman/listinfo/mapinfo-l. To subscribe, enter
your email address and optionally your name, and then pick a password. A
confirmation message will be sent to you, and after you confirm your request
for subscription, you will begin receiving new mail from the list and will also 
be able to post mail to the list.

To unsubscribe or change your account settings, go to the bottom of this
page where you will see form controls that you can use to modify your account.

You can do this all with email too. Just look at the X-headers in any
MapInfo-L message and you'll see the addresses to send a blank email to to
make the server do what you want.

2. HOW TO CHANGE YOUR SUBSCRIPTION SETTINGS

You can change your account settings by going to
http://www.directionsmag.com/mailman/listinfo/mapinfo-l. At the bottom of the
page are form controls where you can specify your address and password to get
access to your account settings form.


3. WHERE TO GO TO FIND NEWS WHEN THE LIST BREAKS

Occasionally the angel of digital chaos descends on the 'net and sometimes
smites MapInfo-L. Should this happen, you can find news and information about
what's happening by going to http://www.gisnet.com/mapinfo-l.htm.


4. MAPINFO-L ARCHIVES

The MapInfo archives are now available at
http://www.directionsmag.com/pipermail/mapinfo-l/.

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] Complex SQL Joins

2006-09-01 Thread Hughes, Colleen / Don Mitchell
Hi Evan,

I don't think MapInfo allows you to combine columns or to use functions when 
creating a join.  It hasn't worked for me in the past.

You could try creating a new column and populating it with either 
Table2.state+Table2.community in Table2 or Right$(Table1.cmtyno,4) in Table1, 
and then do a join using this new column.

Don

Message: 1
Date: Thu, 31 Aug 2006 10:00:58 -0700
From: "Evan MacDougall" <[EMAIL PROTECTED]>
Subject: [MI-L] Complex SQL Joins
To: 
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

I am trying to join two tables in MapInfo where there isn't a column-to-column 
match.  In Oracle SQL I can do a join on substrings of a panel or on a joint 
expression of two columns matched to one.
However, when I try this in MapInfo it gives me an error about my join not 
being valid.

 

Table1 cmtyno (char 6) = Table2 state (char 2) + Table2 community (char 4).

 

So I try this as my join:

 

Table1.cmtyno = (Table2.state+Table2.community)

 

MapInfo throws me an error saying it's an invalid join.

 

Then I try this as my join:

 

Right$(Table1.cmtyno,4) = Table2.community

 

This also causes MapInfo to give me and error about an invalid join.

 

Is it possible to join these two tables without creating new columns?
Am I just getting my syntax wrong or have I found a limitation in MapInfo?

 

-Evan MacDougall

GIS Supervisor

Nationwide TotalFlood Services Inc. (NTSI)

(a wholy owned subsidiary of Capital Title Group)

[EMAIL PROTECTED]

(800)736-3109 x3681

"Gentlemen, we may not make history tomorrow, but we shall certainly change the 
geography."

 

-- next part --
An HTML attachment was scrubbed...
URL: 
http://www.directionsmag.com/pipermail/mapinfo-l/attachments/20060831/ac562409/attachment-0001.htm

--

Message: 2
Date: Thu, 31 Aug 2006 16:47:40 -0400
From: "Hughes, Colleen / Don Mitchell" <[EMAIL PROTECTED]>
Subject: RE: [MI-L] Generating points table
To: 
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain;   charset="us-ascii"

 
Hi Sandra,

I've done this many times before.  In Table Maintenance, add 2 columns to your 
points table to hold the coordinates.  Then use Update Table to update each 
column using the function CentroidX and CentroidY.  I'm assuming you're using 
UTM, so CentroidX would be for the Easting and CentroidY for the Northing.  But 
you probably figured that out without me telling you. 8-)  

Don
--

Message: 4
Date: Thu, 31 Aug 2006 11:25:02 -0400
From: "Sandra Rickard" <[EMAIL PROTECTED]>
Subject: [MI-L] Generating points table
To: 
Message-ID:



Content-Type: text/plain; charset="us-ascii"

I was wondering if anyone can help me to populate a table with coordinates from 
point created on a Map.  I need to create an excel
(csv) file from this.  I know how to create the csv file from a table.
I just need to know how to populate the table.  We have created points on a map 
but I now need the coordinates of these points.  There are a lot of them so I 
don't want to have to manually type these in.  Is there away to populate the 
table?


Thanks you in advance to all who can help.

Cheers,

Sandra Rickard

Geologist

Wolfden Resources Inc.

Phone:  (807) 346-1668

Fax:  (807) 345-0284

401-1113 Jade Court

Thunder Bay, ON  P7B 6M7

www.wolfdenresources.com



--

Message: 3
Date: Fri, 1 Sep 2006 07:41:17 +1000
From: "Strawbridge Nola" <[EMAIL PROTECTED]>
Subject: [MI-L] RE: Generating points table (Sandra Rickard)
To: 
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain;   charset="iso-8859-1"

Sandra,
If I understand your query correctly- the X & Y Coords already exist if your 
points table is mappable. 
If you want to view them you need to create 2 new columns for X,Y (make sure 
they are Float type, then use "Update column" to populate the table with the 
coords.
HTH
Nola

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED]
Sent: Friday, 1 September 2006 3:01 AM
To: mapinfo-l@lists.directionsmag.com
Subject: MapInfo-L Digest, Vol 10, Issue 96


Send MapInfo-L mailing list submissions to
mapinfo-l@lists.directionsmag.com

To subscribe or unsubscribe via the World Wide Web, visit
http://www.directionsmag.com/mailman/listinfo/mapinfo-l
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]

You can reach the person managing the list at
[EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of MapInfo-L digest..."


Today's Topics:

   1. Re: Mapbasic & Vertical Mapper (Bill Thoen)
   2. Re: FW: [MI-L] Importing DWG files (Simon Roy)
   3. Looping in MapInfo MapBasic Window
  (Hughes, Colleen / Don Mitchell)
   4. Generating points table (Sandra Rickard)


--

RE: [MI-L] Complex SQL Joins

2006-09-01 Thread Evan MacDougall
Yeah, I was afraid that it just wasn't possible.

I'm trying to create joins to live data linked from an Oracle database, so 
unfortunately I don't have the luxury of being able to create new columns.

Guess I'll have to stick with Oracle SQL.

Thanks for your answers.

-Evan MacDougall
GIS Supervisor
"Gentlemen, we may not make history tomorrow, but we shall certainly change the 
geography."
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hughes, Colleen 
/ Don Mitchell
Sent: Friday, September 01, 2006 5:27 AM
To: mapinfo-l@lists.directionsmag.com
Subject: RE: [MI-L] Complex SQL Joins

Hi Evan,

I don't think MapInfo allows you to combine columns or to use functions when 
creating a join.  It hasn't worked for me in the past.

You could try creating a new column and populating it with either 
Table2.state+Table2.community in Table2 or Right$(Table1.cmtyno,4) in Table1, 
and then do a join using this new column.

Don

Message: 1
Date: Thu, 31 Aug 2006 10:00:58 -0700
From: "Evan MacDougall" <[EMAIL PROTECTED]>
Subject: [MI-L] Complex SQL Joins
To: 
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

I am trying to join two tables in MapInfo where there isn't a column-to-column 
match.  In Oracle SQL I can do a join on substrings of a panel or on a joint 
expression of two columns matched to one.
However, when I try this in MapInfo it gives me an error about my join not 
being valid.

 

Table1 cmtyno (char 6) = Table2 state (char 2) + Table2 community (char 4).

 

So I try this as my join:

 

Table1.cmtyno = (Table2.state+Table2.community)

 

MapInfo throws me an error saying it's an invalid join.

 

Then I try this as my join:

 

Right$(Table1.cmtyno,4) = Table2.community

 

This also causes MapInfo to give me and error about an invalid join.

 

Is it possible to join these two tables without creating new columns?
Am I just getting my syntax wrong or have I found a limitation in MapInfo?

 

-Evan MacDougall

GIS Supervisor

Nationwide TotalFlood Services Inc. (NTSI)

(a wholy owned subsidiary of Capital Title Group)

[EMAIL PROTECTED]

(800)736-3109 x3681

"Gentlemen, we may not make history tomorrow, but we shall certainly change the 
geography."

 

-- next part --
An HTML attachment was scrubbed...
URL: 
http://www.directionsmag.com/pipermail/mapinfo-l/attachments/20060831/ac562409/attachment-0001.htm

--

Message: 2
Date: Thu, 31 Aug 2006 16:47:40 -0400
From: "Hughes, Colleen / Don Mitchell" <[EMAIL PROTECTED]>
Subject: RE: [MI-L] Generating points table
To: 
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain;   charset="us-ascii"

 
Hi Sandra,

I've done this many times before.  In Table Maintenance, add 2 columns to your 
points table to hold the coordinates.  Then use Update Table to update each 
column using the function CentroidX and CentroidY.  I'm assuming you're using 
UTM, so CentroidX would be for the Easting and CentroidY for the Northing.  But 
you probably figured that out without me telling you. 8-)  

Don
--

Message: 4
Date: Thu, 31 Aug 2006 11:25:02 -0400
From: "Sandra Rickard" <[EMAIL PROTECTED]>
Subject: [MI-L] Generating points table
To: 
Message-ID:



Content-Type: text/plain; charset="us-ascii"

I was wondering if anyone can help me to populate a table with coordinates from 
point created on a Map.  I need to create an excel
(csv) file from this.  I know how to create the csv file from a table.
I just need to know how to populate the table.  We have created points on a map 
but I now need the coordinates of these points.  There are a lot of them so I 
don't want to have to manually type these in.  Is there away to populate the 
table?


Thanks you in advance to all who can help.

Cheers,

Sandra Rickard

Geologist

Wolfden Resources Inc.

Phone:  (807) 346-1668

Fax:  (807) 345-0284

401-1113 Jade Court

Thunder Bay, ON  P7B 6M7

www.wolfdenresources.com



--

Message: 3
Date: Fri, 1 Sep 2006 07:41:17 +1000
From: "Strawbridge Nola" <[EMAIL PROTECTED]>
Subject: [MI-L] RE: Generating points table (Sandra Rickard)
To: 
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain;   charset="iso-8859-1"

Sandra,
If I understand your query correctly- the X & Y Coords already exist if your 
points table is mappable. 
If you want to view them you need to create 2 new columns for X,Y (make sure 
they are Float type, then use "Update column" to populate the table with the 
coords.
HTH
Nola

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED]
Sent: Friday, 1 September 2006 3:01 AM
To: mapinfo-l@lists.directionsmag.com
Subject: MapInfo-L Digest, Vol 10, Issue 96


Send MapInfo-L mailing list submissions to
mapinfo-l@lists.directionsmag.com

To subscribe or unsubscribe via the World Wide Web, visit
  

[MI-L] Represent selected map area as data??

2006-09-01 Thread Darren








Not even sure how to best ask this question. I want to be
able to allow my customer to select an area on the map. Could be a simple
circle, square or even some complex polygon or combination of shapes that
overlap. Somehow I then need to convert this selection to a data format so that
another device can look at that data, then compare its own long/lat and figure
out if it’s inside the selected area or not.

 

Any ideas?

 

Thanks,

Darren

 






___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


[MI-L] primary key comparsion between row value and pdf file

2006-09-01 Thread Scott.Snashall
Hello all

I have a mapinfo table that I would like to scroll through to determine if a 
pdf file exists within a specific directory on a server based on a row value 
within a table. 
the primary key within the row matches the filename of the pdf accept the pdf 
file has an extravalue added after an underscore.

mapinfo value =  ARDRABAN  
pdf =  ARDRABAN_0001.PDF

How would you go about doing this within Mapbasic

Any help is appreciated 

thanks

Scott

 



___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


[MI-L] Looping in MapInfo MapBasic Window

2006-09-01 Thread Hughes, Colleen / Don Mitchell



Hi 
All,
 
I'm 
slowly trying to learn MapBasic with the MapBasic window in MapInfo and the User 
Guides for MapBasic that I downloaded.  I'm trying to change the symbol for 
a selection using mapbasic.  When I look up the commands in the reference 
guide, it states that the Do While statement isn't supported in the MapBasic 
window, nor is any of the other looping statements nor is the If Then 
statement.  Is it possible to perform looping or to test for things (like 
If Then) from the MapBasic window.
 
I 
don't have Mapbasic, other than from within MapInfo, but thought I could write 
some simple scripts to automate some of the repetitive tasks I have and just 
copy them into the mapbasic window to run them.
 
The code that I have so far:
 
-
select 
* from OverDue where Due_Tested = "NO BFP" into NoBFPtabDim bfpobj As 
Object, bfpsymbol As Symbolbfpsymbol = MakeSymbol(34,0,6)Fetch First 
>From NoBFPtabDo While Not EOT(NoBFPtab) bfpobj = 
NoBFPtab.obj    Alter Object 
bfpobj    Info OBJ_INFO_SYMBOL, 
bfpsymbol    Update NoBFPtab Set obj = bfpobjFetch Next 
>From NoBFPtab
-
 
Any 
help is be appreciated.
Don
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


RE: [MI-L] Help with commandinfo(CMD_INFO_ROWID) after a dialog iscalled please

2006-09-01 Thread Nicki Cozens
Hmm, You know I said it worked - oops, it didn't.

I needed the rec number of the base table so that I could make the changes to 
that particular record later on, I realize now that I have changed the first 
record in the base table by accident as the selection.rowid = 1.

Back to the drawing board...

Nicki

-Original Message-
From: Peter Horsbøll Møller [mailto:[EMAIL PROTECTED] 
Sent: 30 August 2006 20:13
To: Nicki Cozens; mapinfo-l@lists.directionsmag.com
Subject: RE: [MI-L] Help with commandinfo(CMD_INFO_ROWID) after a dialog 
iscalled please

Nicki,
 
If you read the Help file closely, you'll see that CommandInfo(CMD_INFO_ROWID) 
is supposed to be used within the SelChangedHandler.
So I guess MapInfo expects a change in the selection just to have happened. 
Showing a dialog or in any other way mingling with the user interface might 
move the change in the selection away from focus and so MapInfo is no longer 
able to "use" the CMD_INFO_ROWID attribute.
 
The question is why do you need the rowid from the base table ?
 
You have the selection and can easily update the object thru this table:
 
Fetch First From Selection
Do Until EOT(Selection)
    oPolygon = Selection.OBJ
    nRowID    = Selection.ROWID
 
    '...do what needs to be done
 
    Update Selection
    Set OBJ= oPolygon
    Where ROWID    = nRowID
 
    Fetch Next From Selection
Loop
Peter Horsbøll Møller 
GIS Developer, MTM 
Geographical Information & IT 
  
COWI A/S 
Odensevej 95 
DK-5260 Odense S. 
Denmark 
  
Tel +45 6311 4900 
Direct  +45 6311 4908 
Mob +45 5156 1045 
Fax +45 6311 4949 
E-mail  [EMAIL PROTECTED] 
http://www.cowi.dk/gis 
"For enden af regnbuen..." - hvordan kommer man dertil og er det overhovedet 
muligt?
Læs mere om årets MapInfo konference på www.cowi.dk/mapinfokonference 
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nicki Cozens
Sent: Wednesday, August 30, 2006 4:21 PM
To: mapinfo-l@lists.directionsmag.com
Subject: [MI-L] Help with commandinfo(CMD_INFO_ROWID) after a dialog iscalled 
please
 
Dear Listers
 
I have a number of procedures that are called from a menu bar.  One of the menu 
items allows the user to change the snapping tolerance of the node snapping 
tool I have created.  If the user selects a polygon and then runs the main node 
snapping tool it works ok (if a little slow - see previous postings!), however, 
if the user previously selects a polygon, then chooses to change the snapping 
tolerance via the menu, an error occurs back in the main node snapping routine 
when a CommandInfo is issued to find out the row id of the selected polygon.  
 
Can anyone shed any light on what is happening please - I think it is something 
to do with the OKbutton on the dialog changing the selection?  
 
Is there an easy way how I can get the CommandInfo(cmd_info_rowid) to find the 
row id of the selected polygon after the ok button has been clicked?
 
Here are the main snippits of code:
 
###
Sub snaptolerance   'runs when user selects change tol. from menu
Dialog 
  Title "Snapping Tolerance" 
  Control StaticText 
    Title "Please enter new tolerance (in m)" 
    'Position 10, 10
  Control EditText
    Value 0.25
    Into gf_snaptolerance
  Control OKbutton
  Control CancelButton
End Sub
###
Sub SnapNodes   'runs when user chooses snap from menu
 
'... the variable declarations go in here and some initializing
 
If SelectionInfo(SEL_INFO_NROWS) > 0 Then
  aSelName = SelectionInfo(SEL_INFO_SELNAME)    'eg "Query1"      
gs_theselTable = SelectionInfo(SEL_INFO_TABLENAME)
  Note (gs_theseltable)   'just to check - this is showing table name
Else
  Note("The selection is now 0")    'just to check
    'This is not showing so there are rows selected
End If
gi_myrowid = commandInfo(cmd_info_rowid)   'This is where the error occurs
 
###
 
The error that is returned is:-
CommandInfo: argument 2 out of range, corresponding to the last line shown above
 
Many thanks
Nicki Cozens
 
Nicki Cozens 
Data Management Officer 
Highways Development Control
Leicestershire County Council
County Hall
Glenfield
Leicester
LE3 8RA 
 
 
 
___
Leicestershire County Council - rated a 'four-star' council by the Audit 
Commission
___
 
 
This e-mail and any files transmitted with it are confidential. If you are not 
the intended recipient, any reading, printing, storage, disclosure, copying or 
any other action taken in respect of this e-mail is prohibited and may be 
unlawful. If you are not the intended recipient, please notify the sender 

[MI-L] RE: Help with commandinfo(CMD_INFO_ROWID) after a dialog is called please

2006-09-01 Thread Nicki Cozens
Thanks again Peter - I managed to sort it out, pretty much as you first 
suggested - I used an alias and just got the id from the base table rowid field 
thus:

If SelectionInfo(SEL_INFO_NROWS) > 0 Then
aSelName = SelectionInfo(SEL_INFO_SELNAME)  'eg "Query1"
gs_theselTable = SelectionInfo(SEL_INFO_TABLENAME) 'the base table
'Note (gs_theseltable)
Else
Note("The selection is now 0")
End If

'This next line will cause an error if the tolerance has been changed and 'poly 
not reselected - due to selchangedhandler
'gi_myrowid = commandInfo(cmd_info_rowid)

'This is the way to do it!
selection_colalias = gs_theseltable & ".ROWID"
gi_myrowid =selection_colalias


All the best and many thanks again :-)
Nicki


-Original Message-
From: Peter Horsbøll Møller [mailto:[EMAIL PROTECTED] 
Sent: 31 August 2006 09:27
To: Nicki Cozens
Subject: RE: Help with commandinfo(CMD_INFO_ROWID) after a dialog is called 
please

Nicki,

You are most welcome. 

I know from myself that you sometimes can do things in the most fantastic ways, 
only to 2 weeks later discover that it could have been done a lot simpler. Keep 
on using MapBasic and you end up knowing you way around it - and still learn 
new things ;-)


Peter Horsbøll Møller
GIS Developer, MTM
Geographical Information & IT
 
COWI A/S
Odensevej 95
DK-5260 Odense S.
Denmark
 
Tel +45 6311 4900
Direct  +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk/gis

"For enden af regnbuen..." - hvordan kommer man dertil og er det overhovedet 
muligt? 
Læs mere om årets MapInfo konference på www.cowi.dk/mapinfokonference



___
Leicestershire County Council - rated a  'four-star' council by the Audit 
Commission
___


This e-mail and any files transmitted with it are confidential. If you are not 
the intended recipient, any reading, printing, storage, disclosure, copying or 
any other action taken in respect of this e-mail is prohibited and may be 
unlawful. If you are not the intended recipient, please notify the sender 
immediately by using the reply function and then permanently delete what you 
have received.

Incoming and outgoing e-mail messages are routinely monitored for compliance 
with Leicestershire County Council's policy on the use of electronic 
communications.   The contents of e-mails may have to be disclosed to a request 
under the Data Protection Act 1998 and the Freedom of Information Act 2000.

The views expressed by the author may not necessarily reflect the views or 
policies of the Leicestershire County Council.

Attachments to e-mail messages may contain viruses that may damage your system. 
Whilst Leicestershire County Council has taken every reasonable precaution to 
minimise this risk, we cannot accept any liability for any damage which you 
sustain as a result of these factors. You are advised to carry out your own 
virus checks before opening any attachment.



___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] Represent selected map area as data??

2006-09-01 Thread Bill Thoen
On Fri, Sep 01, 2006 at 12:52:42PM -0500, Darren wrote:
> Not even sure how to best ask this question. I want to be able to allow my
> customer to select an area on the map. Could be a simple circle, square or
> even some complex polygon or combination of shapes that overlap. Somehow I
> then need to convert this selection to a data format so that another device
> can look at that data, then compare its own long/lat and figure out if it's
> inside the selected area or not.
 
One option might be to use MapBasic and convert the object into a GML
well-known text (WKT) format. At least that's a standard data structure for
map objects that can be transferred across just about any platform.

___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l


Re: [MI-L] Complex SQL Joins

2006-09-01 Thread Phil Waight



A suggestion:
 
Rather than having to create columns of the correct 
data type for a particular query and then update them with the particular 
_expression_, create a permanent dummy column in the base tables, say MIJ as 
logical data type (or something small).
 
Then ...
 
Select ... from tab1, tab2 where 
tab1.mij=tab2.mij and tab1.fld1=tab2.fl1 + tab2.fld2 

 
The dummy columns and _expression_ will then always 
overcome the "no join specified..." problem (which appears to be an artifact of 
an early design decision - performance?).
 
Don't index mij as the extra i/o in checking the 
index is just overhead in this case.
 
-
 
I do like MapInfo's SQL. Just found recently for 
those wishing to squeeze the last bit of performance (or functionality), that an 
SQL such as:
 
Select ... from tab1[,tab2] where  and 
cust_function(acol1,acol2,..) 
 
can have cust_function as external (DLL-resident). 
Also, (as is stated in the MB manual) cust_function can replace standard 
functions such as cos, abs etc.
 
So if you had quite a bit of logic in cust_function 
or prefer to write in something other than MapBasic when you have a choice, 
write cust_function in c, Delphi or similar. In combination with MITAB library, 
would be possible to pass rowid's and read and process objects as part of the 
comparison. Using some of the ideas here (http://www.spatialprojects.com.au/spatialsql_custfns.htm , 
esp pt 8.) , it may be possible to update tab1 or tab2 (or another tab on the 
fly). "may be" because I know its possible to update tab1,tab2 within MapBasic, 
but not sure if an external update operation on the same table would work - 
havent tested that yet. If the SQL was prefaced with a save, it most likely 
would work as the MI select is only reading, so no transaction files would 
exist.
 
-
 
Dreams:
 
Now what would be nice is a statement to attach the MapBasic window to the 
address space of one (or more!) particular (dormant) MB app with all 
the declarations (and possibly code) and then write SQLs such as the one 
above in MapInfo Pro.
 
eg. Someone writes a nice "IsParallel(l1obj,l2obj)" 
function for 2 lines, which could be declared in an app and accessed from 
any MI Pro SQL.
 
Great opportunity for commercial MB authors OR 
a MapInfo community (wiki) app could receive those hidden gems accumulated 
over the last 15 yrs and trapped in purpose-built apps. I suggest this would 
increase the power of MapInfo SQL n-fold in a short space of time. Also, some 
major new features in basic functions in MI Pro might shift all those users who 
are sitting on "the last really useful update"  (for me 
v6.5). 
 
 
 
Phil.
 

___ Email : [EMAIL PROTECTED] 
Web: www.spatialprojects.com.au 
Skype: PhilWaight
 
 

  - Original Message - 
  From: 
  Hughes, Colleen / Don Mitchell 
  
  To: mapinfo-l@lists.directionsmag.com 
  
  Sent: Friday, September 01, 2006 10:26 
  PM
  Subject: RE: [MI-L] Complex SQL 
  Joins
  Hi Evan,I don't think MapInfo allows you to 
  combine columns or to use functions when creating a join.  It hasn't 
  worked for me in the past.You could try creating a new column and 
  populating it with either Table2.state+Table2.community in Table2 or 
  Right$(Table1.cmtyno,4) in Table1, and then do a join using this new 
  column.DonMessage: 1Date: Thu, 31 Aug 2006 10:00:58 
  -0700From: "Evan MacDougall" <[EMAIL PROTECTED]>Subject: 
  [MI-L] Complex SQL JoinsTo: Message-ID:<[EMAIL PROTECTED]>Content-Type: 
  text/plain; charset="us-ascii"I am trying to join two tables in 
  MapInfo where there isn't a column-to-column match.  In Oracle SQL I can 
  do a join on substrings of a panel or on a joint _expression_ of two columns 
  matched to one.However, when I try this in MapInfo it gives me an error 
  about my join not being valid. Table1 cmtyno (char 6) = 
  Table2 state (char 2) + Table2 community (char 4). So I 
  try this as my join: Table1.cmtyno = 
  (Table2.state+Table2.community) MapInfo throws me an 
  error saying it's an invalid join. Then I try this as my 
  join: Right$(Table1.cmtyno,4) = 
  Table2.community This also causes MapInfo to give me and 
  error about an invalid join. Is it possible to join these 
  two tables without creating new columns?Am I just getting my syntax wrong 
  or have I found a limitation in MapInfo? -Evan 
  MacDougallGIS SupervisorNationwide TotalFlood Services Inc. 
  (NTSI)(a wholy owned subsidiary of Capital Title Group)[EMAIL PROTECTED](800)736-3109 
  x3681"Gentlemen, we may not make history tomorrow, but we shall 
  certainly change the geography." 
___
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l