Created
January 14, 2014 13:10
-
-
Save george-silva/8418061 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GeradorMemorialDescritivo | |
{ | |
public GeradorMemorialDescritivo() | |
{} | |
public IMemorialDescritivo GerarMemorial(IFeature feature) | |
{ | |
var geometria = feature.ShapeCopy as IPointCollection; | |
var lista = new List<IAzimuteDistancia>(); | |
for | |
{ | |
// processar | |
// var az = resultado calculadora | |
// var d = resultado calculadora | |
// var do ponto | |
// var ao ponto | |
var azimuteDistancia = new azimuteDistancia(az, d, doPonto, aoPonto); | |
lista.Add(azimuteDistancia); | |
} | |
return new MemorialDescritivo(lista); | |
} | |
public Dict<string, IMemorialDescritivo> GerarMemoriais(IFeatureCursor cursor) | |
{ | |
var feature = cursor.NextFeature(); | |
var dictMemoriais = new Dict<string, IMemorialDescritivo>(); | |
while (feature != null) | |
{ | |
var id = feature.OID; | |
var memorial = this.GerarMemorial(feature); | |
listaMemoriais.Add(id, memorial); | |
feature = cursor.NextFeature(); | |
} | |
return dictMemoriais; | |
} | |
public Dict<string, IMemorialDescritivo> GerarMemoriais(IFeatureClass klass) | |
{ | |
var cursor = klass.Search(null, false); | |
return this.GerarMemoriais(cursor); | |
} | |
} | |
public interface IMemorialDescritivo | |
{ | |
List<IAzimuteDistancia> AzimuteDistancias; | |
} | |
public class MemorialDescritivo:IMemorialDescritivo | |
{ | |
public MemorialDescritivo(List<IAzimuteDistancia> AzimuteDistancias) | |
{ | |
this._azimuteDistancias = AzimuteDistancias; | |
} | |
} | |
public interface IAzimuteDistancia | |
{ | |
IPoint DoPonto; // de | |
IPoint AoPonto; // para | |
double Azimute; | |
double Distancia; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment