Econtrado fallo falta reproyectar datos
parent
00182b5260
commit
835fbf3f96
|
|
@ -110,6 +110,18 @@ namespace OliviaAddInPro.Helper
|
||||||
return geomsal;
|
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
|
//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 se cancela o no es una feature class lo que se ha abierto devuelve null
|
||||||
//si no, devuelve la featureclass directamente abierta
|
//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;
|
ErrStr = "No se ha podido generar geometría de los ámbitos" + com.ConsultaAmbs + ErrStr;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//crea el filtro de exportación
|
|
||||||
//mira spatialreference de los datos de entrada
|
//mira spatialreference de los datos de entrada
|
||||||
spatRef = geom_export.SpatialReference;
|
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);
|
filtroEspacial = HelperGdb.CreateFiler(com.ConsultaAmbs, geom_export);
|
||||||
if (filtroEspacial == null)
|
if (filtroEspacial == null)
|
||||||
{
|
{
|
||||||
|
|
@ -190,7 +200,21 @@ 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
|
//Hace el filtro con la geometría final
|
||||||
filtroEspacial = HelperGdb.CreateFiler(String.Empty, geom_export);
|
filtroEspacial = HelperGdb.CreateFiler(String.Empty, geom_export);
|
||||||
if (filtroEspacial == null)
|
if (filtroEspacial == null)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<ComboBox Margin="10,5,9.6,0"
|
<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"/>
|
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"/>
|
<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"/>
|
<Button Margin="167,25,9.6,0" Content="Aceptar" Opacity="0.75" Click="Button_Click"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</controls:ProWindow>
|
</controls:ProWindow>
|
||||||
|
|
@ -77,5 +77,11 @@ namespace OliviaAddInPro.View
|
||||||
else
|
else
|
||||||
DialogResult = false;
|
DialogResult = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void listBoxAttributes_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
ok = true;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue