Opened 13 years ago
Last modified 5 years ago
#4240 closed defect
SE_TOO_FEW_POINTS error on ogr SDE driver — at Version 1
Reported by: | phooncloudy | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | SDE |
Cc: |
Description (last modified by )
This happens inserting a shape file to SDE.
The spatial reference of shape file is :
GEOGCS["GCS_Krasovsky_1940",DATUM["D_Krasovsky_1940",SPHEROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
The error is:
The error code is: -148/ The number of points is less than required for feature.
I have tested, because some default value of below spatial reference has some problem.
/* ---------------------------------------------------------------------*/ /* Set the XYTolerance of SDE coordref object /* ---------------------------------------------------------------------*/ const char *pszXYTolerance; pszXYTolerance = CSLFetchNameValue(papszOptions,"SDE_XYTOLERANCE"); if(NULL == pszXYTolerance) pszXYTolerance = "0.000001"; nSDEErr= SgCoordRefSetXYClusterTol(hCoordRef,atof(pszXYTolerance)); if(SE_SUCCESS != nSDEErr) { IssueSDEError( nSDEErr,"SE_layerinfo_create"); return NULL; } const char* pszMinx; const char* pszMiny; const char* pszResolution; pszMinx = CSLFetchNameValue(papszOptions,"SDE_XMIN"); if(NULL == pszMinx) pszMinx = "-400"; pszMiny = CSLFetchNameValue(papszOptions,"SDE_YMIN"); if(NULL == pszMiny) pszMiny = "-400"; pszResolution = CSLFetchNameValue(papszOptions,"SDE_RESOLUTION"); if(NULL == pszResolution) pszResolution = "1000000000"; nSDEErr = SE_coordref_set_xy(hCoordRef,atof(pszMinx),atof(pszMiny),atof(pszResolution)); if(SE_SUCCESS != nSDEErr) { IssueSDEError( nSDEErr,"SE_layerinfo_create"); return NULL; }
Change History (1)
comment:1 by , 12 years ago
Description: | modified (diff) |
---|---|
Keywords: | SDE added |
Milestone: | 1.8.2 |
Note:
See TracTickets
for help on using tickets.
removed milestone.