# Tagged Questions

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 ...

204 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 ...
2k 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 ...
87 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" ...
378 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 ...
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 ...
5k 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 ...
434 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 ...
242 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 ...
6k 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 = ...
399 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 ...
475 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 ...
1k 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 ...
1k 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?
9k 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...
105 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. ...
767 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?
282 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 ...
1k 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 = linelyr....
122 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 ...
2k 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 ...
168 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 ...
796 views

### Calculating line centroids for 460,000 features in QGIS?

I have a large shapefile of lines, and want to run a mmqgis function (Plugins --> mmqgis --> Modify --> Convert Geometry Type.) The problem is the file is very large and crashes the program. What ...
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 ...
19k 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 ...
235 views

### Centroid of the equator and a point

Suppose I already have a way to compute the centroids of different geometry types: Points (arithmetic mean of Cartesian coordinates). Linestrings (polylines) (weighted mean of segment mid-points in ...
12k views

### How to calculate polygon centroids in R (for non-contiguous shapes)

I've spent a little while figuring out the answer to this question. It's not immediately obvious from a Google search, so thought it may useful to post the answer on here. There is also an additional ...
3k views

### Calculating a spherical polygon centroid

I'd like a general way to calculate centroids for polygons on a sphere. So far, the best online reference appears to be: Tools for Graphics and Shapes by Jeff Jenness. The method described ...
3k views

### How to take polygon centroid in Postgis

I have table with column name,Latitude and Longitude.I want to update this with polygon name and its centroid latitude longitude.I know there is a function in postgis st_centroid(geometry). But I want ...
4k views

### Is it possible to extract Coordinates of Polygon Centroid in QGIS?

I have created polygon centroids using one of the "Geometry Tools" but I would like to extract the actual coordinates into Excel for further work. Is this possible?
499 views

### table of polygon centroids

Given a polygon layer, census tracts, how can I generate a table of centroid coordinates in QGIS, or add columns with the centroid coordinates or generate a new layer of polygon centroid points?
4k views

### Polygon Centroid Options and Appropriateness (FeatureToPoint, Labels, etc)?

I've found a couple of other Stack Exchange questions related to this, but they were not satisfying. For example: How does ArcGIS Desktop calculate INSIDE point for Feature to Point? does not tell ...
4k views

### Find polygon centroid with Python

I'm using ArcGIS 9.3 to find centroid of some polygon features. I'd like to do this in Python, but so far I can only find solutions with VBA. Can anyone provide some leads here?
4k views

### How to find polygons centroids? [duplicate]

Possible Duplicate: Get list of coordinates for points in a layer? Sorry for another basic question - my map is almost done but now my boss wants me to enter new outbreaks (that we don't have ...
20k views

### How to find the center of geometry of an object?

Well it might be a simple question. Given a set of 2D or 3D points, the question is: How to find the center of geometry of an object? According to the following figure, the center of geometry ...
26k views

### How to add Lat/long columns to a point layer which is not in WGS84?

I need to extract the Lat/long coordinates of the centroids of districts. My QGIS project SCR and the different layers have all been set on "WGS 84 / UTM zone 18N". I've created the centroids using ...
2k views

### Formula to get polygon centroid

I need to compute the centroid position of an irregular polygon with lat and lon coordinates in Java. Which formula should I use to correctly compute a centroid?
1k views

### How to place multiple symbols on one polygon centroid?

I am using QGIS for visualizing the health conditions of elderly living in an old age home, some of the elderly have multiple medical device with them and I want to show them on the map. Suppose I ...
4k views

### How does ArcGIS Desktop calculate INSIDE point for Feature to Point?

Let me back up and say that from what I understand there are two common ways to calculate the centroid of a polygon in ArcGIS Desktop: Using Calculate Geometry on fields within the attribute table ...
1k views

### How to force QGIS Centroid Fill inside the Polygon?

I would like to use a centroid fill to enable me to place a letter inside a polygon. The advantage of using a centroid fill is that it also shows up in a legend, whereas labelling the layer would mean ...
1k views

### How to create point labels from midpoints of road polylines in QGIS?

Heres what i want to achieve: i have a roading polyline layer (singlepart ie has several features per road, grouped by an id field), and i want to (after merging the parts) find the mid point of the ...
9k views

### How can I calculate the center point inside a polygon in ArcGIS 9.3?

I'm using the JavaScript API 1.6 on ArcGIS 9.3. I have a polygon geometry in an ArcGIS map, and I'm trying to find a way to get the point that lies in the exact center of the geometry. What is the ...
3k views

### How do I calculate a weighted centroid with respect to a raster, e.g. population weighted centroid

In ArcGIS 10.0, how do I calculate the weighted centroid of a collection of polygons, where I want the weight to be a raster layer. In particular I am using a raster of population counts and would ...
3k views

### Is it possible to query a MySQL database using the results from map.getBounds() with Google Maps API v3?

I have a MySQL database that contains a large number of polygons, one for each district on a map. They are all quite complicated and it's unrealistic to simply load them all at once. I've looked into ...
28k views

### find the centroid of a cluster of points

While searching the web, solutions for finding centroids of polygons come up rather often. What I'm interested in is finding a centroid of a cluster of points. A weighted mean of sorts. I would ...