Select to view content in your preferred language

"Generate" operation is distorting features

268
0
10-09-2024 10:27 PM
Labels (1)
DavidHorsey
Occasional Contributor

I've created a single shape (wkid: 102100) with 4 verticies in a shapefile.

DavidHorsey_0-1728537071608.png

 

When I run that shapefile through an analyze operation on my local Portal machine, I get the following response:

 

{
    "publishParameters": {
        "type": "shape",
        "name": "cadastre_wgs84wm_digitised",
        "sourceUrl": "",
        "maxRecordCount": -1,
        "targetSR": {
            "wkid": 102100,
            "latestWkid": 3857
        },
        "editorTrackingInfo": {
            "enableEditorTracking": false,
            "enableOwnershipAccessControl": false,
            "allowOthersToUpdate": true,
            "allowOthersToDelete": false
        },
        "layerInfo": {
            "currentVersion": 11.1,
            "id": 0,
            "name": "cadastre_wgs84wm_digitised",
            "type": "Feature Layer",
            "displayField": "",
            "description": "",
            "copyrightText": "",
            "defaultVisibility": true,
            "editFieldsInfo": null,
            "relationships": [],
            "isDataVersioned": false,
            "supportsRollbackOnFailureParameter": true,
            "supportsAdvancedQueries": true,
            "supportsValidateSQL": true,
            "supportsCalculate": true,
            "advancedQueryCapabilities": {
                "supportsReturningQueryExtent": true,
                "supportsStatistics": true,
                "supportsDistinct": true,
                "supportsPagination": true,
                "supportsOrderBy": true,
                "supportsQueryWithDistance": true
            },
            "geometryType": "esriGeometryPolygon",
            "drawingInfo": {
                "renderer": {
                    "type": "simple",
                    "symbol": {
                        "type": "esriSFS",
                        "style": "esriSFSSolid",
                        "color": [
                            202,
                            252,
                            208,
                            255
                        ],
                        "outline": {
                            "type": "esriSLS",
                            "style": "esriSLSSolid",
                            "color": [
                                110,
                                110,
                                110,
                                255
                            ],
                            "width": 0.4
                        }
                    },
                    "label": "",
                    "description": ""
                }
            },
            "hasM": false,
            "hasZ": false,
            "allowGeometryUpdates": true,
            "hasAttachments": false,
            "htmlPopupType": "esriServerHTMLPopupTypeNone",
            "supportsApplyEditsWithGlobalIds": true,
            "objectIdField": "FID",
            "globalIdField": "",
            "typeIdField": "",
            "fields": [
                {
                    "name": "FID",
                    "type": "esriFieldTypeOID",
                    "alias": "FID"
                },
                {
                    "name": "Id",
                    "type": "esriFieldTypeInteger",
                    "alias": "Id"
                }
            ],
            "types": [],
            "templates": [
                {
                    "name": "New Feature",
                    "description": "",
                    "drawingTool": "esriFeatureEditToolPolygon",
                    "prototype": {
                        "attributes": {
                            "Id": null
                        }
                    }
                }
            ],
            "useStandardizedQueries": true,
            "enableZDefaults": false,
            "zDefault": 0,
            "supportedQueryFormats": "JSON",
            "hasStaticData": false,
            "maxRecordCount": -1,
            "capabilities": "Create,Delete,Query,Update,Editing",
            "supportsCoordinatesQuantization": false,
            "supportsAttachmentsByUploadId": true,
            "minScale": 0,
            "maxScale": 0,
            "extent": {
                "xmin": 12895760.54079283,
                "ymin": -3755035.285140656,
                "xmax": 12895774.872848857,
                "ymax": -3754980.687832646,
                "spatialReference": {
                    "wkid": 102100,
                    "latestWkid": 3857
                }
            }
        }
    },
    "records": [
        {
            "attributes": {
                "FID": 0,
                "Id": 0
            }
        }
    ],
    "fileSize": 3018
}

 

I subsequently run the same shapefile through a generate operation, with the publishedParameters from the response to the analyze operation. That gives the following output:

 

