You are here

Importing polygons from shapefiles

Given that a lot of individuals working with ecologica; models use spatial data, it would be great to have a means of importing shapefiles with polygon information

Reporter: 
subhro
Created: 
Fri, 03/04/2009 - 17:01
Updated: 
Fri, 12/10/2012 - 11:54

Orphan forum posts can be created

Forum posts that do not belong to a specific forum can be created from

  • the main forum page
  • create content menu

 These posts can then only be found from the Recent forum post list on the front page.

Reporter: 
jonathanm
Created: 
Tue, 31/03/2009 - 07:26
Updated: 
Wed, 22/06/2011 - 22:49

Working with external data : Raw data in scenario file

Normally, the scenario file contains only references to data files, with information as to how the data is to be extracted. However, if you type the data straight into the entry field in the file parameter dialogue, or edit it with the table editor from the table data dialogue, the resulting data no longer corresponds to anything that can be got from a data file, so instead the data is stored directly in the scenario file. This is usually a bad thing, because the XML format used is unwieldy and verbose, and it may take a long time to load or save.

Working with external data : Time series

In the section on time series formats, we saw that the series includes special time points and special values to specify what what values to use away from the actual data points. If you are using one of the mechanisms provided by the table data dialogue to get your data, you do not have the opportunity to include these special points (unless they happen to be in your .csv file, and if they are, they work fine). But you can get the same effect by including them with the tools in the 'other times' panel in the top right corner.

Working with external data : View/edit as table

Once you are in the table data dialogue, you can hit the View/Edit button to bring up a version of the table helper to display your data and, if necessary, edit it. The data need not have come from a file; it might just have been typed into the entry field of the file parameters dialogue. However it will not work if the data has been loaded as raw data from the scenario file.

Working with external data : Data from GeoTIFF or similar

GeoTIFF is a file format which is based on the TIFF image, but which is not actually an image and cannot be displayed in most image viewers. It differs from an image file in that:

Working with external data : Data from image

Simile can extract a 2-dimensional array of data from an image file, with each pixel in the image corresponding to a datapoint. The image can be in any format supported by the Tkimg package, which is to say, most of them.

Working with external data : .csv file with data in grid

If you have a .csv file with a 2-dimensional grid of data items, this can be loaded directly into a 2-dimensional array file parameter in Simile. For other 2-D formats that can be read into a spreadsheet, you can create the .csv file.

Working with external data : Loading and saving scenario files

Once you have specified the data for all the file parameters, you can save that data in a scenario file (extension .spf, sometimes referred to as a parameter metafile). This file does not necessarily contain the actual data, it can contain references to the files that actually contain the data. It is in an XML format, allowing it to be examined and edited if required.

Pages

Subscribe to Simulistics RSS