Massimo,

fairly easy but it will be several steps....

what you need to do is first make a point grid, this is most easily done by
using the gridmaker tool to make a 'polygon' grid and then converting this
polyongrid to suit your needs, having made the point grid its then just a
matter of spatially updating the point grid with your 'region' data.


1. Using the tool manager start up the Gridmaker application that comes with
Mapinfo
2. make a polygon grid covering the area you are interested in with the cell
spacing you require and call it MYGRID
                note the cell spacing will be the width of each polygon in
the grid, but you will turn the polygons into point at their centroids, so
the width of the polygon will become the point spacing, so if you want 50m
spaced points, make a grid with 50m wide polygons..

3. Now use the Table>Table Maintenance menus to reset the structure of the
MYGRID table so that it is the same as your table of Regions...ie  if you
want to populate the point grid with say a column of integer values, you
MUST add a column that will take integer values to MYGRID. if you want teh
points to contain a text value of 50 characters you must likewise create an
appropriate column...etc


4. open the mapbasic window  (its under the options menu item)

cut and paste the following  lines of code into the window, highlight them
and press return>>

        set coordsys table mygrid
        update mygrid set obj = createpoint(centroidx(obj), centroidy(obj))

this will turn MYGRID into a grid of points

5. Now perform the spatial update using the menu option Table >Updatecolumn

set the 'table to update' as MYGRID
set the 'get values from table'  as your table of Regions
in the JOIN dialog specify the join as Where object from Mygrid INTERSECTS
etc

Set the 'calculate value of'  to be the column in your REGION table that you
wish to transfer

click ok

now browse mygrid and you will find that the points will have acquired your
Region column values where they lie within the region.

Any points lying outside the polygons will have either an empty column (if
text), or a value of 0 (if numeric/boolean). perform a query to select these
points and delete as necessary..

HTH
regards

r





-----Original Message-----
From: Massimo Corinaldesi [mailto:[EMAIL PROTECTED]
Sent: 22 April 2004 15:08
To: MAPINFO-L
Subject: MI-L make point inside region


Hi all,
i have th following problem:
i have some regions with a column value.
I must create points inside each region with the regions column value
associate with each point.
More i wish the possibility to define the distance between points.
In other words, i wish to build a point grid inside each region with the
value of the region associate to points.Is there some software (mbx or
other) to make this or i must write an custom Mapbasic program to do this
work ?

Thank you

massimo corinaldesi



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


*********************************************************************
This  e-mail  message,  and  any  files  transmitted  with  it, are
confidential  and intended  solely for the  use of the  addressee. If
this message was not addressed to  you, you have received it in error
and any  copying,  distribution  or  other use  of any part  of it is
strictly prohibited. Any views or opinions presented are solely those
of the sender and do not necessarily represent  those of the British
Geological  Survey. The  security of e-mail  communication  cannot be
guaranteed and the BGS accepts no liability  for claims arising as a
result of the use of this medium to  transmit messages from or to the
BGS. .                            http://www.bgs.ac.uk
*********************************************************************


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

Reply via email to