Coder Social home page Coder Social logo

planetfederal / django-osgeo-importer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from geonode/django-osgeo-importer

2.0 2.0 1.0 1.6 MB

Do not use this repo, use https://github.com/GeoNode/django-osgeo-importer

License: GNU General Public License v3.0

Python 73.09% CSS 1.12% JavaScript 10.10% HTML 11.94% Shell 2.42% Makefile 0.41% Dockerfile 0.91%

django-osgeo-importer's People

Contributors

bitner avatar garnertb avatar ingenieroariel avatar jivanamara avatar jj0hns0n avatar jwileczek avatar sarasafavi avatar srnetochan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

sarasafavi

django-osgeo-importer's Issues

When one file is a .zip containing a copy of another file in the same upload batch, Importer fails

Given the following files:

foo.zip: contains a copy of bar.zip
bar.zip: contains baz.tif, etc

The following traceback occurs:

IOError at /uploads/new
[Errno 2] No such file or directory: u'/tmp/tmpeh7O5t/bar.zip'
Request Method: POST
Request URL:    http://exchange/uploads/new
Django Version: 1.8.15
Exception Type: IOError
Exception Value:    
[Errno 2] No such file or directory: u'/tmp/tmpeh7O5t/bar.zip'
Exception Location: /usr/local/lib/python2.7/shutil.py in copyfile, line 82
Python Executable:  /env/bin/python
Python Version: 2.7.11
Python Path:    
['/mnt/exchange',
 '/env/lib/python27.zip',
 '/env/lib/python2.7',
 '/env/lib/python2.7/plat-linux2',
 '/env/lib/python2.7/lib-tk',
 '/env/lib/python2.7/lib-old',
 '/env/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7',
 '/usr/local/lib/python2.7/plat-linux2',
 '/usr/local/lib/python2.7/lib-tk',
 '/env/lib/python2.7/site-packages',
 '/mnt/geonode',
 '/mnt/importer',
 '/mnt/exchange',
 '/mnt/exchange',
 '/mnt/exchange']
Server time:    Mon, 26 Sep 2016 17:18:35 -0500
Environment:


Request Method: POST
Request URL: http://exchange/uploads/new

Django Version: 1.8.15
Python Version: 2.7.11
Installed Applications:
('djmp',
 'hypermap.aggregator',
 'hypermap.dynasty',
 'hypermap.search',
 'hypermap',
 'appearance',
 'flat',
 'exchange.core',
 'geonode',
 'geonode.contrib.geogig',
 'geonode.contrib.slack',
 'django_classification_banner',
 'maploom',
 'solo',
 'haystack',
 'corsheaders',
 'osgeo_importer',
 'modeltranslation',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.sitemaps',
 'django.contrib.staticfiles',
 'django.contrib.messages',
 'django.contrib.humanize',
 'django.contrib.gis',
 'pagination',
 'taggit',
 'treebeard',
 'friendlytagloader',
 'geoexplorer',
 'leaflet',
 'django_extensions',
 'autocomplete_light',
 'mptt',
 'djcelery',
 'storages',
 'pinax_theme_bootstrap_account',
 'pinax_theme_bootstrap',
 'django_forms_bootstrap',
 'account',
 'avatar',
 'dialogos',
 'agon_ratings',
 'announcements',
 'actstream',
 'user_messages',
 'tastypie',
 'polymorphic',
 'guardian',
 'geonode.people',
 'geonode.base',
 'geonode.layers',
 'geonode.maps',
 'geonode.proxy',
 'geonode.security',
 'geonode.social',
 'geonode.catalogue',
 'geonode.documents',
 'geonode.api',
 'geonode.groups',
 'geonode.services',
 'geonode.geoserver',
 'geonode.upload',
 'geonode.tasks')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'pagination.middleware.PaginationMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'geonode.security.middleware.LoginRequiredMiddleware',
 'geonode.security.middleware.LoginRequiredMiddleware',
 'corsheaders.middleware.CorsMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware')


Traceback:
File "/env/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/env/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  22.                 return view_func(request, *args, **kwargs)
File "/env/lib/python2.7/site-packages/django/views/generic/base.py" in view
  71.             return self.dispatch(request, *args, **kwargs)
File "/env/lib/python2.7/site-packages/django/views/generic/base.py" in dispatch
  89.         return handler(request, *args, **kwargs)
File "/env/lib/python2.7/site-packages/django/views/generic/edit.py" in post
  215.             return self.form_valid(form)
File "/mnt/importer/osgeo_importer/views.py" in form_valid
  177.             shutil.move(each.name, tofile)
File "/usr/local/lib/python2.7/shutil.py" in move
  302.             copy2(src, real_dst)
File "/usr/local/lib/python2.7/shutil.py" in copy2
  130.     copyfile(src, dst)
File "/usr/local/lib/python2.7/shutil.py" in copyfile
  82.     with open(src, 'rb') as fsrc:

Exception Type: IOError at /uploads/new
Exception Value: [Errno 2] No such file or directory: u'/tmp/tmpeh7O5t/bar.zip'

Geopackage Support

We should update this to reflect the status of what we need to do in order to ensure that this supports geopackage uploads in whatever way is proper

Travis CI build is failing due to PostGIS versioning issue

To summarize things we are finding: this seems to relate to the CREATE EXTENSION being used to enable PostGIS; the error message clearly suggesting that it is now looking for PostGIS 2.3 instead of 2.2 or 2.1. The very recent release of PostGIS 2.3 (Sept 26) and the use of an unpinned apt-get install of package "postgis" suggests a cause. Maybe postgis was updated in pgdg or something, and importer's install.sh scaffolding to avoid using it is now broken.

Our idea about why it is still working locally in Vagrant is that we provisioned before the postgis upgrade.

Expand raster filetype support

  • Add gpkg (#11), also jp2, tiff, nitf to the whitelist
  • Map alternate extensions through a dict: {"tif": "tiff", "ntf": "nitf"}
  • Ensure tests exercise each of the formats in the whitelist

Research feasibility and possibly implement upload of documents as part of batches

This may be a bit of a pipe dream.

Users doing uploads shouldn't be expected to make any hard distinction between e.g. shapefiles and tiffs - same thing with documents (in the geonode sense of the word). Might need a little config to say where they go or recognize any spatial attributes (e..g latlon associated with whole doc).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.