POST
|
Sorry, I'm late. But the problem was that I didn't create the GDB (enable it as "G") before creating the features. So easy... :rolleyes:
... View more
01-23-2014
01:54 PM
|
0
|
0
|
258
|
POST
|
Again, I created the table (feature?) with [PHP]arcpy.CreateFeatureclass_management( out_path, "IMPORT", geometry_type, template, has_m, has_z, spatial_reference, config_keyword, spatial_grid_1, spatial_grid_2, spatial_grid_3) [/PHP] But I'm not sure that it means I created a GDB!? I actually have no rights to use the "Enable Enterprise Geodatabase" tool in ArcCatalog (license doesn't allow). Do I have to use an other Desktop 10.2 edition and use this tool before creating the features?
... View more
12-11-2013
06:17 AM
|
0
|
0
|
258
|
POST
|
registered? EDIT: how I created the table [PHP] arcpy.CreateFeatureclass_management( out_path, "IMPORT", geometry_type, template, has_m, has_z, spatial_reference, config_keyword, spatial_grid_1, spatial_grid_2, spatial_grid_3) [/PHP]
... View more
12-11-2013
03:38 AM
|
0
|
0
|
258
|
POST
|
To be sure, I re-installed the client (x64) and it didn't help. I have no sdedc_SQL_Server.log file Oo? My %TEMP% is %USERPROFILE%\AppData\Local\Temp which is not an existing directory on my file system I'm not trying to use arcpy.ArcSDESQLExecute for this IMPORT table I write a simple example that doesn't work to show you what i'm trying to do [PHP] import os import arcpy from arcpy import env # base path base = r"C:/lpd/Python Scripts" # Database connection string (arcpy.ArcSDESQLExecute) dbName = r"db" db = r'DRIVER={SQL Server};SERVER=DGENV-LPD2.aris-lux.lan\LPD;DATABASE=' + dbName + r';UID=user;PWD=pass' # Target coordinate system targetCoordinateSystem = arcpy.SpatialReference("Projected Coordinate Systems/World/WGS 1984 Web Mercator (auxiliary sphere)") # Path of the ArcSDE connection file (.sde). targetGeoDatabase = os.path.normpath(os.path.join(base, "connections/" + dbName + r".sde")) # Shapefile rows are imported to the "targetFeatureClass" feature class targetFeatureClass = os.path.normpath(os.path.join(targetGeoDatabase, dbName + ".dbo.IMPORT" )) # Workspace env.workspace = targetGeoDatabase targetFeatures = arcpy.InsertCursor(targetFeatureClass) [...] [/PHP] Actually, I'm surprise that the database is not embellished with some table/data by arcsde to manage the "geo" extension stuffs. Is that normal? I thought that the SDE or DBO schema will have these additional tables...
... View more
12-11-2013
02:38 AM
|
0
|
0
|
721
|
POST
|
Thanks to answer. I'm still in dev with a completely new virtual machine (no 10.0 previous install). I can access the DB (using SQL Server Management Studio) and if I drag N' Drop the .sde file I created in ArcCatalog 10.2 as a database connection, I see that it works and the "Shape" field (that have a "geometry" type) is well detected. For now, I just test my python script as a unit test but same problem has occur when I tried to "share as -> geoprocessing service". Note that before this problematic statement I successfully use a [PHP]arcpy.ArcSDESQLExecute("db.sde")[/PHP] to make insert in other table(s) that have no geometry field(s). I think (but don't know why) it's a problem about the geometry fields 😕
... View more
12-10-2013
03:48 AM
|
0
|
0
|
721
|
POST
|
I installed Desktop and Server on the same machine 'cause I'm in dev. but both are at 10.2 version. The goal was to use the existing code (dev. for 10.0). It doesn't work but I try to migrate.. Any idea? May be I can try to hide desktop10.2.pth from python classpath..
... View more
12-09-2013
09:10 PM
|
0
|
0
|
721
|
POST
|
Well, python was installed at Arcgis installation time. C:\Python27\ArcGISx6410.2\Lib\site-packages contains the server10.2.pth file C:\Program Files\ArcGIS\Server\bin C:\Program Files\ArcGIS\Server\arcpy C:\Program Files\ArcGIS\Server\ArcToolbox\Scripts path_to_my_python_scripts C:\Python27\ArcGIS10.2\Lib\site-packages contains desktop10.2.pth C:\Program Files (x86)\ArcGIS\Desktop10.2\bin C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy C:\Program Files (x86)\ArcGIS\Desktop10.2\ArcToolbox\Scripts EDIT-- First post edited 😉
... View more
12-09-2013
08:07 AM
|
0
|
0
|
721
|
POST
|
Hi, I try to do a [PHP]arcpy.InsertCursor("db.sde/db.dbo.IMPORT")[/PHP] but I have this exception: [PHP] ERROR 999999: Error executing function.\nNo support for this geometry type.')[/PHP] [PHP] targetFeatures = arcpy.InsertCursor("db.sde/db.dbo.IMPORT") File "C:\Program Files\ArcGIS\Server\arcpy\arcpy\__init__.py", line 1214, in InsertCursor return gp.insertCursor(dataset, spatial_reference) File "C:\Program Files\ArcGIS\Server\arcpy\arcpy\geoprocessing\_base.py", line 369, in insertCursor self._gp.InsertCursor(*gp_fixargs(args, True))) [/PHP] My gdb is an SQL Server I created by myself then I use arcpy to create the used .sde and the IMPORT table. This table has a "Shape" field with polygon geometry type. What this exception means? I'm using the 10.2 version and it worked with 10.0...
... View more
12-09-2013
07:08 AM
|
0
|
14
|
4314
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|