我知道有很多这方面的问题,但我需要使用JavaScript来做到这一点.我正在使用Dojo 1.8并拥有数组中的所有属性信息,如下所示:
[["name1", "city_name1", ...]["name2", "city_name2", ...]]
Run Code Online (Sandbox Code Playgroud)
知道如何将其导出到CSV客户端吗?
我在设置空间数据库并将其与GeoDjango同步时遇到了麻烦.我能够根据geodjango文档设置空间数据库并创建一个django应用程序,但是当我运行时
python manage.py sqlall world
我明白这个,
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 69, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/commands/sqlall.py", line 4, in <module>
from django.core.management.sql import sql_all
File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/sql.py", line 6, in <module>
from django.db import …Run Code Online (Sandbox Code Playgroud) 我正在尝试执行此代码,
import osgeo.ogr
def findPoints(geometry, results):
for i in range(geometry.GetPointCount()):
x,y,z = geometry.GetPoint(i)
if results['north'] == None or results['north'][1] < y:
results['north'] = (x,y)
if results['south'] == None or results['south'][1] > y:
results['south'] = (x,y)
for i in range(geometry.GetGeometryCount()):
findPoints(geometry.GetGeometryRef(i), results)
shapefile = osgeo.ogr.Open("../../Data/tl_2009_us_state/tl_2009_us_state.shp")
layer = shapefile.GetLayer(0)
feature = layer.GetFeature(53)
geometry = feature.GetGeometryRef()
results = {'north' : None,
'south' : None}
findPoints(geometry, results)
Run Code Online (Sandbox Code Playgroud)
而且我不断收到此错误,
Traceback (most recent call last):
File "identify_northsouth_point.py", line 22, in <module>
findPoints(geometry, results)
File "identify_northsouth_point.py", line …Run Code Online (Sandbox Code Playgroud) django ×2
client-side ×1
csv ×1
dojo-1.8 ×1
export ×1
gdal ×1
geodjango ×1
javascript ×1
postgis ×1
python ×1
ubuntu-11.10 ×1
virtualenv ×1