<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FCraigleat</id>
	<title>GRASS-Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FCraigleat"/>
	<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/wiki/Special:Contributions/%E2%9A%A0%EF%B8%8FCraigleat"/>
	<updated>2026-05-26T06:55:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Count_points_in_polygon&amp;diff=8577</id>
		<title>Count points in polygon</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Count_points_in_polygon&amp;diff=8577"/>
		<updated>2009-03-31T15:22:42Z</updated>

		<summary type="html">&lt;p&gt;⚠️Craigleat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q:''' How can I count the number of points which fall into polygons?&lt;br /&gt;
&lt;br /&gt;
'''A:''' Carry over an attribute from the polygons to the points, then count the number of equal attributes by SQL grouping.&lt;br /&gt;
&lt;br /&gt;
Example: How many archaeological sites does each parcel owner have?&lt;br /&gt;
&lt;br /&gt;
  # Spearfish area&lt;br /&gt;
  # (Note: DBF driver unsupported, please use SQLite, MySQL or PostgreSQL)&lt;br /&gt;
  g.copy vect=archsites,myarchsites&lt;br /&gt;
  v.db.addcol myarchsites col=&amp;quot;owner varchar(25)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We now transfer the owner names to the archaeological sites (points):&lt;br /&gt;
&lt;br /&gt;
  v.what.vect myarchsites qvect=fields column=owner qcolumn=label&lt;br /&gt;
  # verification:&lt;br /&gt;
  v.db.select myarchsites&lt;br /&gt;
 &lt;br /&gt;
  d.mon x0&lt;br /&gt;
  d.vect -c fields&lt;br /&gt;
  d.vect myarchsites icon=basic/diamond size=10&lt;br /&gt;
 &lt;br /&gt;
  # test run&lt;br /&gt;
  echo &amp;quot;SELECT *,count(owner) FROM myarchsites GROUP BY owner&amp;quot; | db.select&lt;br /&gt;
 &lt;br /&gt;
  # upload to polygons map&lt;br /&gt;
  g.copy vect=fields,myfields&lt;br /&gt;
  v.db.addcol myfields col=&amp;quot;numpoints integer&amp;quot;&lt;br /&gt;
  v.db.update myfields column=numpoints value=&amp;quot;(SELECT count(owner) FROM myarchsites WHERE \&lt;br /&gt;
  myarchsites.owner=myfields.label GROUP BY owner);&amp;quot;&lt;br /&gt;
  # verification:&lt;br /&gt;
  v.db.select myfields&lt;br /&gt;
&lt;br /&gt;
The resulting table contains the number of points falling into each polygon.&lt;br /&gt;
&lt;br /&gt;
Caveat:&lt;br /&gt;
The above approach counts attributes and not features. This means that if there is more than one category linking a feature to rows in the table you will count more categories than there are features. It is also possible that many features link to one category and in this case you will under count the number of features. The first scenario may arise by using v.edit to remove duplicates e.g. Point A and point B are snapped to produce point C (features A and B are deleted) and feature C inherits the attributes of A and B. Two categories now link to feature C. To use the above approach to count points with extra categories it is necessary to create a new table and populate it with categories such that there is a 1:1 correspondence between features and categories. The new table (MyCats) can then be used as a filter e.g.&lt;br /&gt;
&lt;br /&gt;
  # test run&lt;br /&gt;
  echo &amp;quot;SELECT *,count(owner) FROM myarchsites WHERE &amp;quot;&amp;quot;cat in (select * from MyCats)&amp;quot;&amp;quot; GROUP \&lt;br /&gt;
  BY owner&amp;quot; | db.select&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Craigleat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Count_points_in_polygon&amp;diff=8066</id>
		<title>Count points in polygon</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Count_points_in_polygon&amp;diff=8066"/>
		<updated>2009-01-27T06:33:05Z</updated>

		<summary type="html">&lt;p&gt;⚠️Craigleat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q:''' How can I count the number of points which fall into polygons?&lt;br /&gt;
&lt;br /&gt;
'''A:''' Carry over an attribute from the polygons to the points, then count the number of equal attributes by SQL grouping:&lt;br /&gt;
Example: How many archaeological sites does each parcel owner have?&lt;br /&gt;
&lt;br /&gt;
  # Spearfish area&lt;br /&gt;
  # (Note: DBF driver unsupported, please use SQLite, MySQL or PostgreSQL)&lt;br /&gt;
  g.copy vect=archsites,myarchsites&lt;br /&gt;
  v.db.addcol myarchsites col=&amp;quot;owner varchar(25)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We now transfer the owner names to the archaeological sites (points):&lt;br /&gt;
