Questions tagged [polygon]

For issues relating to the creation, manipulation and rendering of polygons in graphical user interfaces.

polygon
Filter by
Sorted by
Tagged with
1 vote
0 answers
45 views

matterjs physics not behaving correctly

In my game, I have a scenario where (simple) polygons are created dynamically in parts from vertices. However, I am facing what appears to be a bug with the physics between these Polygons. Take the ...
Calcue's user avatar
  • 11
0 votes
0 answers
30 views

Trouble Creating Dynamic Polygons with JavaScript and CSS

I'm trying to create a polygon shape dynamically using JavaScript and CSS. I have a function that takes coordinates (x, y), radius, number of sides, and color. The function calculates the coordinates ...
Dinesh Basnet's user avatar
0 votes
0 answers
41 views

Is there a convexhull / concavehull function in PyTorch?

I want to create a function for generating polygons for model training. I plan to use this as a regularizer, possibly using the polygon area as a penalty, along with the number of coordinates, etc. I ...
jaychung0302's user avatar
0 votes
1 answer
25 views

Converting Here API WKTShapeType Multipolygon To GeoJSON?

I have access to a data source that looks like: "Shape": { "_type": "WKTShapeType", "Value": "MULTIPOLYGON (((-128.9102 50.82492, -128.90881 50.82422,...
Lloyd Banks's user avatar
  • 35.9k
2 votes
1 answer
105 views

How do I implement a curved trapezoid navbar?

I want to implement this component in my project and I couldn't find too many good approaches to do this. I tried clip path and got a sharp edged trapezoid. I then attempted to make it happen using ...
Shaun Serrao's user avatar
0 votes
0 answers
49 views

I need to detect which Polygon the marker in using flutter_map

I'm using flutter_map and Polygon to draw areas on the map i can detect if the marker in Polygon but I need to know which Polygon the marker in like area name when I start move the marker I'm using ...
Hamada Raouf's user avatar
0 votes
0 answers
17 views

Complex polygon in ArcGIS Pro: Included "kitty-corners" and exclude floating polygons

I am working with a very large dataset, so I want to create automated processes where little to no manual work is required. The photos below are examples of what the datasets look like visually. ...
sci_girl's user avatar
0 votes
0 answers
14 views

Issue with Safe Indexation on Arianee Supernet: Stuck at "Indexation" Stage

Background: This issue is a continuation of the discussion from Issue #124. Problem: I am encountering an issue with the indexation process of Safe on the Arianee Supernet. Despite following the ...
Stefdelec's user avatar
  • 2,752
1 vote
1 answer
52 views

Check if point is in convex polygon

I'm trying to check if point x, y is inside of polygon poly = {x1,y1, x2,y2, x3,y3 ...} But something goes wrong: local function pointInConvexPolygon(x, y, poly) -- poly as {x1,y1, x2,y2, x3,y3, .....
darkfrei's user avatar
  • 405
2 votes
1 answer
107 views

Counting the number of polygons containing origin in 2D

Suppose we have n points in 2D space in convex position. There are precisely choose(n, k) different convex k-gons (non-degenerate). Is there any existing algorithm that runs in O(n log n) time (for a ...
Neremintos's user avatar
0 votes
0 answers
80 views

How to dynamically set gas price for faster transactions on Polygon using ethers.js or viem?

I am working on a project that involves interacting with the Polygon chain using ethers.js. I am facing challenges with slow transaction processing and would like to implement a solution to ...
Rakesh Pradhan's user avatar
0 votes
1 answer
109 views

Check if a line goes through a polygon in any way

I am making a program that find a path between 2 points on an image (soon to be frame of a video). What I have done is that I use Polygon objects to identify obstacles between the path, and with this ...
highjeans 's user avatar
0 votes
1 answer
38 views

Simulating older 3D games per-polygon clipping in Unity?

I'm trying to emulate older 3D games that did per-polygon clipping. Using degenerate triangles, it works except when looking away with the camera. Here's an animated GIF, a sphere with that material ...
Eric Cartman's user avatar
  • 16.2k
0 votes
0 answers
21 views

How to fix ERC20 token approve problem using web3js in polygon mainnet?

There is my own ERC20 token called XFI in several chains - Sepolia, Polygon mumbai and Polygon mainnet. And to transfer XFI to vault contract, user should be approve XFI first by using "Add XFI&...
Daniel Vidal's user avatar
0 votes
1 answer
95 views

Converting Matplotlib's filled contour plot (contourf_plot) to GeoJSON

I am working on a project where I have successfully generated filled contour plots using plt.contourf in Matplotlib in a Google Colab environment. Now, I am attempting to convert these filled contour ...
John Smith's user avatar
  • 1,640
1 vote
1 answer
46 views

How to avoid polygons getting "filled" while using rasterio and geopandas

I have a numpy array that's filled with 0's and 1's. I'm trying to convert the cells filled with 1's into polygons. To do this I'm using rasterio, shapely and geopandas. def flooded_to_shapefile(array,...
stray_dog's user avatar
0 votes
4 answers
334 views

Remove slivers and gaps in polgons (PostGIS, R QGIS)

I have a large polygon dataset, with slivers between almost all polygons. I've tried buffering (and negative buffering) to expand each feature, but this results in both slight overlaps and also ...
threeisles's user avatar
1 vote
0 answers
52 views

Leaflet draw polygon is rendering/drawn wrongly shifting bit away from selected position in Angular 17 with ssr enabled

We are using angular 17 and we have used leaflet and leaflet draw JavaScript plugin to plot the map and want to draw polygons, rectangle over it and get the boundary co-ordinates of the same. But when ...
Yogesh Shankar Naik's user avatar
0 votes
1 answer
49 views

SVG polygon working on desktop but not mobile

I'm overlaying two polygons and distorting using filters, hooked to a "generate" button. Works great on desktop. No SVG shows on mobile (Chrome & Safari). Not sure what the issue is. ...
Ian's user avatar
  • 1
0 votes
1 answer
191 views

how to calculate the bounding box of an arc?

I have an arc with three known points B(Xb,Yb), C(Xc,Yc), and D(Xd,Yd).B and C are the two endpoints of the arc, and D is a random control point on the arc. Now I need to get the minimum bounding box ...
Zpg's user avatar
  • 23
-1 votes
1 answer
91 views

OpenLayers 8.2, displaying a polygon or Geojson from WFS response (GML2)?

How can I render/display Polygon (from clicked WFS GML response)? I tried and tested many ways, including converting it to the Geojson. However, the Geojson has the coordinates in XYZ format, which I ...
ravindraji4's user avatar
1 vote
1 answer
121 views

Find a concave hull of an array of integer points on a grid

I have arrays of thousands of points on an integer grid. I'm looking for a fast way of finding a concave hull for the points. Points are adjacent if they are 1 unit away in any cardinal direction. I ...
Josh Kidd's user avatar
  • 870
0 votes
0 answers
16 views

Is the Convex hull of a simple polygon, and the convex hull of the vertices on a Euclidian plane (that make up the simple polygon), the same set?

This seems pretty intuitive and obvious but I am unable to find explicit evidence. Consider a simple polygon (no holes, no intersecting edges) on a plane. Its convex hull is set A. Consider just the ...
DandiestOwl's user avatar
0 votes
1 answer
66 views

Python World States Plotly Choropleth Map

After longer than I probably should have waited it's time to ask some experts. I am working with the following data set https://gadm.org/data.html. I have downloaded the world polygons as a .gpkg file ...
Risky_Business's user avatar
0 votes
0 answers
32 views

Honeycomb structure or Polygon with react [duplicate]

I'm working on a project, and I have n numbers of array also I've created a polygon with CSS & I'm rendering the array over polygon but the problem is I'm not getting any desirable results. can ...
Kam125's user avatar
  • 11
1 vote
0 answers
46 views

How to show 3d polygon from three-dimensional coordinates array with javascript

I have JSON data like this. I have to show a 3d polygon with js exactly like the example. Can't change anything in the data. Need to fix it functionally. Have more similar data. // 2 features data { ...
Mohsin Uddin Abir's user avatar
0 votes
0 answers
72 views

Fluttermap: Is there any way to make a polygon fill as an image?

I'm new to flutter. I want to make a mobile application where flags of countries will be shown as polygons. That is, the boundaries of the polygons will be the boundaries of countries, and the country ...
ReaLBERG's user avatar
1 vote
0 answers
59 views

Compute Voronoi nodes of a polygon with CGAL

I have a polygon P given as a set of points, and I need to compute the radius of the largest inscribed circle. To do that, I am following the answer given by the user "Plow" here: https://...
cnewbie's user avatar
  • 189
1 vote
1 answer
48 views

Detecting unique Rooms (polygons) for a lista o Walls (lines) in Javascript

I have a script in javascript done to create points (Vertexes) and Walls (lines, connecting those vertexes). My next implementation now requires me to that that array of Walls and find the unique ...
SammuelMiranda's user avatar
1 vote
1 answer
47 views

Feature to polygon does not retain field from polyline

Hello I am new with Arcpy. I have a polyline feature class and I used Feature to polygon for making polygon feature class.It works but it does not retain all fields from the polyline feature class. As ...
ITE's user avatar
  • 11
0 votes
0 answers
20 views

Filling irregular polygon with given number of rectangle

I have an irregular shape polygon in which I want to fit 'n' number of rectangle with known area of all the rectangle. The area of rectangle are not same. The other constraints is that sum of area of ...
NP2P's user avatar
  • 13
0 votes
1 answer
59 views

Problem creating dynamic Alpha Hull for multiple groups

how are you? I would like your help, please, to create alpha polygons in R for different groups. I would like these polygons to be separated by my "species" column. I understand that the ...
Álvaro Scuack's user avatar
1 vote
0 answers
149 views

Personalization of superset deck.gl geojson javavscript data interceptor

I try to reproduce the example provided by superset on deck.gl path in the deck.gl geojson graph but without success. The example works fine after modifying config.py but the colors are not displayed ...
amelie's user avatar
  • 11
2 votes
3 answers
110 views

Extract polygon inside linestrings SQL Server spatial

I have thousands of SQL Server geography linestrings which draw boundaries of counties. Since the don't form polygons, I cannot use a T-SQL query with STContains(@point). How can I extract a polygon ...
Selo FR's user avatar
  • 29
0 votes
0 answers
37 views

How to extract values from a multipolygon that are inside another polygon

I have a shapefile with many (quadratic) polygons with values in them. shape class : SpatVector geometry : polygons dimensions : 3582951, 5 (geometries, attributes) extent : ...
Mike's user avatar
  • 59
0 votes
0 answers
40 views

Issue with merging polygons in R - Heavy Geojson file

I have a pretty heavy geojson file extracted from coral allen atlas. This file is composef of a multitude of polygons with an assign class. I am currently facing an issue while merging polygons of the ...
seb33's user avatar
  • 1
1 vote
1 answer
71 views

Comparing NDVI values inside polygons

I generated three NDVI images from Landsat5 imagery. Now I would like to see if the NDVI values (mean) are different inside three different areas in each image. If you check the image in the link you ...
Fabio Giacomelli's user avatar
0 votes
1 answer
133 views

R filling in a matrix with values from spatial data

I have a matrix in R called “habitat” with latitude as the rownames and longitude as the column names. The cells are filled with NA right now. My end goal is to have the whole matrix filled with ...
E Norton's user avatar
0 votes
0 answers
39 views

Generating a grid of coordinates inside a polygon, each 1km apart

Given a polygon in JSON, I want to obtain a square grid of coordinates inside a polygon, each 1km apart. Here is a function that I've written, it's generating coordinates but in some situations I get ...
Sameh H's user avatar
0 votes
0 answers
12 views

How geolocalisate a new image with a polygon (json file)

l got an sentinel-1 image from Copernicus l downloaded it as TIFF. l did a python code to detect water so now l have a new plot. l would like this plot gets the same coordinate than the image to do so ...
jeremy's user avatar
  • 1
1 vote
1 answer
49 views

Split Single polygon into mulitple polygon geopandas

I have a shapefile I'm converting to a wkt to join with some other data. Unfortunately, some of the polygon field values are too long for excels's string limit (30,000). How do I split a polygon ...
Ponle's user avatar
  • 13
0 votes
1 answer
97 views

Smoothing of a polygon

I was wondering whether anyone could help me with what I was doing wrong in this code? I am very new to coding so simple solutions using the same logical coding would be greatly appreciated. The first ...
Astyanax's user avatar
2 votes
1 answer
101 views

How to check if a point is inside a square using bivrp::is_point_inside

I am trying bivrp::is_point_inside to check if a point is inside a square, but no matter what I try, I always get FALSE, even in the most obvious cases... What am I doing wrong?? My code: polyg=data....
DaniCee's user avatar
  • 2,775
0 votes
1 answer
186 views

Shapely area of self-intersecting polygon

I am trying to calculate area between two curves. One is diagonal straight line and the other is arbitrary curve. The curves intersect so I cannot just take an area under one curve and subtract the ...
Liisjak's user avatar
0 votes
0 answers
79 views

remove slivers, duplicate vertices in FME

Hello I am looking to implement these rules within my data: eliminating: polygons less than 1m2 polygons less than 1m in width duplicate vertices less than 1m apart any help is appreciated. thanks, ...
Curtisd54's user avatar
0 votes
0 answers
83 views

How to curve a custom polygon element with a clip-path property?

I have a problem implementing a button with **CSS **and the concept of this button is like the picture below. I found that the better solution can be **polygon **and clip-path property, but it is true ...
Ali Katiraei's user avatar
0 votes
0 answers
149 views

Problems installing python's library Polygon3 on MacBooks

I have python version 3.11 and a MacBook M2 chip, and I'm having trouble installing Polygon in pycharm. pip install Polygon3 -i https://pypi.tuna.tsinghua.edu.cn/simple There's been an error. ...
唐楚江's user avatar
-1 votes
1 answer
88 views

How to make sure generated random boundingboxes within another boundingbox are not overlapping?

I have a boundingbox a = [233.9259, 16.3902, 356.8651, 426.9131] import shapely.geometry bbox = (233.9259, 16.3902, 356.8651, 426.9131) polygon = shapely.geometry.box(*bbox, ccw=True) polygon....
S.EB's user avatar
  • 2,162
0 votes
0 answers
42 views

Calculate Overlap Area of 2 Polygons in React

I'm working on a tool where users can mark a specific area on an image based on a question and then evaluate if the marked area is correct. The user is prompted to draw a polygon on the image by ...
Milan's user avatar
  • 1
-1 votes
1 answer
48 views

maximal and minimal raster mask using polygons

I have a raster and a polygon, and I want to make two masks: maximal raster: every cell inside the polygon, including all the cells that the polygon boundary touches minimal raster: every cell inside ...
we need a Mat. Stat.'s user avatar