Merge branch 'Elena/import' into develop
commit
32fd195c94
|
|
@ -110,6 +110,18 @@ namespace OliviaAddInPro.Helper
|
|||
return geomsal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Devuelve el sistema de coordenadas de una capa
|
||||
*/
|
||||
public static int GetCoorSys(string ftclasspath)
|
||||
{
|
||||
FeatureClass fc = GetFtClass(ftclasspath);
|
||||
if (fc == null)
|
||||
return -1;
|
||||
ArcGIS.Core.Geometry.SpatialReference spatref = fc.GetDefinition().GetSpatialReference();
|
||||
return spatref.Wkid;
|
||||
}
|
||||
|
||||
//Dado el tipo de FtClass y una posición inicial abre un diálogo de búsqueda de ftclass
|
||||
//si se cancela o no es una feature class lo que se ha abierto devuelve null
|
||||
//si no, devuelve la featureclass directamente abierta
|
||||
|
|
|
|||
|
|
@ -68,9 +68,19 @@ namespace OliviaAddInPro.Services
|
|||
ErrStr = "No se ha podido generar geometría de los ámbitos" + com.ConsultaAmbs + ErrStr;
|
||||
return false;
|
||||
}
|
||||
//crea el filtro de exportación
|
||||
|
||||
//mira spatialreference de los datos de entrada
|
||||
spatRef = geom_export.SpatialReference;
|
||||
//AQUÍ COMPARAR SI ES IGUAL QUE SPATREFDEF Y SI NO, REPROYECTAR
|
||||
if(spatRef.Wkid!=GeneralDef.SpatRefDef)
|
||||
{
|
||||
/*
|
||||
* FALTA HACER
|
||||
* dame_geom_coords en v2010
|
||||
*/
|
||||
}
|
||||
|
||||
//crea el filtro de exportación
|
||||
filtroEspacial = HelperGdb.CreateFiler(com.ConsultaAmbs, geom_export);
|
||||
if (filtroEspacial == null)
|
||||
{
|
||||
|
|
@ -191,6 +201,20 @@ namespace OliviaAddInPro.Services
|
|||
}
|
||||
}
|
||||
|
||||
//mira spatialreference del nw
|
||||
FeatureClass fc = HelperGdb.GetFtClass(OliviaGlob.Paths.PathGdbNw);
|
||||
if (fc != null)
|
||||
{
|
||||
spatRef = fc.GetDefinition().GetSpatialReference();
|
||||
//AQUÍ COMPARAR SI ES IGUAL QUE SPATREFDEF Y SI NO, REPROYECTAR
|
||||
if (spatRef.Wkid != GeneralDef.SpatRefDef)
|
||||
{
|
||||
/*
|
||||
* FALTA HACER
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
//Hace el filtro con la geometría final
|
||||
filtroEspacial = HelperGdb.CreateFiler(String.Empty, geom_export);
|
||||
if (filtroEspacial == null)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<ComboBox Margin="10,5,9.6,0"
|
||||
ItemsSource="{Binding Path=Fields}" Name="comboBoxFields" SelectedItem="{Binding Path=SelField, Mode = TwoWay}" SelectedIndex="{Binding Path=SelIndx, Mode = TwoWay}" SelectionChanged="comboBoxFields_SelectionChanged"/>
|
||||
<Label Margin="15,0,0,0" Content="Atributo"/>
|
||||
<ListBox Margin="10,5,9.6,0" Height="127" ItemsSource="{Binding Path=Attributes}" Name="listBoxAttributes" SelectionMode="{Binding SelMode}"/>
|
||||
<ListBox Margin="10,5,9.6,0" Height="127" ItemsSource="{Binding Path=Attributes}" Name="listBoxAttributes" SelectionMode="{Binding SelMode}" MouseDoubleClick="listBoxAttributes_MouseDoubleClick"/>
|
||||
<Button Margin="167,25,9.6,0" Content="Aceptar" Opacity="0.75" Click="Button_Click"/>
|
||||
</StackPanel>
|
||||
</controls:ProWindow>
|
||||
|
|
@ -77,5 +77,11 @@ namespace OliviaAddInPro.View
|
|||
else
|
||||
DialogResult = false;
|
||||
}
|
||||
|
||||
private void listBoxAttributes_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
ok = true;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue