Skip to content

Instantly share code, notes, and snippets.

View ianturton's full-sized avatar
🏠
Working from home

Ian Turton ianturton

🏠
Working from home
View GitHub Profile
@ianturton
ianturton / NullIslands.java
Created November 19, 2020 11:43
Simple GeoTools code to generate the Null Island archipelago
package com.ianturton.cookbook.projections;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.apache.commons.cli.CommandLine;
@ianturton
ianturton / GenerateRandomData.java
Created July 20, 2016 12:11
A simple class to create random test data with GeoTools
package com.ianturton.cookbook.utilities;
import java.util.ArrayList;
import org.geotools.feature.simple.SimpleFeatureBuilder;
import org.opengis.feature.simple.SimpleFeature;
import org.opengis.feature.simple.SimpleFeatureType;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.GeometryFactory;
@ianturton
ianturton / Buffer
Last active January 30, 2021 16:38
Buffer a GeoTools Linestring, this code creates a new polygon at a specified distance around the provided line.
package com.ianturton.cookbook.operations;
import java.util.List;
import javax.measure.Measure;
import javax.measure.quantity.Length;
import javax.measure.unit.SI;
import org.geotools.data.DataUtilities;
import org.geotools.feature.SchemaException;
@ianturton
ianturton / BufferPoint.java
Created February 17, 2021 11:47
Find polygons with in a set distance of a point
package com.ianturton.cookbook.operations;
import java.awt.geom.Point2D;
import java.util.List;
import javax.measure.Quantity;
import javax.measure.Unit;
import javax.measure.UnitConverter;
import javax.measure.quantity.Length;
@ianturton
ianturton / CellTower.java
Last active October 27, 2021 11:23
GeoTools program to calculate a wedge shaped polygon 10 degrees wide given a lat,lon radius and azimuth.
package spike;
import java.awt.geom.Point2D;
import java.util.ArrayList;
import org.geotools.referencing.GeodeticCalculator;
import org.geotools.referencing.crs.DefaultGeographicCRS;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.GeometryFactory;
@ianturton
ianturton / torchgeo_object_detection_example.ipynb
Created March 8, 2024 16:26 — forked from calebrob6/torchgeo_object_detection_example.ipynb
Short example of object detection training in TorchGeo.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.