{
    "featureCollection": {
        "layers": [
            {
                "layerDefinition": {
                    "currentVersion": 11.1,
                    "id": 0,
                    "name": "cadastre_wgs84wm_digitised",
                    "displayField": "",
                    "description": "",
                    "copyrightText": "",
                    "defaultVisibility": true,
                    "editFieldsInfo": null,
                    "relationships": [],
                    "isDataVersioned": false,
                    "supportsRollbackOnFailureParameter": true,
                    "supportsAdvancedQueries": true,
                    "supportsValidateSQL": true,
                    "supportsCalculate": true,
                    "advancedQueryCapabilities": {
                        "supportsReturningQueryExtent": true,
                        "supportsStatistics": true,
                        "supportsDistinct": true,
                        "supportsPagination": true,
                        "supportsOrderBy": true,
                        "supportsQueryWithDistance": true
                    },
                    "geometryType": "esriGeometryPolygon",
                    "drawingInfo": {
                        "renderer": {
                            "type": "simple",
                            "symbol": {
                                "type": "esriSFS",
                                "style": "esriSFSSolid",
                                "color": [
                                    206,
                                    210,
                                    242,
                                    255
                                ],
                                "outline": {
                                    "type": "esriSLS",
                                    "style": "esriSLSSolid",
                                    "color": [
                                        110,
                                        110,
                                        110,
                                        255
                                    ],
                                    "width": 0.4
                                }
                            },
                            "label": "",
                            "description": ""
                        }
                    },
                    "hasM": false,
                    "hasZ": false,
                    "allowGeometryUpdates": true,
                    "hasAttachments": false,
                    "htmlPopupType": "esriServerHTMLPopupTypeNone",
                    "supportsApplyEditsWithGlobalIds": true,
                    "globalIdField": "",
                    "typeIdField": "",
                    "types": [],
                    "templates": [
                        {
                            "name": "New Feature",
                            "description": "",
                            "drawingTool": "esriFeatureEditToolPolygon",
                            "prototype": {
                                "attributes": {
                                    "Id": null
                                }
                            }
                        }
                    ],
                    "useStandardizedQueries": true,
                    "enableZDefaults": false,
                    "zDefault": 0,
                    "supportedQueryFormats": "JSON",
                    "hasStaticData": false,
                    "maxRecordCount": -1,
                    "capabilities": "Create,Delete,Query,Update,Editing",
                    "supportsCoordinatesQuantization": false,
                    "supportsAttachmentsByUploadId": true,
                    "fields": [
                        {
                            "name": "FID",
                            "type": "esriFieldTypeOID",
                            "alias": "FID"
                        },
                        {
                            "name": "Id",
                            "type": "esriFieldTypeInteger",
                            "alias": "Id"
                        }
                    ],
                    "objectIdField": "FID",
                    "minScale": 0,
                    "maxScale": 0,
                    "extent": {
                        "xmin": 12895760.54079283,
                        "ymin": -3755035.285140656,
                        "xmax": 12895774.872848857,
                        "ymax": -3754980.687832646,
                        "spatialReference": {
                            "wkid": 102100,
                            "latestWkid": 3857
                        }
                    },
                    "type": "Feature Layer"
                },
                "featureSet": {
                    "geometryType": "esriGeometryPolygon",
                    "spatialReference": {
                        "wkid": 102100,
                        "latestWkid": 3857
                    },
                    "features": [
                        {
                            "attributes": {
                                "FID": 0,
                                "Id": 0
                            },
                            "geometry": {
                                "rings": [
                                    [
                                        [
                                            12895760.665251553,
                                            -3754980.687832646
                                        ],
                                        [
                                            12895774.872848857,
                                            -3754980.7207584456
                                        ],
                                        [
                                            12895774.751507085,
                                            -3755035.285140656
                                        ],
                                        [
                                            12895760.54079283,
                                            -3755035.2522147074
                                        ],
                                        [
                                            12895760.665251553,
                                            -3754980.687832646
                                        ]
                                    ]
                                ],
                                "spatialReference": {
                                    "wkid": 102100,
                                    "latestWkid": 3857
                                }
                            }
                        }
                    ]
                }
            }
        ],
        "showLegend": true
    }
}

 

This results in a shape with 5 vertices.

"features": [
				{
					"attributes": {
						"FID": 0,
						"Id": 0
					},
					"geometry": {
						"rings": [
							[
								[
									12895760.665251553,
									-3754980.687832646
								],
								[
									12895774.872848857,
									-3754980.7207584456
								],
								[
									12895774.751507085,
									-3755035.285140656
								],
								[
									12895760.54079283,
									-3755035.2522147074
								],
								[
									12895760.665251553,
									-3754980.687832646
								]
							]
						],
						"spatialReference": {
							"wkid": 102100,
							"latestWkid": 3857
						}
					}
				}
			]

 

Can anyone tell me why my input shape with 4 vertices has been distorted in such a way that it now has 5 vertices? Throughout these operations the spatial references have, to my knowledge, all been set to WKID: 102100, so I don't beleive any transformations (should) have been applied to the data.

Any help understanding what is happening here would be appreciated.

Thanks!

0 Kudos
0 Replies