polygon

Android Google Map Polygon click event [duplicate]

六月ゝ 毕业季﹏ 提交于 2019-12-10 21:35:47
问题 This question already has answers here : Polygon Touch detection Google Map API V2 (6 answers) Closed 3 years ago . I am working on a map application on Android and i am using Google Maps Android API V2. I get the polygon data from a web service, convert it by XML parse and can show it on the map without a problem. But isn't there any way to open like pop-up when user touches on any polygon? Or maybe if user wants to change coordinates of selected polygon. I saw many examples, but they are

How to determine whether a polygon is inside other one?

女生的网名这么多〃 提交于 2019-12-10 19:28:08
问题 I have a simple example (SVG source) looks like you can see below. The path with id " rect2816 " described in d attribute: m 140.53571,188.625 0,148.1875 273.9375,0 0,-148.1875 -273.9375,0 z m 132.25,42.03125 c 3.64586,0.0236 7.47296,0.12361 11.5,0.28125 36.65941,1.43507 57.84375,15.88072 57.84375,32.84375 0,7.41614 -1.94981,21.58652 -13.28125,24.09375 -14.58711,3.2276 -40.46224,-5.35276 -53.125,6.625 -26.65285,25.21104 -48.00843,-19.04537 -57.875,-32.84375 -12.16196,-17.00847 0.24962,-31

Polygon difference - strange results from Clipperlib

六月ゝ 毕业季﹏ 提交于 2019-12-10 19:03:29
问题 I am trying to create iso-area polygons ("donuts") from a set of contours. This is the process: Generate the contours. Sort the contours into a tree structure, such that all contours held within a specific contour are children of that contour. For each contour, execute a difference operation with all of its children, using Clipperlib. The resulting polygon(s) and holes constitute the iso-area "donut". These iso-areas can then be rendered as a contour map, or used for other purposes. Note that

Algorithm - How to build a polygon around a polyline

别来无恙 提交于 2019-12-10 18:52:08
问题 I am building a web site using googles Map API. However, as I am on a shared server, I do not have access to a database with spatial extensions. Given an itinerary, which is nothing more than a series of line segments, I need to build a polygon at a given distance. For example 10km either side of the itinerary. This is the classic buffering request, which I have seen as being referenced as the " Minkowski sum " algorithm. After having searched, I have not found a working example of an

How do I clean up self-intersecting polygons in a spatial database?

≯℡__Kan透↙ 提交于 2019-12-10 15:33:53
问题 I have some spatial data (MapInfo files) that contains self-intersecting polygons. These cause problems in my processing, in particular I can't generate geometric unions in PostGIS. Is there an easy way to resolve the issue? I can deal with multi-polygons if that should be necessary. 回答1: I figured it out myself: an st_buffer(wkb_geometry,0) does the trick, at least on my sample data. 来源: https://stackoverflow.com/questions/4846391/how-do-i-clean-up-self-intersecting-polygons-in-a-spatial

Apply hash pattern to polygon in openlayers

依然范特西╮ 提交于 2019-12-10 13:09:57
问题 I am creating a vector layer comprised of polygons from a KML file using Openlayers and I need to apply a "hash" pattern (diagonal striping) to the polygons. I know Openlayers doesn't natively support adding a background image to a polygon in a vector layer but I'm wondering if anyone has any ideas on how to accomplish this? The styling of a vector polygon appears to be limited to solid colors and opacity. If need be I'll extend OpenLayers to add this functionality in by manually drawing the

how to sketch a polygon in a matrix or binary image in order to use image processing functions?

微笑、不失礼 提交于 2019-12-10 12:56:21
问题 I'm developing a matlab program in which I uses polygons(concave or convex). I need to use image processing functions like imdilate or imerode and etc on the polygons. To this end, I should convert my polygons to image. I wonder whether there is a way to sketch a polygon directly in a binary matrix (1's for foreground and 0's for background) ? Currently, I use 'getframe', then 'frame2im 'and then 'im2bw' functions to do so. but its drawback is that I have no control on the size of the final

Find maximum area polygon inscribed in larger polygon

∥☆過路亽.° 提交于 2019-12-10 12:47:49
问题 I would like to find the rotation and location for a polygon that maximizes how large it can be scaled up within the constraints of fitting within a larger polygon. Current idea is to use scipy optimization routines for optimizing position and rotation parameters to maximize the scaling parameter, and shapely to add a constraint that the polygon is contained. This seems like it'll be slow and not particularly elegant. Other ideas? 回答1: This problem sounds like it might be NP-Hard. Given a

save polygon from image to PostGIS database

余生长醉 提交于 2019-12-10 11:43:59
问题 I'm working on a software to detect buildings from satellite imagery. so far I have managed to separate the building with other objects of the image. My problem now is how to save every building in the shape of a polygon into a PostGIS database? Are there libraries available ata function in java and PostGIS? 回答1: Add the image to postgis using the python function raster2pgsql, http://suite.opengeo.org/opengeo-docs/dataadmin/pgGettingStarted/raster2pgsql.html Then, you can use ST

Draw polygon x meters around a point

只谈情不闲聊 提交于 2019-12-10 11:33:25
问题 How can I create a polygon(only a square in my case) around a given point(lat/lang) x meters around the given point. It's just a visual representation of a geofence but I dont need all the calculations whether a point is outside a geofence or not. I tried using the code below but its creating a rectangle instead of a square and I'm not even sure if the 1000 meter boudaries are being rendered correctly. var map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(37