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

0
votes
1answer
29 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
134 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
13 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
43 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
24 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 ...
2
votes
0answers
34 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
23 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
214 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
28 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
56 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
102 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 ...
1
vote
2answers
246 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
57 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
163 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
69 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
87 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
39 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 ...
5
votes
1answer
131 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
70 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
102 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
79 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
92 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
350 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
498 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
113 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
440 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
307 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
111 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
883 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
77 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
238 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
1k 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
2k 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
346 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
161 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 ...
2
votes
1answer
3k 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
318 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 ...
0
votes
2answers
301 views

How to obtain Census Tract Centroids when Bureau's web site unavailable?

Does anyone have the Census Bureau file of census tract centroid, for either 2000 or 2010 tracts? With the Bureau's web site shut down, the only available file is the EPA's, and it omits about 500 ...
2
votes
1answer
716 views

How do I convert longitude & latitude to a 3d (geocentric x,y,z) coordinate?

I'm interested in finding the centroid of a point cloud. I understand that to do this I need to convert latitude and longitude values to 3d coordinates, average them and then convert the resulting ...
3
votes
1answer
943 views

How to use the field calculator's centroid() Geometry function in qgis 2.0?

There is an option in the field calculator for centroids under geometry which when you double click gives you "centroid( ". What information is required here in order to use this function?
5
votes
2answers
5k views

List of central coordinates for all countries?

I need a list of the central points for all countries: China: lat/long (coordinates of the most central point in China) France: lat/long (coordinates of the most central point in France) etc...
0
votes
1answer
93 views

How to convert polygons to centriods without losing attribute names?

I have a GeoJSON file of polygons and I need to convert it to centroids. Finding the centroid is very easy in QGIS. Problem My attribute names are very long and have a colon between them, e.g. ...
1
vote
2answers
474 views

How to use centroid option in Field Calculator in QGis

I want to use Centroid option in field calculator in QGis .How to access it?
2
votes
1answer
196 views

Zip + 4 Centroids

I have a data set with ZIP +4 codes, and ideally, I'd like to map them (their centroids) as points. I'm not interested in their boundaries (since they're not really geographies anyway). Does anyone ...
2
votes
1answer
755 views

How do I get the centroid of line with OGR

Can somebody explain how to get the centroid of a feature with ogr? I have no idea what the centroid() function itself does. >>> linelyr = lineshp.GetLayer() >>> f = ...
1
vote
1answer
111 views

Finding point in polygon

I want to calculate a point in a polygon, if the centriod falls inside the polygon it is what I want, but if it doesn't I would like it to be a visual center point. Essentially I want to do the ...
4
votes
0answers
1k views

Finding the “center of gravity” of multiple points where points have unequal weights [closed]

I'm trying to reduce a set of lat/lons (each with it's own weight) into one lat/lon that is the center of mass of all of the points. however when I map the results the average point falls no where ...
1
vote
1answer
132 views

Find the vertices of an ROI in XROI using IDL

I need to find the vertices of an ROI shape created in IDL's XROI, so that I can redraw the ROI on multiple images. I know you can find the centroid, area and perimeter with the GEOMETRY command, but ...
8
votes
4answers
1k views

assign and move centroids to their polygons

I m using QGIS 1.8 Lisboa. After calculating the centroids from a polygon shapefile, if some of them lie outside the polygon outlines, I'd like to move them on the polygon they came from. The ...
13
votes
4answers
11k views

How to determine the centroid of polygons?

I have a polygon vector and I want to quickly attain the centroid of this polygon for insertion in a text document. I am working with QGIS. I searched through other questions and although some are ...