Skip to main content

Spatial generators for model mommy. This enables you to generate dummy values for GeoDjango fields.

Project description

Model Mommy Spatial Generators

This package contains spatial generators to be used with model_mommy.

Model Mommy is a Django package that creates random model instances with
predefined data.

This work intends to expand it and allow it to generate GeoDjango spatial

At this moment, there is a generator for point (random), linestring (random)
and polygon (rectangular polygon) field types.

This needs substantial help with packaging and testing.

All new ideas welcome.

# Install

To install this you just need to

pip install -e git+

# Dependencies

* Model Mommy (obviously);

# How to make this work

To integrate this work with model_mommy, you need to create a dict variable
on your called MOMMY_CUSTOM_FIELDS_GEN and concatenate the already
predefined dict we provide (MOMMY_SPATIAL_FIELDS), located in

model_mommy should take of the rest.

from mommy_spatial_generators import MOMMY_SPATIAL_FIELDS


# Special thanks to:

* mdj2, aka Matt Johnson for fixing some things and implementing MultiPolygon support (;
* pchiquet, aka Pierre Chiquet, for fixing some things and implementing support for granulirity in point generation (;

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mommy_spatial_generators, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size mommy_spatial_generators-0.1.2.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page