In geometry, the centroid, geometric center, or barycenter of a plane figure or two-dimensional shape X is the intersection of all straight lines that divide X into two parts of equal moment about the line. Informally, it is the "average" (arithmetic mean) of all points of X. The definition extends ...

learn more… | top users | synonyms

1
vote
1answer
24 views

Correct Projection for calculating centroids of a group of points?

I have a long list of points covering all of North America for which I would like to calculate the centroid (by grouping points based on the "Name" column). My approach is to take the WGS84 ...
3
votes
0answers
27 views

How to assign polygon attributes to grid cells using centroids in QGIS?

I am relatively new usign QGIS but have realized it is a great tool. Unfortunately I can´t figure out the following yet. I have two polygon shapefiles, one is a grid I have created using QGIS ...
1
vote
2answers
34 views

How to compute the distance from the current polygon centroid to another in QGIS field calculator?

There is layer with polygons. I want to save in new field distance of every polygon's centroid to centroid of one particular polygon. To do this I should write some expression like this: ...
3
votes
1answer
37 views

Positioning labels in center of clipped polygons?

I am using ArcMap 10.1 and would like to label a polygon layer that i have clipped. It appears that the label is set for the geometric center of the polygon that falls outside of the clipping.
0
votes
2answers
34 views

Polygon Torque Map- problem changing polygons to points

I'm trying to alter my data on cartodb map to get maritime emissions over about 20 years- by country. Hence trying get a torque map for polygons, and by changing polygons to points based on a ...
2
votes
2answers
177 views

How to find multiple centers of gravity?

Say I have a number of customers in a geographical area, marked "c": Each customer has a Lat/Long. I would like to find x number of points, in the same space, that best serve the customers, ie. ...
2
votes
1answer
74 views

Calculate The Minimum Distance from Polygon Centroid to Edge

I am looking to calculate the minimum distance from the Center of a polygon (A crescent shaped polygon would have a center inside the polygon) to its edge. I have parcel data and I am trying to ...
1
vote
1answer
48 views

Obtaining Centroid from Polygon in SQL Server 2008 R2

I have several spatial layers created in QGIS that are held as spatial data in SQL Server 2008 R2. What I want to do is to find the centroid (OS Easting and Northing) of the polygon from the geometry. ...
2
votes
1answer
89 views

How to select centroid of multiple nearby points with same attribute

This question is very similar to #131823, that is not solved yet. I want to merge several points like bus stops into one single point in the centroid of all selected points. The bus stops have a ...
2
votes
0answers
85 views

How to automate calculation of distance between a zip code (centroid) and an address within one line of data?

I have a large data set of federal contracts which includes two pieces of spatial data per entry (or line): the zip code in which the project took place and the address of the contractor. I am ...
8
votes
1answer
468 views

How exactly is the centroid of polygons calculated?

I would like to know how exactly QGIS Geometry tools -> polygon centroid is calculating the point coordinates. For example does it divide the boarder of the polygon into small points, take two pairs ...
3
votes
1answer
144 views

What is the difference between data access's “SHAPE@XY” and “SHAPE@TRUECENTROID” tokens?

Data Access Search Cursor. What, if anything, is the difference between the tokens "SHAPE@XY" and "SHAPE@TRUECENTROID"? They returned the same coordnates on a test polygon: >>> cursor = ...
0
votes
0answers
40 views

Referencing a raster by center coordinate

I'm concerned with producing mosaics from UAV thermal IR video frames. I exported several several frames containing the temperature values in a matrix (.csv). From camera specifications and flight ...
0
votes
1answer
37 views

Identify polygons greater than n-th percentile and perform further analyses using arcpy

My goal is to identify tracts that are above the 99 percentile of a variable (xvar), to dissolve contiguous tracts by summing a variable (yvar), and to get the coordinates of the centroids ...
7
votes
1answer
236 views

Coordinates of cities and villages in The Gambia/Senegal

I am looking for sources of geo-referenced data on villages and cities (or all other things there are) in The Gambia (and Senegal if available). One issue with geocoding in rural West Afrika is the ...
0
votes
0answers
34 views

Calculating population statistics for postcode centroids

Perhaps this isn't really specifically a GIS question, but I've been using ArcMap to measure distances from the access points of green spaces in Bristol to postcode centroids and would like to use ...
1
vote
1answer
99 views

