>> GIS Education
Thread views: 9245 View all threadsNext thread*

(Stranger )
02/06/09 02:27 AM
Counting grid cells in MapInfo Report this article as Inappropriate to us !!!Login to Reply


I am having a MapInfo Professional 9.5 problem. I need to count the number of grid cells that species1 and species2 occur in, including cells that overlap, but not counting the same cell twice.

I have three tables

The only way I have managed it so far is quite long winded, and tells me in the end that my tables dont join. I have never used joins in Mapinfo before, and dont think they should be necessary. Also, there must be a quicker way to achieve what should be a simple count. See the SQL queries I have attempted so far at the bottom of this email.

Does anyone know a quicker and successful way to count the number of cells occupied by objects in two tables, within the same grid? If you did you would brilliant! I need to repeat this process over 200 times, so it would be great if it was quick and easy, and worked! At present I can count them separately, or combine them, but as there are over 200 species to repeat this with I'd rather keep all datasets separate.


Queries so far......
I have used several SQL select Querys and asked:

1. Where does Species1 occur in grid?
Select Columns: grid.description, count(*)
From tables: grid, Species1
Where Condition: grid.obj contains Species1.obj
Group by Columns: grid.description
In table named: CountSpecies1

2. Where does Species2 occur in grid?
Select Columns: grid.description, count(*)
From tables: grid, Species2
Where Condition: grid.obj contains Species2.obj
Group by Columns: grid.description
In table named: CountSpecies2

3. Counting the number of cells in 1 and 2 (including duplicates, but not counting them twice)
Select Columns: count(*)
From tables: CountSpecies1, CountSpecies2
Where Condition: CountSpecies1.Description NOT LIKE CountSpecies2.Description
In table named: CountALLnotDuplicates

3 does not work as it says there is an invalid join condition in the WHERE function'. If it did work it would not count any duplicate cells at all, so would be no good either as I do need to include every cell that the species are present in only once.

Entire thread
SubjectPosted byPosted on
*Counting grid cells in MapInfo Liz   02/06/09 02:27 AM
.*Re: Counting grid cells in MapInfo tkm   04/01/09 02:12 PM
.*Re: Counting grid cells in MapInfo Liz   02/09/09 05:01 AM
Jump to


Teledyne: - Countless CAD add-ons, plug-ins and more.

Internet Business Systems © 2017 Internet Business Systems, Inc.
595 Millich Dr., Suite 216, Campbell, CA 95008
+1 (408)-337-6870 — Contact Us, or visit our other sites:
AECCafe - Architectural Design and Engineering EDACafe - Electronic Design Automation TechJobsCafe - Technical Jobs and Resumes  MCADCafe - Mechanical Design and Engineering ShareCG - Share Computer Graphic (CG) Animation, 3D Art and 3D Models
  Privacy Policy