File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11using NetTopologySuite . Features ;
22using NetTopologySuite . Geometries ;
33using NetTopologySuite . IO ;
4+ using NetTopologySuite . IO . Esri ;
45using Newtonsoft . Json ;
56
67public class ElectorateToLgaMap
78{
89 [ Fact ]
910 public void ElectorateOverlapWithLga ( )
1011 {
11- var factory = new GeometryFactory ( ) ;
12-
13- using var shapeFileDataReader = new ShapefileDataReader ( Path . Combine ( ProjectFiles . ProjectDirectory , @"Lga\LGA_2022_AUST_GDA2020.shp" ) , factory ) ;
12+ using var shapeFileDataReader = Shapefile . OpenRead ( Path . Combine ( ProjectFiles . ProjectDirectory , @"Lga\LGA_2022_AUST_GDA2020.shp" ) ) ;
1413
1514 var electorateToLga = new Dictionary < string , List < string > > ( ) ;
1615 var lgaToElectorate = new Dictionary < string , List < string > > ( ) ;
@@ -42,7 +41,7 @@ public void ElectorateOverlapWithLga()
4241 while ( shapeFileDataReader . Read ( ) )
4342 {
4443 var lgaGeometry = shapeFileDataReader . Geometry ;
45- var lga = shapeFileDataReader . GetString ( 2 ) ;
44+ var lga = ( string ) shapeFileDataReader . Fields [ 1 ] . Value ;
4645
4746 var list = new List < string > ( ) ;
4847 lgaToElectorate . Add ( lga , list ) ;
You can’t perform that action at this time.
0 commit comments