How do I find the centroid of each patch in a raster?

I am trying to get the centroid of a several areas in a large raster data set. The output needs to be raster format, with one pixel representing the center of each patch, in the same resolution as ...
0
votes
0answers
30 views

how to assign the same centroid to polygons grouped by ID , R

I have a SpatialPolygonDataFrame object from a shapefile of different zip codes in New York state, many zip codes are represented by several polygons( for different reasons) so I want to assign the ...
3
votes
0answers
67 views

Finding centroids for icosahedral gnomonic projection?

I've been trying to create an icosahedral gnomonic projection, like this example by Jason Davies or this one (the Fisher projection). The method that I initially used was using the centroid of each ...
1
vote
0answers
25 views

Error adding feature to centroids in QGIS [closed]

I want to map forest stands. I have the compartments as centroids and I am trying to add a feature by snapping to them and creating polygons. Each time I click, however, it displays a box titled ...
1
vote
4answers
547 views

How to move a point shapefile to the centroid of a polygon?

I have this point shapefiles on top of a bounded polygon. I would like to move each point to the centroid of each bounded polygon. Is there an automatic way in ArcGis 10.1 of solving this? Like in the ...
0
votes
0answers
32 views

Color polygon centroid according to attribute value in GRASS

I have many polygons in GRASS and want to color them according to their T-value. I can use v.colors and define a color table. That works fine when I plot the areas of the polygons. However, I would ...
0
votes
0answers
83 views

Problem with MySQL CENTROID() in 5.6

