Proceed to GeoCommunity Home Page


SpatialNewsGIS Data DepotGeoImaging ChannelGIS and MappingSoftwareGIS JobsGeoBids-RFPsGeoCommunity MarketplaceGIS Event Listings
HomeLoginAccountsAboutContactAdvertiseSearchFAQsForumsCartFree Newsletter

Sponsored by:


TOPICS
Today's News

Submit News

Feature Articles

Product Reviews

Education

News Affiliates

Discussions

Newsletters

Email Lists

Polls

Editor's Corner


SpatialNews Daily Newswire!
Subscribe now!

Latest Industry Headlines
SiteVision GIS Partnership With City of Roanoke VA Goes Live
Garmin® Introduces Delta™ Upland Remote Trainer with Beeper
Caliper Offers Updated Chile Data for Use with Maptitude 2013
Southampton’s Go! Rhinos Trail Mapped by Ordnance Survey
New Approach to Measuring Coral Growth Offers Valuable Tool for Reef Managers
Topo ly - Tailor-Fit for Companies' Online Mapping Needs

Latest GeoBids-RFPs
Surveying Services*Canada
Hydrological Assessment*Belize
Nautical Charts*Poland
Software & Telemetry GPS
Spatial Data Management-DC

Recent Job Opportunities
Planner/GIS Specialist
Team Leader- Grape Supply Systems
Geospatial Developer

Recent Discussions
Raster images
cartographic symbology
Telephone Exchange areas in Europe
Problem showcasing Vector map on Windows CE device
Base map

GeoCommunity Mailing List
 
Mailing List Archives

Subject: Re: GISList: converting a grid into square polygon
Date:  07/31/2002 03:19:22 PM
From:  Quantitative Decisions



At 09:13 PM 7/23/02 +0800, Shih-Liang Chan wrote:
>I'm looking for a tool to convert every single cell of a grid theme into
>square polygons in shapefile format. I'll be highl appreciated if someone
>can provide me with any suggestion. Thanks,

The terminology used in this question indicates you are using Spatial Analyst.

Populate a grid with random integers and then convert that to a shapefile.
The Map Calculator expression is

(grid.MakeRandom * 1000000).int

Provided no two neighboring cells have the same value, the result will be
perfect. It is highly unlikely that two neighboring cells will have the
same value, so if you get fewer shapes than you expect, simply try again.

(In any grid of dimensions M by N, there will be 2*M*N - M - N pairs of
neighboring cells, and therefore the chance of all pairs having distinct
random values is approximately 0.999999^(2*M*N-M-N), which is about
0.999998 raised to the number of grid cells. This chance is close to 100%
until the number of grid cells gets into the hundreds of thousands. One
could increase the chance of success even further by using random integers
with a range greater than 1,000,000, but limitations in Spatial Analyst
preclude that.)

This method will not transfer the grid theme attributes to the shapefile
polygons. One way to get the attributes is to add the centers of the
shapefile squares as a theme in the view (compute the x, y coordinates of
the polygon centers, then add the table as a point event theme). Convert
the original grid to a shapefile in the usual way. Perform a spatial join
of that shapefile to the polygon centers. The rest is easy.

--Bill Huber
www.quantdec.com

cc: GISList (because the return address could not be reached)




To unsubscribe, write to gislist-unsubscribe@geocomm.com
________________________________________________________________________
Setup a GeoCommunity Account and have access to FAST DataDownloads
and Premium Career Posting at a discounted rate!
https://www.geocomm.com/cgi-bin/accounts/login

On-line Archives available at
http://spatialnews.geocomm.com/community/lists/


Sponsored by:

For information
regarding
advertising rates
Click Here!

Copyright© 1995-2012 MindSites Group / Privacy Policy

GeoCommunity™, Wireless Developer Network™, GIS Data Depot®, and Spatial News™
including all logos and other service marks
are registered trademarks and trade communities of
MindSites Group