Could you explain this in detail? You can update attributes of points,
lines and regions with values from a grid using the inspections tools
from the vm analysis bottom.

Mvh. | Regards

Jakob Lanstorp
Senior Consultant

Geographical Information & IT
COWI A/S
Odensevej 95
DK-5260 Odense S

Tel       +45 63 11 49 00
Direct    +45 63 11 48 62
Fax       +45 63 11 49 49 
Email     [EMAIL PROTECTED]
http://www.cowi.dk  


-----Original Message-----
From: Hughes, Colleen / Don Mitchell
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 16, 2004 2:26 PM
To: 'Alireza'; '[EMAIL PROTECTED]'
Subject: RE: MI-L How can I count number of points in a region?


Sorry Ali,

I know very little if anything about Vertical Mapper. I also don't have
it on my system. Maybe someone else from the list might be able to give
you a hand.

Does anybody else know anything about Vertical Mapper?

Don Mitchell


-----Original Message-----
From: Alireza [mailto:[EMAIL PROTECTED]
Sent: September 16, 2004 4:06 AM
To: 'Hughes, Colleen / Don Mitchell'
Subject: RE: MI-L How can I count number of points in a region?


Don,

I have a new problem which is: I wanted to add the attaching grid with
the projection of: Non-earth- meter to the Access_Routes.tab using
vertical mapper, but I could not do the job, something should be wrong.
Could you please help me in that matter?

Thanks again
Regards,
Ali

-----Original Message-----
From: Hughes, Colleen / Don Mitchell
[mailto:[EMAIL PROTECTED] 
Sent: 15 September 2004 17:28
To: 'Alireza'; '[EMAIL PROTECTED]'
Subject: RE: MI-L How can I count number of points in a region?

ALI!!

Got it to work.  I used Update Column to do it.  See the image I've
attached for the settings.  I didn't alter the TABs any from what you
sent me.  What shows up in the MapBasic Window when I do this is:

                Add Column "Access_Routes" (Neq )From Points Set To
Count(*) Where within
                Browse * From Access_Routes

Of course the "Browse * From Access_Routes" comes from leaving the
'Browse Results' check box checked.  The first line will do the job for
you though.

I did notice that you separated the points into a separate table, which
made this calculation possible, but the Access_Routes table still has
the points in it as well.  You won't get any value in the Neq column for
the points since they can't be contained within themselves.  Since you
have the points in a separate table now, you could erase the points from
the Access_Routes table.  This would leave you with the regions with the
field for your counts populated.  Makes the data more meaningful and, if
you have a lot of data to process, as I suspect, it will make things a
lot easier.

Hope this is what you were trying to achieve.
Don Mitchell


-----Original Message-----
From: Alireza [mailto:[EMAIL PROTECTED]
Sent: September 15, 2004 11:23 AM
To: 'Hughes, Colleen / Don Mitchell'
Subject: RE: MI-L How can I count number of points in a region?


Did not work. Please see the attaching.
Thanks

-----Original Message-----
From: Hughes, Colleen / Don Mitchell
[mailto:[EMAIL PROTECTED] 
Sent: 15 September 2004 16:10
To: 'Alireza'; '[EMAIL PROTECTED]'
Subject: RE: MI-L How can I count number of points in a region?

To clarify, are the points and the regiopns part of the same TAB.  That
is, does the Access_Routes.TAB contain both the points you want to count
and the regions you want to the points to be counted in?

The method I mention works if they are in 2 separate TAB's.

You could try:  Select column: Count(*)
                        From Table: Access_Routes, Selection
                        Where condition: Access_Routes Within Selection
                        Group by column:
                        Ordered by column:
                        Into table name: NoOfPoints

This assumes that "Selection" is a TAB that has the regions that contain
the points you want a count of. If you have selected the region, Mi
might refer to this as Query1 (or Query2, or..... depending on how many
times you have selected something).

If the regions and points are in the same TAB, I'd recommend selecting
them into a separate TAB first. It is just good practise, in my opinion,
to always keep different object types (point, line, region, text) in
separate TABS. It may LOOK fine when used on a map, but can make queries
or analysis more of a pain than need be.

Hope this helps.

Don Mitchell


-----Original Message-----
From: Alireza [mailto:[EMAIL PROTECTED]
Sent: September 15, 2004 10:17 AM
To: 'Hughes, Colleen / Don Mitchell'
Subject: RE: MI-L How can I count number of points in a region?


Hi
Thanks for your email, but sorry I could not do it, although it is easy,
but something should be missing. 
I have a table named Access_Routes.TAB, there are two region each on
contains some points, I selected one region, then I went to Sql, there
are some parts need to be filled and this is the way I filled out, which
does not work! Each point has a value in a column named Ms in the
browser table.

Select column: *
>From Table: Selection
Where condition: Count(*)
Group by column:
Ordered by column:
Into table name: NoOfPoints

This one does not work. Would you help me out?
Thanks

-----Original Message-----
From: Hughes, Colleen / Don Mitchell
[mailto:[EMAIL PROTECTED] 
Sent: 15 September 2004 15:11
To: 'Alireza'; [EMAIL PROTECTED]
Subject: RE: MI-L How can I count number of points in a region?

Hi Ali,

If you open the MapBasic window in MI Pro and run an SQL query for a
count, you get:

Select Count(*) from Points_tab, Polygon_tab where Points_tab.Obj Within
Polygon_tab.Obj into Selection

This will give you the number of points within a polygon.  I hope this
helps get you started.

Don Mitchell


-----Original Message-----
From: Alireza [mailto:[EMAIL PROTECTED]
Sent: September 15, 2004 9:46 AM
To: [EMAIL PROTECTED]
Subject: MI-L How can I count number of points in a region?


Hi

Does any one know how I can count number of points in a region using
Mapbasic in Mapinfo??

Thanks
Ali


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 13374



---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 13377

Reply via email to