&lt;br /&gt;
  v.what.vect myarchsites qvect=fields column=owner qcolumn=label&lt;br /&gt;
  # verification:&lt;br /&gt;
  v.db.select myarchsites&lt;br /&gt;
 &lt;br /&gt;
  d.mon x0&lt;br /&gt;
  d.vect -c fields&lt;br /&gt;
  d.vect myarchsites icon=basic/diamond size=10&lt;br /&gt;
 &lt;br /&gt;
  # test run&lt;br /&gt;
  echo &amp;quot;SELECT *,count(owner) FROM myarchsites GROUP BY owner&amp;quot; | db.select&lt;br /&gt;
 &lt;br /&gt;
  # upload to polygons map&lt;br /&gt;
  g.copy vect=fields,myfields&lt;br /&gt;
  v.db.addcol myfields col=&amp;quot;numpoints integer&amp;quot;&lt;br /&gt;
  v.db.update myfields column=numpoints value=&amp;quot;(SELECT count(owner) FROM myarchsites WHERE \&lt;br /&gt;
  myarchsites.owner=myfields.label GROUP BY owner);&amp;quot;&lt;br /&gt;
  # verification:&lt;br /&gt;
  v.db.select myfields&lt;br /&gt;
&lt;br /&gt;
The resulting polygon table contains the number of points falling into each polygon.&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Craigleat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Working_with_many_rasters&amp;diff=5691</id>
		<title>Working with many rasters</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Working_with_many_rasters&amp;diff=5691"/>
		<updated>2008-01-09T16:25:49Z</updated>

		<summary type="html">&lt;p&gt;⚠️Craigleat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q:''' I have a great number of aerial images I need to use as a background map for some digitizing work. What can I do to ease the pain of working with this large dataset?&lt;br /&gt;
&lt;br /&gt;
'''A:''' The pain you are experiencing probably arises from trying to figure out which map to activate when you zoom in and doing this many times. You have at least three options available to you.&lt;br /&gt;
&lt;br /&gt;
; 1. Use a Web Map Server (WMS)&lt;br /&gt;
: WMS is normally used for fetching remote maps, but could be used on the local host to simplify the task of working with many map tiles. You would simply provide the bounding box and resolution of your desired region and the server would select and return the correct tiles. Since the data is imported into GRASS the data store would grow as you panned and zoomed. This could be avoided by using the same filename for each import and overwriting the GRASS raster. There may be negative performance considerations with this approach.&lt;br /&gt;
&lt;br /&gt;
; 2. Use the group functionality of gis.m&lt;br /&gt;
: The map tiles could be loaded into one or more groups in the GIS Manager (gis.m). Using the gui to load the maps can be tedious with a large number of maps and especially if the maps have three bands because each band is a separate file that must be loaded. The workspace file (.grc) which holds details of the loaded groups and layers is a text file and so a script could be used to build this file.&lt;br /&gt;
&lt;br /&gt;
; 3. Patch your tiles together&lt;br /&gt;
: The map tiles could be patched into one or more mosaics with due consideration for the maximum file sizes permissible on your operating system and filesystem. For patching raster maps r.patch is your friend. Glynn Clements made the following remarks on the mailing list regarding the use of r.patch on a large region:&lt;br /&gt;
&lt;br /&gt;
: &amp;quot;If they [the maps] are (approximately) tiles, I would suggest using a hierarchical approach, patching groups of adjacent tiles into larger tiles, then patching the larger tiles together, so that each r.patch operation has relatively few maps, and the earlier stages have relatively small regions. The total time taken by r.patch is roughly proportional to the total number of cells in the region multiplied by the number of input maps, so the combination of a large region and a large number of maps will be slow.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Patching a large region can take several days and with many calls to r.patch a simple script becomes necessary. You may wish to request verbose output from r.patch and include some echos in your script so you can keep a check on the progress.&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Craigleat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Working_with_many_rasters&amp;diff=5690</id>
		<title>Working with many rasters</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Working_with_many_rasters&amp;diff=5690"/>
		<updated>2008-01-09T15:59:23Z</updated>

		<summary type="html">&lt;p&gt;⚠️Craigleat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q:''' I have a great number of aerial images I need to use as a background map for some digitizing work. What can I do to ease the pain of working with this large dataset?&lt;br /&gt;
