Questions tagged [polygon]
For issues relating to the creation, manipulation and rendering of polygons in graphical user interfaces.
4,679
questions
0
votes
0
answers
5
views
Need to outline several contiguous areas on map
I am working with maps that are based upon the lot and block survey system. So, for example, my house could be a parcel identified by block 34, lot 2. For every block, there are usually multiple ...
0
votes
0
answers
16
views
Using Python, draw spokes from a polygon's center to its boundary
My problem is drawing spokes from the center of the polygon to the boundary so that each spoke creates the same angle.
I saw a comment mentioning the same idea in this post, but I'm not very ...
-1
votes
0
answers
14
views
GEOPANDAS: How can I move points, multilinstrings and multipolygons? [closed]
My task is to move all the points given in the geojson file upwards by 30 centimeters.
How can I do that? My file is in coordinate system EPSG:4326.
I'm using python 3.7.
0
votes
0
answers
36
views
shapely : split overlapping polygons python
Is there any way to split a polygon into several simpler shapes?
I have polygons like these :
link to sample image
that I want to split into several narrow rectangular shapes like this :
link to what ...
0
votes
1
answer
20
views
How to mask a raster using SpatialPolygonsDataFrame object?
I would like to mask a raster using all the polygons contained in a "SpatialPolygonsDataFrame" object.
Up until now i tried this:
r=raster("myraster.asc")
Then I got my ...
-1
votes
0
answers
21
views
money is not debited from my web3 (polygon) wallet "Fail with error 'TransferHelper: TRANSFER_FROM_FAILED'" [closed]
https://polygonscan.com/tx/0xc28e368abdc6cf2c5d80802e0d9d3b545f9c7c4758d76e2fcf2c9701baf22572
I am doing a coin exchange via web3. On the bsc network my code works. But in polygon network I get "...
0
votes
0
answers
9
views
Map multiple geospatial polygons to their nearest lat/long point in a different table using GeoPandas or other Python tool
I've got a list of voting precinct geospatial polygons that need to join to a different table with just lat/long points for each zip code. How can I join each of the precinct polygons to its nearest ...
0
votes
0
answers
27
views
Elastic Search geo shape query not working
I have a polygon and 2 points.
The polygon is a Elastic Search document (where the location fields has a "polygon" type)
I'm running a query to figure rather or not these 2 points are inside ...
0
votes
0
answers
24
views
Simple 2d physics with polygons C#
I have been working on a 2D physics engine using polygons.
And i am having trouble implementing the actual physics part. For a bit of background, i am not experienced at all when it comes to physics ...
1
vote
0
answers
38
views
How to write text on Flutter Google maps, or more specifically, inside or around polygons?
I have created multiple polygons on Google Maps in a Flutter app. Now I want to write some codes inside or even outside the polygons, for example, poly-101, poly-102, and so on. How can I do that? I ...
0
votes
0
answers
16
views
Calculate percentage overlap of multiple polygons from a SpatialPolygonsDataFrame
There are a few related questions and answers out there, but none fit my data structure.
I have a SpatialPolygonsDataFrame which holds (multiple) polygons of multiple features (here features being ...
0
votes
0
answers
19
views
best way to recognize a Free segment, hyperbole or a Polygon from segments, no java.awt
im working on a project and basically i have this thing that draw segments every time, this class segment i have 2 objects PointOnTheArea which show me the two ends of the segment in the plane:
public ...
0
votes
0
answers
16
views
How to scale a polygon without translating the polygon given a list of coordinates in javascript?
I have an array of coordinates [x1,y1, x2, y2 ....] which represents a polygon on a html canvas. I am drawing the polygon using KonvaJS. I am trying to retrieve the scaled coordinates for the polygon ...
0
votes
0
answers
26
views
Irregular Polygon Sub-division?
I have a problem in which I have an irregular polygon shaped container which needs to be sub-divided such that it contains certain smaller rectangles of specific dimensions. I have previously tried ...
1
vote
1
answer
24
views
Paint everything outside of polygons in a Pillow image in palette mode?
I'm creating a heatmap using Pillow in Python. After painting the heatmap, I want to blank out everything outside a certain area. The area in question is described by a handful of polygons, each ...
0
votes
0
answers
11
views
Morphing polygonal region from source image to homologous destination polygonal region
What is the algorithm (or Python package function) for mapping a polygonal region from a source image as an overlay onto a homologous destination polygonal region of a target image. The two polygons ...
0
votes
3
answers
63
views
Polygon and circle algorithm
Question here:
Given a polygon P, a circle C_init, and a direction D, let C_init move along D, it might have collision with P (C_target below). How to calculate the distance between C_init and ...
0
votes
0
answers
19
views
Pyqt5 extended image annotation graph
I am trying to annotate an image with a multiple closed cells like structure. New to PyQt so
I found this straightforeward nice code from eyllanesc here:
PyQT User Editable Polygons
I need to extend ...
-1
votes
1
answer
56
views
How to determine if a LinkedList of segments are a Polygon?
I have been trying to solve this for a day, basically I have this LinkedList polygon with each Segment having two variables: startingPoint and endingPoint and I call them with two methods p1() and p2()...
2
votes
1
answer
32
views
Distance from polygon to Point in geopandas
I have a main polygon of ploygons that have areas mapped out on a map
and a bunch of points such as sample below
NAME lt ln
1 12.9336806 77.6122669
2 12.974768 77.767745
...
0
votes
1
answer
36
views
Make Polygon objects from geojson
I have geojson files that can have x amount of polygons so I have a for loop that goes through the file and adds the coords of each polygon to an array. Now i'm trying to index the array when making ...
7
votes
3
answers
270
views
Improving positioning of map / polygon labels
This is an extension to Improve centering county names ggplot & maps and ggplot centered names on a map. It is not only a theoretical problem, I came across that particular case on answering How ...
0
votes
1
answer
20
views
python assert total_area < 500 test
Im trying to use an assert to check if the total area of a polygon is more than 500 ha. But when I use data that is more than 500 it still passes the test.
geom = feature['geometry']['coordinates']...
-1
votes
0
answers
48
views
SVG with screen resolutions
Can you help me with the screen resolution.
I use svg to draw rectangles, matching the rectangles given in the image. But when I change the screen resolution, the position of the squares I draw is ...
0
votes
0
answers
16
views
The area & center of gravity of a polygon having non-uniform density of vertices? (in Python)
I would like to calculate the COG of a polygon shaped exactly like the contour map of my town. However, using the available database of borderpoints would produce a rigged result, since some places ...
1
vote
1
answer
19
views
plotting polygons inside loop in R, why this ambiguous behavior?
So, I want to plot multiple polygons over one polygon using a loop in r. I have read that you need to use print in order to succesively display the polygons over the original polygon. However, that is ...
0
votes
0
answers
27
views
Warning: Error in google_dispatch: Invalid map parameter [No stack trace available] after using leafletProxy for polygons
this is my first time working with R shiny and I am attempting to integrate shiny features with a leaflet map I have made. The idea is that I would like to have radio buttons which toggle between four ...
0
votes
1
answer
33
views
How to get NFT's transfer history like polygonscan
I minted my NFT through my own smart contract successfully. But I don't know how to get my NFT's transfer history like polygonscan do. Is there any API or functions to get NFT history?
Some documents ...
0
votes
0
answers
16
views
Split nested arrays in python to use in a new file
I have a program that creates a geojson file with the following data file structure.
{
"type": "Polygon",
"Coordinates":[
[ //EACH SHAPE ARRAY
[
-10....
0
votes
1
answer
38
views
How to draw an outline around multiple polygons while having touching polygons share a border in using Geometry.merge_polygons_2d() in godot?
So currently I'm taking the array of polygons I want to have an outline around and putting it in a "for in" loop, then sending it an outline drawer scipt. The cod looks like so:
func _ready()...
0
votes
1
answer
57
views
flutter app crashed when adding multi thousands points to Polygon
I used nominatim OpenStreetMap API to recieve coordinate of london city and try to draw polygon of london city, but cause the number of points is too alot when I use this code
try {
...
0
votes
0
answers
6
views
Javascript- How to check if a cord is inside a polygon [duplicate]
I created a polygon şn google maps which coords are
const osevioServingArea = [
{ lat: 41.0064636, lng: 29.0139668 },
{ lat: 41.0057511, lng: 29.0148251 },
{ lat: 40.8916216, lng: 29....
0
votes
1
answer
49
views
How to draw SVG polygon on openStreetMap programitically in flutter
Hello I want to use this api nominatim.org to find svg shape and latLng coordiante of one address.
I called this api in flutter and try to show it by Polygon in my flutter code in open street map
this ...
0
votes
1
answer
48
views
Filling gaps in multipart polygons without creating overlapping polygons
I would like to fill in the gaps of multipart polygons to create a single extent polygon for each feature.
I have tried to do a 250m buffer on a multipart feature and then do a 250m negative buffer. ...
0
votes
1
answer
22
views
Creating 2D-array/ or grid with ocatgon shape in python
I am trying to create a grid starts for example from
import numpy as np
x= np.linspace(-5,5,1000)
y= np.linspace(-5,5,1000)
X,Y= np.meshgrid(x,y)
...and inside the grid at the center of it I would ...
-1
votes
0
answers
27
views
how to set erc721 smart contract compatible with Trustwallet app
I have just deployed a erc721 smart contract on polygon main net and it's work correctly on opensea, rarible, metamask mobile app but when i try transfer on trust wallet the transaction fail. I have ...
0
votes
0
answers
20
views
Failure using geom_polygon with 2D facet_grid: 1D works
I'm trying to add a state map boundary to a 2D facet_grid in ggplot which plots correlations against principal components (PC).
The 1D case works but I cannot discover what is causing the failure in ...
0
votes
0
answers
32
views
How do I manage the erc20 token bridging finance?
I am planning to develop a token bridge but I am stuck with 2 questions, let me share my concept first. Blockchain is very new for me.
I will deploy the original contract on chain 'A' and the ...
-1
votes
0
answers
13
views
Unable to use ST_Union Spatial function on Redshift
Amazon's Spatial Document suggests that this function is available -https://docs.aws.amazon.com/redshift/latest/dg/ST_Union-function.html
However, when I try to execute the below command it throws an ...
0
votes
0
answers
18
views
HeapmapLayer is behind the data layer using react-google-maps api
I am suppose to display a green area highligting the Saudi Arabia, and heatmap to show the working sites. I am using react-google-maps api to load maps, draw a polygon to hightlight the country, and ...
-2
votes
0
answers
44
views
How to implement polygon to calculate area in Mapbox in java or kotlin in android studio?
I am implementing Drawing polygon in mapbox from mapbox official documentation (https://docs.mapbox.com/android/legacy/maps/examples/finger-draw-query/) but only map appears and nothing happens to map ...
1
vote
0
answers
33
views
how to parsing data from json to draw polygon on google map Android
i'am working with data to draw polygon on google map
i have json data like this
{
"statistic": [
{
"subdistrict": "Cempaka",
"total_crime": 41,...
-1
votes
1
answer
41
views
Sf package: Close a polygon fom complex shape
Almost two weeks that my students and I are trying to find a solution on a trivial problem.
We want to calculate the distance between two GPS points avoiding the coast according to this tutorial: ...
0
votes
0
answers
36
views
unable to find an inherited method for function ‘proj4string’ for signature ‘"sfc_POLYGON"’
I'm facing the task of cropping data to a polygon boundary. Basically the same as in Clipping raster using shapefile in R, but keeping the geometry of the shapefile .
I try it the same as proposed in ...
8
votes
1
answer
198
views
ThreeJS CSG Problem intersecting extruded shapes
I have many views that I'm trying to extrude and then intersect in order to create a final polygon. The problem is that the result is not the expected, it has some floating extra parts. I need to ...
0
votes
0
answers
37
views
Unity collision check with disabled colliders
I have in my scene:
A GameObject (Layer: Default) with a PolygonCollider2D that:
is disabled
is not a trigger
A player (Layer: Player) that has (all enabled)
A PolygonCollider2D
A Rigidbody2D
My ...
0
votes
0
answers
6
views
How to read the file to my polygon shapes
so im trying to save the paint of my polygon shapes and got this constructor error. Are there suppose to be any values in them?
enter image description here
1
vote
1
answer
29
views
Error when attempting to use st_distance_sphere to filter rows in MySQL
I have a table with polygon geometries. I am attempting to filter rows based on proximity to a point.
I am using st_distance_sphere to calculate distance and filters rows: link
For a snapshot of mysql ...
0
votes
1
answer
36
views
How do you find the concavity of all points in a concave polygon?
I have an array of vertices that together form a polygon which can either be a convex or concave polygon. Each vertex obviously has x and y values. Knowing the leftmost vertex (which as I understand ...
0
votes
0
answers
9
views
How to determine if a convex polygon could in theory be covered by another
Hello fellow programmers,
I recently came across a problem I could not find a solution to myself. This request is written in hopes, that anyone can offer me help. A keyword for further research or a ...