agrobot_base/Exemplos/Aspose.GIS-for-.NET-master/Apps/Geo.Layers.InMemory
Diego Note cd05f42449 implementado mapas e camera 2023-12-06 10:04:54 -03:00
..
App.xaml implementado mapas e camera 2023-12-06 10:04:54 -03:00
App.xaml.cs implementado mapas e camera 2023-12-06 10:04:54 -03:00
AssemblyInfo.cs implementado mapas e camera 2023-12-06 10:04:54 -03:00
Geo.Layers.InMemory.csproj implementado mapas e camera 2023-12-06 10:04:54 -03:00
MainWindow.xaml implementado mapas e camera 2023-12-06 10:04:54 -03:00
MainWindow.xaml.cs implementado mapas e camera 2023-12-06 10:04:54 -03:00
ProjectInfo.cs implementado mapas e camera 2023-12-06 10:04:54 -03:00
ProjectPresenter.cs implementado mapas e camera 2023-12-06 10:04:54 -03:00
ReadMe-Ru.md implementado mapas e camera 2023-12-06 10:04:54 -03:00
ReadMe.md implementado mapas e camera 2023-12-06 10:04:54 -03:00

ReadMe.md

InMemory Layer (Format)

The code works with the InMemory format, which means that the data is stored in memory.

The code is using the Aspose.Gis component to work with geographic data in various formats, including the InMemory format. In this code, the InMemory provider is used to create a new vector layer and add features with attributes and geometry to it.

The CreateLayer() method creates an empty vector layer using Drivers.InMemory.CreateLayer(). Then, an attribute named "string_data" of type string is created in this layer.

The AddAndReport(string featureValue) method is used to add a new feature to the layer. The feature is created using _layer.ConstructFeature() and the value of the "string_data" attribute is set from the featureValue parameter. If the featureValue is null, a default value is set. Then, a LineString geometry is created and set for the feature. If an error occurs during the addition, it is displayed in the output string.

The ReadAddReport() method allows reading and printing information about the features and their attributes in the layer. First, the names of all attributes in the layer are printed. Then, for each feature, the attribute values and geometry are printed.

Thus, this code allows writing (adding new features with attributes and geometry) to and reading (displaying information about features and their attributes) from an InMemory layer that is stored in the computer's memory.