POST
|
I have found a workaround in which I develop a GPTool via Python API gis = GIS(_portal_url_) search_results = gis.content.search(_keyword_,"Feature Layer") lyrs = search_results[0] lyr = lyrs.layers[1] umlaute = "ABCäüö" add = {"attributes":{"PUNKTBESCHREIBUNG": umlaute},"geometry": {"x":2784373.041,"y":1187263.299,"z":9999.0}} add_result = lyr.edit_features(adds=[add],gdb_version=_myVersion_)
... View more
05-21-2021
02:18 AM
|
0
|
0
|
811
|
POST
|
Hoi Joe I work with Python 3, the example is with Python 2. I still tested with the following Conten-type headers={"Content-type": "application/json; charset=utf-8"} unfortunately also without success
... View more
05-20-2021
10:51 PM
|
0
|
0
|
812
|
POST
|
Cannot add Umlaut and other special characters into FeatureService via Python, via Browser and REST API works fine 1)Share a Feature Service. Use a referenced enterprise geodatabase. 2)Share FeatureService and MapService with everyone 3)a)Go to the service directory and add data: My URL: https://xxxxxxx/rest/services/test/PyTest/FeatureServer/0/addFeatures Featrues: [{"geometry":{"x" : 7.15, "y" : 47.15,"z":99.0},"attributes":{"UMLAUT":"ABCäüöèàéèëß"}}] b)Alternativ: Do an insert in ArcGIS Pro directly into the FeatureClass The result for both inserts is: ABCäüöèàéèëß 4)Execute the same on Python url = 'https://xxxxxxxxxx/rest/services/test/PyTest/FeatureServer/0/addFeatures'; features = '[{"geometry":{"x" : 7.15, "y" : 47.15,"z":99.0},"attributes":{"UMLAUT":"ABCäüöèàéèëß"}}]' gdbVersion = 'sde.default' format = 'json' The result is: ABCäüöèà éèëà def get_jsonfromurl_post(url, parameter={}): """ Gets a json from a url via a get with parameterlist Args: url: the url to call paramter: paramterd ictionary Returns: Json Raises: ConnectionError if there is no connction to the rest end point """ if "f" not in parameter: parameter.update({"f": "json"}) requests.packages.urllib3.disable_warnings(r_ex.InsecureRequestWarning) session = requests.Session() session.trust_env = False _params = parameter try: req = session.post( url=url, params=_params, auth=requests.auth.HTTPDigestAuth(os.environ["USERNAME"], False), verify=False, headers={"Content-type": "text/plain; charset=utf-8"}, ) except ConnectionError: _errmsg = "Could not get connection to {0} with parameterset {1}".format( url, str(parameter) ) raise except Exception as _e: _errmsg = "Exception while query featureservice {0}".format(_e) raise _e if req.status_code == 200: _json = req.json() if "error" not in _json: return json.loads(json.dumps(_json)) else: _errcode = _json["error"]["code"] _errmessage = _json["error"]["message"] _errdetails = _json["error"]["details"] raise ConnectionError( "Error while post featureservice with code {0}, {1}, {2}". format(_errcode, _errmessage, _errdetails[0]) ) else: _errmsg = "Exception while query featureservice with status {0}".format( req.status_code ) raise ConnectionError(_errmsg) parameter = {} parameter.update({"features": features}) parameter.update({"gdbVersion": gdbVersion}) parameter.update({"f": format}) print(get_jsonfromurl_post(url, parameter))
... View more
05-20-2021
07:44 AM
|
0
|
3
|
860
|
IDEA
|
I understand that you do not agree. I did my thought on our situation. There are ways to prevent this situation. We now and use them. Sorry to touch a sore spot. That's my last contribution to this idea.
... View more
11-17-2016
10:41 PM
|
0
|
0
|
777
|
IDEA
|
Example. One row with original geometry, a second with generalized geometry. You show now scale dependent the best geometry. You prevent data redundancy or the fact to define materialized views. There are solutions but it could be easier.
... View more
11-16-2016
11:03 PM
|
0
|
2
|
777
|
IDEA
|
It would be very handy if you can choose the spatial column when you add data to ArcMap if there are more as one. Copy and paste data between databases in ArcGIS—Help | ArcGIS for Desktop
... View more
11-15-2016
08:03 AM
|
2
|
7
|
838
|
IDEA
|
-->
We use the "XML Workspace Document" and "ArcGIS Diagrammer" to document and develop our datamodels. When we like to clone datamodels we do it also with XML Workspace Document. Unfortunately we can't export "Mosaic Datasets" in the XML-Document and we have lots of rasterdata. Extend them XML Workspace Document with the Mosaic Dataset would help us to be more efficient and when the ArcGIS Diagrammer supports this datatype, we can better model and document our datamodels.
... View more
06-17-2011
02:18 AM
|
10
|
0
|
403
|