polygon

different coloured polygon overlays

假装没事ソ 提交于 2019-12-29 07:13:17
问题 is it possible to create different coloured polygons on a map view using the following method? -(MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id )overlay{ say if i had 2 polygons could i set one to red and the other to yellow? 回答1: One way is to use the title property to tell one polygon from another. When adding the polygons, set their title accordingly: pone.title = @"one"; [mapView addOverlay:pone]; pother.title = @"other"; [mapView addOverlay:pother]; Then in

about drawing a Polygon in java

泪湿孤枕 提交于 2019-12-29 01:33:11
问题 hi there i'm trying to improve myself about java2D and first of all i'm dealing with drawing polygons. However, i can not see the polygon on frame. I read some tutorials and examples but as i said i face with problems. here is the sample code of drawing a polygon; import java.awt.Color; import java.awt.Graphics; import java.awt.Polygon; import javax.swing.JFrame; public class jRisk extends JFrame { private JFrame mainMap; private Polygon poly; public jRisk(){ initComponents(); } private void

Get polygons close to a lat,long in MySQL

随声附和 提交于 2019-12-28 04:04:16
问题 Does anyone know of a way to fetch all polygons in a MySQL db within a given distance from a point? The actual distance is not that important since it's calculated for each found polygon later, but it would be a huge optimization to just do that calculation for the polygons that are "close". I've looked at the MBR and contains functions but the problem is that some of the polygons are not contained within a bounding box drawn around the point since they are very big, but some of their

How do i rotate an image inside a drawn polygon

廉价感情. 提交于 2019-12-25 09:36:35
问题 I am a beginner programmer and this is my first app(I am still learning). I have overlaid a polygon onto a map view. I have set its fill color to an image because I'm trying to match an image to a satellite picture. I want to rotate it so that the polygon contents match the map. Is it possible to rotate the image? If not, is there an easier way to overlay an image onto a map view that I could use. Here is my code: -(MKOverlayView*)mapView:(MKMapView *)mapView viewForOverlay:(id )overlay {

polygon with blended edges [closed]

不想你离开。 提交于 2019-12-25 07:59:06
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I'm trying to find the best way to draw polygons in C# with edges that gradually blend into the background color. I'm drawing the polygons to a bitmap, so currently I'm using the Graphics classes from System.Drawing. The polygons will be a blend mask, I have no problem to draw the

Animating a polygon drawn with vertices

我的梦境 提交于 2019-12-25 01:43:23
问题 First off: I had another question Creating a 2D polygon in XNA but I answered it myself after a day of frustrating research and testing. There you can find the code I have right now. So here is my next question, as I can't find anything about it. How do I animate a VertexPositionColor[] . 回答1: To animate a VertexPositionColor[], all you really need to do is modify the elements of the array appropriately and then use the new values in your DrawUserPrimitives() call. For example, in the Update

Connecting a set of points to get a non-self-intersecting non-convex polygon

岁酱吖の 提交于 2019-12-25 01:27:56
问题 I have an unordered set of 2D points which represents the corners of a building. I need to connect them to get the outline of the building. The points were obtained by combining different polygons collected by different individuals. My idea is to use these polygons to get the points in order (e.g. taking the region between the biggest and smallest polygons and connect the points such that it comes in this region). I tried using the minimum distance criteria and also to connect the points

Base coordinate for poly2mask matlab

怎甘沉沦 提交于 2019-12-25 00:12:53
问题 I would like to ask that what's the origin pixel in the image coordinate system used in poly2mask function in MATLAB. It's been asked by others in OpenCV and wonder if it's the same in MATLAB. Let me repeat the person's question: In general there may be two kinds of such systems, for the first (0,0) is defined as the center of the upper left pixel, which means the upper left corner of the upper left pixel is (-0,5, -0.5) and the center of the image is ((cols - 1) / 2, (rows - 1) / 2). The

Many adjacent polygons, want to convert polygons to paths and remove resultant duplicate paths

非 Y 不嫁゛ 提交于 2019-12-24 21:28:34
问题 I have a json file with 80ish adjacent counties, represented as individual polygons. Each county, as expected, shares borders with other counties. I'd like to convert each of those polygons to paths, creating paths symbolizing the borders of every county. At this point, I'd be left with many overlapping or duplicate paths where counties shared borders. I'd like to find a systematic way to delete these overlapping paths so each line representing a border is only displayed once. By doing so, I

How to remove vector tiles tile bounding in Leaflet

人盡茶涼 提交于 2019-12-24 20:14:42
问题 I use leaflet to load vt tiles,which data geom type is polygon.I found that when loading, this will show a line betwwen tiles. So how to remove this bounding line? Maybe this is the issue of Geoserver,Which I used to publish pbf vt. 来源: https://stackoverflow.com/questions/56912496/how-to-remove-vector-tiles-tile-bounding-in-leaflet