We're testing out an upgrade to MySQL 5.6 to take advantage of it's enhanced GIS functionality, and we ran into this problem: SET @mpoly = GeomFromText('MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((0 4,0 ...
5
votes
2answers
136 views

Why does qgis give multiple centroids per polygon?

I have a shapefile for the boundaries of European NUTS regions, and I would like to compute the centroid for each of those regions. When I do this in QGIS (2.6.1 on OSX, using polygon centroids from ...
2
votes
2answers
476 views

Arc - how do I find the coordinates of the centroid of a raster?

How do I find the coordinates of the centre / centroid of a raster? I have tried Zonal Geometry but this does not give me the coordinates. I need to find the centroids of two rasters and create ...
0
votes
0answers
73 views

Routes through centroids and array functions

I have a table stopcentroids4 like in figure with the following fields: gid, routes, geom and i want to draw a line for each route that runs through centroids. In my code there is a mistake. ...
2
votes
1answer
336 views

Distance to nearest hub output not correct

In QGIS 2.6, I'm working with two point layers: center of the population per census tract and stores that accept food stamps. I'm using "distance to nearest hub" to calculate nearest food stamp outlet ...
1
vote
1answer
73 views

Drawing routes through centroids

According with this link http://workshops.boundlessgeo.com/postgis-intro/advanced_geometry_construction.html I'm creating lines that describe routes. I have a table stopcentroids4 like in figure with ...
1
vote
0answers
107 views

Finding census block with highest pop. value within the census tract

In QGIS, I'm trying to plot a centroid of only the census block with the highest population within each census tract. So there should only be one point per tract- that of the block with the greatest ...
1
vote
0answers
45 views

Postgis routes diagram point-to-point

I have a set of centroids to which are related a set of points characterized by linename. The table with the points contains these fields: id ¦ linename ¦ lat ¦ lon¦ I would like to make a diagram ...
7
votes
1answer
193 views

How to connect centroids of lines sharing the same intersection in QGIS?

I'm looking for a big help to accomplish the following task: I have this street network of the center of Turin (IT), composed by lines representing streets, and black points representing ...
1
vote
0answers
111 views

How can I find the center of the circle or ellipse I just created

I need to draw circles and ellipses with a certain length/width/ radius. I used the rectangles ovals digitizing plugin to create them, but only measured roughly the circles' radiuses. It would be ...
3
votes
2answers
145 views

How to compute weighted centroids in PostGIS?

I have a group of points and each point has an associated count value. How can I calculate the centroid of the group weighted by the values associated to each point?
1
vote
1answer
94 views

Looking for information on methods or algorithms used to calculate centroid from polygons across software

Looking for information on methods or algorithms used to calculate point centroids from polygons across software. ArcGIS uses a "gravity model" but can someone point me to the math or a paper on the ...
2
votes
2answers
125 views

Buffering points bounded within polygons

I've checked around and didn't see this one yet, hoping somebody can help me out (preferably without code, but I'm all ears). I'm using arcGIS 10.1 on an i5 win7 machine with 16g RAM. Not a xeon but ...
3
votes
1answer
473 views

OpenLayers: How to get *real* centroid of a Line Geometry/Feature?

I have declared a line geometry as: var lineString = new OpenLayers.Geometry.LineString([source,target]); then I am trying to get the centroid of this lineString as lineString.getCentroid(). But ...
6
votes
1answer
866 views

How to get the centroid of a set of points in POSTGIS?

I use PostgreSQL with POSTGIS extension. I have a set of points in the_geom column from a table myshema.myobjects I would want create a select statement to get the centroid of this cluster, so from a ...
0
votes
2answers
146 views

Calculating Centroids with Zonal Geometry in ArcGIS

I have a shapefile containing polygons. Each polygon is defined by its postal code. I want to calculate the centroid of each polygon using Zonal Geometry. Sadly, for some polygons there are no ...
3
votes
1answer
554 views

Shortest distance from polygon centroids to a line in QGIS

To get the distance of each polygon centroid from a line, I have tried the Distance to nearest hub algorithm from the Processing Toolbox. The distances I got from the algorithm did not seem correct, ...
0
votes
0answers
426 views

How to calculate a population weighted centroid using a raster and shape file in QGIS?

I am very new to QGIS so please help me with a step by step answer. I have a raster file with population count and a shape file based on a large population and shape file. I have successfully created ...
1
vote
2answers
151 views

How to get a set of all buildings of an OpenStreetMap section in form of single points / Multiple polygons as one point

The objective is to get a set of all buildings of an Open Street Map section in form of single points in a shapfile. I downloaded the section from osm. Imported the section into QGIS (and later ...
2
votes
4answers
1k views

Combining different geometry types into same feature class?

I've searched the question in this blog. Maybe I don't use the right words but anyway my problem is not present in any post so I'll try to explain my question by opening a new one. I have a polygon ...
3
votes
1answer
83 views

Qgis creating point within complex shapes (with holes) [duplicate]

I'm looking for a tool to create a point in every polygon, that will be placed in the polygon. these are complex shapes with holes. the point must not put in those holes! the "plugin RealCentroid" ...
3
votes
1answer
296 views

Computing radius of gyration in PostGIS

The radius of gyration is a measure of the standard deviation of distances between points (and their center of mass), i.e., how frequently and how far points are moving. A formal definition is: I ...
5
votes
1answer
2k views

calculate {minimal} distance between polygons in R

I have calculated the surface area of species distributions (merging polygons from shapefiles), but since this area can be comprised of quite distanced polygons, I would like to calculate some measure ...
6
votes
1answer
3k views

What is Centroid of all lands of Earth?

May be my question is somehow ridiculous but I want to find the center point of all lands of the earth. What I have tried up to now is downloading shape file of all countries and polar parts of the ...
3
votes
1answer
397 views

Is there a method in SQL Server (2008 or 2012) that will return the equivalent of the Esri LabelPoint for geometry?

I'm looking for a method that is equivalent to the Esri LabelPoint for SQL Server Geometry (or fairly close). Does it exist by a different name? Or is there an after-market implementation? I found ...
3
votes
1answer
191 views

How to get projected centroids in QGIS?

I am trying to get a centroid for several polygons on a global scale, in a way that it would correctly represent the common centre of all the polygons, taking Earth's curvature into account. The ...
3
votes
1answer
5k views

How to calculate centroid of a polygon defined by a list of longitude/latitude points? [duplicate]

I've imported some polygons (ways) from OpenStreetMap and now want to calculate the centroids of them. For this purpose I wrote following code: final List<Point2D.Double> points = ...
1
vote
0answers
357 views

Locating the centroid (center of mass) of spherical polygons

I'm trying to work out how best to locate the centroid of an arbitrary shape draped over a unit sphere, with the input being ordered (clockwise or anti-cw) vertices for the shape boundary. The density ...