&lt;br /&gt;
'''A:''' The pain you are experiencing probably arises from trying to figure out which map to activate when you zoom in and doing this many times. You have at least three options available to you.&lt;br /&gt;
&lt;br /&gt;
; 1. Use a Web Map Server (WMS)&lt;br /&gt;
: WMS is normally used for fetching remote maps, but could be used on the local host to simplify the task of working with many map tiles. You would simply provide the bounding box and resolution of your desired region and the server would select and return the correct tiles. Since the data is imported into GRASS the data store would grow as you panned and zoomed. This could be avoided by using the same filename for each import and overwriting the GRASS raster. There may be negative performance considerations with this approach.&lt;br /&gt;
&lt;br /&gt;
; 2. Use the group functionality of gis.m&lt;br /&gt;
: The map tiles could be loaded into one or more groups in the GIS Manager (gis.m). Using the gui to load the maps can be tedious with a large number of maps and especially if the maps have three bands because each band is a separate file that must be loaded. The workspace file (.grc) which holds details of the loaded groups and layers is a text file and so a script could be used to build this file.&lt;br /&gt;
&lt;br /&gt;
; 3. Patch your tiles together&lt;br /&gt;
: The map tiles could be patched into one or more mosaics with due consideration for the maximum file sizes permissible on your operating system and filesystem. For patching raster maps r.patch is your friend. Glynn Clements made the following remarks on the mailing list regarding the use of r.patch on a large region:&lt;br /&gt;
&lt;br /&gt;
: &amp;quot;If they [the maps] are (approximately) tiles, I would suggest using a hierarchical approach, patching groups of adjacent tiles into larger tiles, then patching the larger tiles together, so that each r.patch operation has relatively few maps, and the earlier stages have relatively small regions. The total time taken by r.patch is roughly proportional to the total number of cells in the region multiplied by the number of input maps, so the combination of a large region and a large number of maps will be slow.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Craigleat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Working_with_many_rasters&amp;diff=5689</id>
		<title>Working with many rasters</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Working_with_many_rasters&amp;diff=5689"/>
		<updated>2008-01-09T14:57:09Z</updated>

		<summary type="html">&lt;p&gt;⚠️Craigleat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Q:''' I have a great number of aerial images I need to use as a background map for some digitizing work. What can I do to ease the pain of working with this large dataset?&lt;br /&gt;
&lt;br /&gt;
'''A:''' The pain you are experiencing probably arises from trying to figure out which map to activate when you zoom in. You have at least three options available to you.&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Craigleat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Promotional_material&amp;diff=4775</id>
		<title>Promotional material</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Promotional_material&amp;diff=4775"/>
		<updated>2007-10-03T13:18:13Z</updated>

		<summary type="html">&lt;p&gt;⚠️Craigleat: /* GRASS FLYER */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Collection of material to promote the GRASS project&lt;br /&gt;
&lt;br /&gt;
==== Technical background, Screenshots ====&lt;br /&gt;
* URLs: http://grass.itc.it and [http://grass.itc.it/mirrors.php mirrors sites]&lt;br /&gt;
* [[Technical Data sheet]]&lt;br /&gt;
* Portable software: Linux, MacOSX, MS-Windows, Sun, ...&lt;br /&gt;
** Graphics, [http://grass.itc.it/screenshots/ screenshots] or images that represent the GRASS 6 project  ''(please add URLs and indicate license)''&lt;br /&gt;
*** User interfaces: http://grass.itc.it/grass61/screenshots/index.php (Creative Commons)&lt;br /&gt;
*** Raster: http://grass.itc.it/grass61/screenshots/raster.php (Creative Commons)&lt;br /&gt;
*** Image processing: http://grass.itc.it/grass63/screenshots/imagery.php (Creative Commons)&lt;br /&gt;
*** Vector: http://grass.itc.it/grass61/screenshots/vector.php (Creative Commons)&lt;br /&gt;
*** Vector network: http://grass.itc.it/grass61/screenshots/network.php (Creative Commons)&lt;br /&gt;
*** 3D Vector/CAD: http://grass.itc.it/grass63/screenshots/vector.php (Creative Commons)&lt;br /&gt;
*** winGRASS: http://grass.itc.it/grass63/screenshots/wingrass.php (Creative Commons)&lt;br /&gt;
*** GPS: http://grass.itc.it/grass63/screenshots/gps.php (Creative Commons)&lt;br /&gt;
** Project history: Started 1982, GRASS 1.0 published 1984&lt;br /&gt;
** [[Description of the project]] (100-150 words)&lt;br /&gt;
** Listing the [[core features]]&lt;br /&gt;
** &amp;quot;Growing GRASS&amp;quot; - Lightning talk at FOSS4G 2006 (10 slides): [http://mpa.itc.it/markus/papers/grass_lightening_talk_no_anim.pdf static PDF] or [http://mpa.itc.it/markus/papers/grass_lightening_talk.odp.gz ODP with animations]&lt;br /&gt;
&lt;br /&gt;
====GRASS FLYER====&lt;br /&gt;
This one gives a short introduction in GRASS. &lt;br /&gt;
* [http://www.geog.fu-berlin.de/~malte/grassflyer_v1.pdf English_A4] English, DIN A4&lt;br /&gt;
* [http://www.geog.fu-berlin.de/~malte/grassflyer_letter.pdf English_letter] English, Lettersize&lt;br /&gt;
* [http://istgis.ist.supsi.ch:8001/geomatica/docs/grassflyer.pdf Italiano]&lt;br /&gt;
* [http://www.geog.fu-berlin.de/~malte/grassflyer_de.pdf Deutsch]&lt;br /&gt;
* [http://gama.fsv.cvut.cz/data/grasswikicz/grassflyer-cz.pdf Czech]&lt;br /&gt;
* [https://grasssvn.itc.it/grasssvn/grassaddons/trunk/grassaddons/grassflyer/flyer1/#_trunk_grassaddons_grassflyer_flyer1_ Latex sources]&lt;br /&gt;
&lt;br /&gt;
=== OSGeo Foundation material ===&lt;br /&gt;
&lt;br /&gt;
[http://www.osgeo.org/visibility GFOSS-Promotion-Material] including GRASS (PDFs, Powerpoint-, OpenOffice- &amp;amp; Scribus templates)&lt;br /&gt;
&lt;br /&gt;
=== Communication &amp;amp; Support ===&lt;br /&gt;
* 11 [http://grass.itc.it/mailman/listinfo english mailing lists] (user, devel, Quality Assessment, ...), and 7 [http://grass.itc.it/community/support.php#localized localized mailing lists]&lt;br /&gt;
* [irc://irc.freenode.net/grass IRC] (with [http://logs.qgis.org/grass/ archive])&lt;br /&gt;
* [http://www.urbeli.com/grassforum/index.php User-Forum]&lt;br /&gt;
* [http://www.osgeo.org/search_profile?SET=1&amp;amp;MUL_TECH%5B%5D=00015 Companies supporting GRASS]&lt;br /&gt;
&lt;br /&gt;
=== Live-CD der GAV ===&lt;br /&gt;
&lt;br /&gt;
see [[GAV live CD]]&lt;br /&gt;
&lt;br /&gt;
=== See also ===&lt;br /&gt;
&lt;br /&gt;
[[:Category:Promotion]] (GRASS Promotion Team)&lt;br /&gt;
&lt;br /&gt;
[[Category: Community]]&lt;br /&gt;
[[Category: Promotion]]&lt;/div&gt;</summary>
		<author><name>⚠️Craigleat</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Point_in_polygon&amp;diff=4452</id>
		<title>Point in polygon</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Point_in_polygon&amp;diff=4452"/>
		<updated>2007-07-13T12:10:54Z</updated>

		<summary type="html">&lt;p&gt;⚠️Craigleat: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''Q:''' Is there a way to query if a given point is inside a polygon (closed area)?'' &lt;br /&gt;
&lt;br /&gt;
'''''A:''' Yes, with v.select. It allows you to select points which overlap areas or vice versa:&lt;br /&gt;
&lt;br /&gt;
     v.select ainput=points binput=areas output=points_in_areas&lt;br /&gt;
&lt;br /&gt;
The resulting map 'points_in_areas' will contain points which are inside the area(s).&lt;br /&gt;
&lt;br /&gt;
[[Category: FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Craigleat</name></author>
	</entry>
</feed>