This repository provides a web-based generator for spatial data based on the award-winning Spatial Data Generator, which was presented in 1st ACM SIGSPATIAL International Workshop on Spatial Gems (SpatialGems 2019, https://www.spatialgems.net/). The paper received the best paper award on that year. This web demo is based on a Python implementation. SpiderWeb is publicly accessible at [https://spider.cs.ucr.edu]. This demo was published in ACM SIGSPATIAL 2020. If you use Spider, please cite our paper below.
Puloma Katiyar, Tin Vu, Ahmed Eldawy, Sara Migliorini, and Alberto Belussi. 2020. SpiderWeb: A Spatial Data Generator on the Web. In Proceedings of the 28th International Conference on Advances in Geographic Information Systems (SIGSPATIAL '20). Association for Computing Machinery, New York, NY, USA, 465โ468. DOI: [https://doi.org/10.1145/3397536.3422351]
Check our YouTube video on how to use SpiderWeb. You can directly download the generated data from SpiderWeb or you can get a command line that generates the data using the enclosed Python implementation.
There are six kinds of supported distribution. Please feel free to contact us if you want to have other spatial distributions.
Here are some links to some sample data.
- 1000 random rectangles in the world space
- 1M random points around Los Angeles area
- Reversely correlated points (x = -y)
Spider is deployed as a web application at [https://spider.cs.ucr.edu] where you can visualize and download the datasets.
Make sure that Python3 is installed. Download the generator.py file and run it using the following command.
python3 generator.py <distribution> <cardinality> <dimensions> [geometry] [parameters]
The parameters are generally specified as a set of key=value
pairs. The possible keys and their usage is described below.
- distribution: {uniform, diagonal, gaussian, parcel, bit, sierpinski}
- cardinality: Number of geometries to generate
- dimensions: Number of dimensions in generated geometries
- geometry: {point, box}. If geometry type is
box
and the distribution is NOTparcel
, you have to specify the maxsize property - maxsize: maximum size along each dimension (before transformation), e.g., 0.2,0.2 (no spaces)
- percentage: (for diagonal distribution) the percentage of records that are perfectly on the diagonal
- buffer: (for diagonal distribution) the buffer around the diagonal that additional points can be in
- srange: (for parcel distribution) the split range [0.0, 1.0]
- dither: (for parcel distribution) the amound of noise added to each record as a perctange of its initial size [0.0, 1.0]
- affinematrix: (optional) values of the affine matrix separated by comma. Number of expected values is d*(d+1) where d is the number of dimensions
- compress: (optional) { bz2 }
- format: output format { csv, wkt, geojson } [affine matrix] (Optional) Affine matrix parameters to apply to all generated geometries
- Python3
- Java Runtime Environment (JRE)
- Install Apache Tomcat. Assume it is installed to
$CATALINA_HOME
- Enable CGI scripting. Edit
$CATALINA_HOME/conf/web.xml
. Uncomment the following sections and modify the configuration as shown:
<servlet-mapping>
<servlet-name>cgi</servlet-name>
<url-pattern>/spider/cgi/*</url-pattern>
</servlet-mapping>
...
<servlet>
<servlet-name>cgi</servlet-name>
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
<init-param>
<param-name>cgiPathPrefix</param-name>
<param-value>WEB-INF/cgi</param-value>
</init-param>
<load-on-startup>5</load-on-startup>
</servlet>
- Edit
$CATALINA_HOME/conf/context.xml
and addprivileged="true"
at the<Context>
element so that it looks as follows.
<Context privileged="true">
...
</Context>
- Copy the
html
directory from the source code to$CATALINA_HOME/webapps/ROOT/spider
. You can do that by running the following command at the source rootrsync -av html/ $CATALINA_HOME/webapps/ROOT/spider
- Copy the
html/cgi/generator.py
file to$CATALINA_HOME/webapps/ROOT/WEB-INF/cgi/generator.py
. You can do that by running the commandrsync -av html/cgi/ $CATALINA_HOME/webapps/ROOT/WEB-INF/cgi
- Restart Tomcat server.
- Open your browser and navigate to [http://localhost:8080/spider/]