Reputation
281
Next privilege 300 Rep.
Create new tags
Badges
1 6
Newest
 Yearling
Impact
~11k people reached

  • 0 posts edited
  • 0 helpful flags
  • 14 votes cast
Jan
6
comment Unnecessary and slow conversion between simple polygons and geometric regions
Thanks Sjoerd - tried your suggestion (DiscretizeGraphics @ Graphics @ testpoly) to see what happens. Unfortunately working on all polygons at once is much slower by roughly a factor 20 with respect to Map[]. Looks like I'm stuck unless Wolfram Research can come up with a better solution.
Jan
5
comment Unnecessary and slow conversion between simple polygons and geometric regions
Thanks - just to clarify that I'm after the RegionUnion[] function on it's own. RegionCentroid[] and RegionMeasure[] were shown as examples of region functions which did not require the (slow) conversion from the graphics primitives to region objects.
Jan
5
asked Unnecessary and slow conversion between simple polygons and geometric regions
Dec
16
comment Simple image processing very slow
I think this only addresses two out of the three elements: reading the image and scaling the pixel values. It does not address the retrieval of the pixel positions.
Dec
16
revised Simple image processing very slow
I extended the timing experiment to use the SparseArray[] technique mentioned by Simon Woods and added extra processing to the results of the PixelValuePositions[] to ensure coordinates returned are in the same coordinate system as the other two techniques.
Dec
15
answered Simple image processing very slow
Oct
22
awarded  Yearling
Oct
8
comment Getting the coordinates of GeoDisk[] and similar Mathematica 10 GeoObjects
Brilliant - many thanks. I'm wondering for cases whether the first two geographic objects will always be those related to the background display ? If this is true the object extraction process can be automated and findcoordinates[] will only require one parameter.
Oct
7
awarded  Student
Oct
7
asked Getting the coordinates of GeoDisk[] and similar Mathematica 10 GeoObjects
Sep
24
awarded  Autobiographer
Aug
20
comment How to check if a 2D point is in a polygon?
Worth pointing out too that the "Canada" polygon example assumes implicitly that each vertex defining the polygon can be connected by a straight line. This has to be a good assumption for such a densely sampled contour. However, for large geographical polygons with few points the connecting edges should be modelled as "great circles".
Aug
16
comment How to check if a 2D point is in a polygon?
I don't think we will find a better solution in terms of performance unless perhaps a GPU-solution can be implemented (way above my programming skills in any case). One minor point - you're actually testing 10000 pairs of coordinates (points) not 20000.
Aug
16
comment How to check if a 2D point is in a polygon?
For once Canada is mentioned in another context than exporting cold air down south...(Canadians will know what I mean).
Aug
15
awarded  Supporter
Aug
15
revised How to check if a 2D point is in a polygon?
Tested all point in polygon routines in terms of speed of execution
Aug
15
awarded  Nice Answer
Aug
14
awarded  Editor
Aug
14
comment How to check if a 2D point is in a polygon?
Thanks for the suggestion - have updated the code accordingly with i and j now localised.
Aug
14
revised How to check if a 2D point is in a polygon?
deleted 13 characters in body