Skip to main content

Posts

Showing posts with the label Python

Unsupervised remote land use detection of small Caribbean islands: a non-exhaustive exploration with Google Earth Engine

Remote land use detection is a complex problem, regardless if your approach is a type of supervised or unsupervised classification. The intention of this article is to share my exploration with Google Earth Engine with the aim of educating you in case you are dealing with the same problem and my learnings turn out to be somewhat useful 🙂. For this short exploration, I have limited my scope to the detection of urban and suburban land use, i.e. developed land that is or was in use by humans within the Caribbean geographic region of small islands as defined by the United Nations Department of Economic and Social Affairs . In the below widget you can preview a subset of small Caribbean islands and visualise results of time series detections of accumulating objects (the red dots) from satellite imagery. These red dots represent for the most part manmade objects. Note however that these do not necessarily represent accumulating land usage changes, but mostly represent objects that alre

Algorithm to sort edge list of simple polygon for 2D and 3D

Sometimes it is handy to sort an edge list. In this case I needed an algorithm to test for concavity of a simple 3D polygon with just one face. You can also apply the procedure on 2D because it just sorts an edge list that could contain either 2D or 3D vertices. The polygons were made in Blender v.2.67 , so the script had to be written in Python and executed via the Run Script button in the text editor. I didn't want to use fancy algorithms to sort edges because we're dealing with simple polygons, so I ended up writing my own. As a side note, the edge-angle checkbox in Blender, which can be used to see if a polygon is convex or concave didn't work for me, so I had no other choice but to first sort edges before I can apply angle calculations on consecutive vertices. Suggestions for improvements are welcome and hopefully it helps someone else who had to deal with the same (or similar) issues in Blender!