Add tests for parsing esri feature servers

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2020-06-01 10:56:44 -06:00
rodzic e548bdd3c3
commit 222c4bb12b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
23 zmienionych plików z 673 dodań i 1 usunięć

Wyświetl plik

@ -0,0 +1,30 @@
{
"id" : "ffce8d3a-c21a-410b-9303-2b59875b76aa",
"name" : "do88dok2xjtucxd1_arcgis_rest_services_alexandria_va_addresses_featureserver",
"request" : {
"url" : "/Do88DoK2xjTUCXd1/arcgis/rest/services/Alexandria_VA_Addresses/FeatureServer?f=pjson",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "{\r\n \"currentVersion\" : 10.7, \r\n \"serviceItemId\" : \"1bd0c546d5cd42ddb21b67a8770f1ab6\", \r\n \"isView\" : true, \r\n \"isUpdatableView\" : true, \r\n \"sourceSchemaChangesAllowed\" : true, \r\n \"serviceDescription\" : \"\", \r\n \"hasVersionedData\" : false, \r\n \"supportsDisconnectedEditing\" : false, \r\n \"hasStaticData\" : false, \r\n \"hasSharedDomains\" : false, \r\n \"maxRecordCount\" : 1000, \r\n \"supportedQueryFormats\" : \"JSON\", \r\n \"supportsVCSProjection\" : false, \r\n \"capabilities\" : \"Query\", \r\n \"description\" : \"\", \r\n \"copyrightText\" : \"\", \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }, \r\n \"initialExtent\" : {\r\n \"xmin\" : -77.14924691073395, \r\n \"ymin\" : 38.772782594141539, \r\n \"xmax\" : -77.032025776479543, \r\n \"ymax\" : 38.862181232869133, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"fullExtent\" : {\r\n \"xmin\" : -77.143527926344575, \r\n \"ymin\" : 38.790392356423013, \r\n \"xmax\" : -77.037744760868918, \r\n \"ymax\" : 38.844571470587653, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"allowGeometryUpdates\" : true, \r\n \"units\" : \"esriDecimalDegrees\", \r\n \"supportsAppend\" : true, \r\n \"supportsSharedDomains\" : true, \r\n \"syncEnabled\" : false, \r\n \"supportsApplyEditsWithGlobalIds\" : false, \r\n \"supportsReturnDeleteResults\" : true, \r\n \"xssPreventionInfo\" : {\r\n \"xssPreventionEnabled\" : true, \r\n \"xssPreventionRule\" : \"InputOnly\", \r\n \"xssInputRule\" : \"rejectInvalid\"\r\n }, \r\n \"layers\" : [\r\n {\r\n \"id\" : 0, \r\n \"name\" : \"Alexandria_Addresses\", \r\n \"parentLayerId\" : -1, \r\n \"defaultVisibility\" : true, \r\n \"subLayerIds\" : null, \r\n \"minScale\" : 320000, \r\n \"maxScale\" : 0, \r\n \"geometryType\" : \"esriGeometryPoint\"\r\n }\r\n ], \r\n \"tables\" : []\r\n}",
"headers" : {
"Content-Type" : "text/plain; charset=utf-8",
"Cache-Control" : "public, max-age=30, s-maxage=30",
"Last-Modified" : "Tue, 19 May 2020 22:42:39 GMT",
"ETag" : "2052300429",
"Server" : "Microsoft-IIS/10.0",
"X-ArcGIS-Correlation-Id" : "|f49f6d17a708dc479be4188245742c9f.ac81e339_",
"X-ArcGIS-Instance" : "MTSDS_Web_IN_22",
"X-Powered-By" : "ASP.NET",
"Date" : "Mon, 01 Jun 2020 16:36:50 GMT",
"X-Cache" : "RefreshHit from cloudfront",
"Via" : "1.1 4b2d2d4c49521bf403522140b78283a1.cloudfront.net (CloudFront)",
"X-Amz-Cf-Pop" : "DEN50-C2",
"X-Amz-Cf-Id" : "YDZdndZ1tycmd_H71gCopxPSIxVgmCs8YSw3aAEg01XN-_B0x5iglw=="
}
},
"uuid" : "ffce8d3a-c21a-410b-9303-2b59875b76aa",
"persistent" : true,
"insertionIndex" : 33
}

Wyświetl plik

@ -0,0 +1,30 @@
{
"id" : "f5b30af0-0177-459b-ac7a-b4fc0be7d99a",
"name" : "do88dok2xjtucxd1_arcgis_rest_services_flagstaff_az_addresses_featureserver",
"request" : {
"url" : "/Do88DoK2xjTUCXd1/arcgis/rest/services/Flagstaff_AZ_Addresses/FeatureServer?f=pjson",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "{\r\n \"currentVersion\" : 10.7, \r\n \"serviceItemId\" : \"d3661b8ae03947899efcf7d1b1e848d3\", \r\n \"isView\" : true, \r\n \"isUpdatableView\" : true, \r\n \"sourceSchemaChangesAllowed\" : true, \r\n \"serviceDescription\" : \"\", \r\n \"hasVersionedData\" : false, \r\n \"supportsDisconnectedEditing\" : false, \r\n \"hasStaticData\" : false, \r\n \"hasSharedDomains\" : false, \r\n \"maxRecordCount\" : 1000, \r\n \"supportedQueryFormats\" : \"JSON\", \r\n \"supportsVCSProjection\" : false, \r\n \"capabilities\" : \"Query\", \r\n \"description\" : \"\", \r\n \"copyrightText\" : \"\", \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }, \r\n \"initialExtent\" : {\r\n \"xmin\" : -111.7006323013569, \r\n \"ymin\" : 35.114828043300058, \r\n \"xmax\" : -111.51533371464302, \r\n \"ymax\" : 35.256145916700071, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"fullExtent\" : {\r\n \"xmin\" : -111.70981941999996, \r\n \"ymin\" : 35.127538299000037, \r\n \"xmax\" : -111.53245605399997, \r\n \"ymax\" : 35.239775444000031, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"allowGeometryUpdates\" : true, \r\n \"units\" : \"esriDecimalDegrees\", \r\n \"supportsAppend\" : true, \r\n \"supportsSharedDomains\" : true, \r\n \"syncEnabled\" : false, \r\n \"supportsApplyEditsWithGlobalIds\" : false, \r\n \"supportsReturnDeleteResults\" : true, \r\n \"xssPreventionInfo\" : {\r\n \"xssPreventionEnabled\" : true, \r\n \"xssPreventionRule\" : \"InputOnly\", \r\n \"xssInputRule\" : \"rejectInvalid\"\r\n }, \r\n \"layers\" : [\r\n {\r\n \"id\" : 0, \r\n \"name\" : \"Flagstaff_addresses\", \r\n \"parentLayerId\" : -1, \r\n \"defaultVisibility\" : true, \r\n \"subLayerIds\" : null, \r\n \"minScale\" : 0, \r\n \"maxScale\" : 0, \r\n \"geometryType\" : \"esriGeometryPoint\"\r\n }\r\n ], \r\n \"tables\" : []\r\n}",
"headers" : {
"Content-Type" : "text/plain; charset=utf-8",
"Cache-Control" : "public, max-age=30, s-maxage=30",
"Last-Modified" : "Fri, 24 Apr 2020 15:51:21 GMT",
"ETag" : "2031666911",
"Server" : "Microsoft-IIS/10.0",
"X-ArcGIS-Correlation-Id" : "|2c370141abd248428ef6e69b293d9f11.c783cf6e_",
"X-ArcGIS-Instance" : "MTSDS_Web_IN_16",
"X-Powered-By" : "ASP.NET",
"Date" : "Mon, 01 Jun 2020 16:36:09 GMT",
"X-Cache" : "RefreshHit from cloudfront",
"Via" : "1.1 4b2d2d4c49521bf403522140b78283a1.cloudfront.net (CloudFront)",
"X-Amz-Cf-Pop" : "DEN50-C2",
"X-Amz-Cf-Id" : "ZRSFCywyLoG4IUD_WVCx4FsBIwhcBiykal-zBL-mTe7_PenanHk9Og=="
}
},
"uuid" : "f5b30af0-0177-459b-ac7a-b4fc0be7d99a",
"persistent" : true,
"insertionIndex" : 23
}

Wyświetl plik

@ -0,0 +1,30 @@
{
"id" : "4a594e6d-4b81-42ad-b547-39005f2a5f62",
"name" : "do88dok2xjtucxd1_arcgis_rest_services_franklincounty_buildings_featureserver",
"request" : {
"url" : "/Do88DoK2xjTUCXd1/arcgis/rest/services/FranklinCounty_buildings/FeatureServer?f=pjson",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "{\r\n \"currentVersion\" : 10.7, \r\n \"serviceItemId\" : \"27796b2f1f10470d87c036d2b40c8d64\", \r\n \"serviceDescription\" : \"This layer contains the pre-processed building polygons for Franklin County, Ohio to be added to OpenStreetMap.\", \r\n \"hasVersionedData\" : false, \r\n \"supportsDisconnectedEditing\" : false, \r\n \"hasStaticData\" : false, \r\n \"hasSharedDomains\" : false, \r\n \"maxRecordCount\" : 2000, \r\n \"supportedQueryFormats\" : \"JSON\", \r\n \"supportsVCSProjection\" : false, \r\n \"capabilities\" : \"Query\", \r\n \"description\" : \"\\u003cDIV STYLE=\\\"text-align:Left;font-size:12pt\\\"\\u003e\\u003cDIV\\u003e\\u003cP\\u003e\\u003cSPAN\\u003eThis layer contains the pre-processed building polygons for Franklin County, Ohio to be added to OpenStreetMap.\\u003c/SPAN\\u003e\\u003c/P\\u003e\\u003c/DIV\\u003e\\u003c/DIV\\u003e\", \r\n \"copyrightText\" : \"Franklin County, OH\", \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }, \r\n \"initialExtent\" : {\r\n \"xmin\" : -83.282235450462764, \r\n \"ymin\" : 39.760494183742104, \r\n \"xmax\" : -82.736029000784669, \r\n \"ymax\" : 40.177058256219688, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"fullExtent\" : {\r\n \"xmin\" : -83.257290901561248, \r\n \"ymin\" : 39.794679562712304, \r\n \"xmax\" : -82.76097354968617, \r\n \"ymax\" : 40.142872877249488, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"allowGeometryUpdates\" : true, \r\n \"units\" : \"esriDecimalDegrees\", \r\n \"supportsAppend\" : true, \r\n \"supportsSharedDomains\" : true, \r\n \"size\" : 411803648, \r\n \"syncEnabled\" : false, \r\n \"supportsApplyEditsWithGlobalIds\" : false, \r\n \"supportsReturnDeleteResults\" : true, \r\n \"editorTrackingInfo\" : {\r\n \"enableEditorTracking\" : false, \r\n \"enableOwnershipAccessControl\" : false, \r\n \"allowOthersToQuery\" : true, \r\n \"allowOthersToUpdate\" : true, \r\n \"allowOthersToDelete\" : false, \r\n \"allowAnonymousToQuery\" : true, \r\n \"allowAnonymousToUpdate\" : true, \r\n \"allowAnonymousToDelete\" : true\r\n }, \r\n \"xssPreventionInfo\" : {\r\n \"xssPreventionEnabled\" : true, \r\n \"xssPreventionRule\" : \"InputOnly\", \r\n \"xssInputRule\" : \"rejectInvalid\"\r\n }, \r\n \"layers\" : [\r\n {\r\n \"id\" : 0, \r\n \"name\" : \"Franklin_County_Buildings\", \r\n \"parentLayerId\" : -1, \r\n \"defaultVisibility\" : true, \r\n \"subLayerIds\" : null, \r\n \"minScale\" : 0, \r\n \"maxScale\" : 0, \r\n \"geometryType\" : \"esriGeometryPolygon\"\r\n }\r\n ], \r\n \"tables\" : []\r\n}",
"headers" : {
"Content-Type" : "text/plain; charset=utf-8",
"Cache-Control" : "public, max-age=30, s-maxage=30",
"Last-Modified" : "Thu, 28 May 2020 02:39:51 GMT",
"ETag" : "998550336",
"Server" : "Microsoft-IIS/10.0",
"X-ArcGIS-Correlation-Id" : "|3569b54d95eb004fb3f57de37946c2eb.c85f6638_",
"X-ArcGIS-Instance" : "MTSDS_Web_IN_26",
"X-Powered-By" : "ASP.NET",
"Date" : "Mon, 01 Jun 2020 16:36:45 GMT",
"X-Cache" : "RefreshHit from cloudfront",
"Via" : "1.1 4b2d2d4c49521bf403522140b78283a1.cloudfront.net (CloudFront)",
"X-Amz-Cf-Pop" : "DEN50-C2",
"X-Amz-Cf-Id" : "6_UOfvhEidG8Ax57VnxTVjtDf7YJ8Z8Vv-yR1JLe2bzB2eG_LZhDFQ=="
}
},
"uuid" : "4a594e6d-4b81-42ad-b547-39005f2a5f62",
"persistent" : true,
"insertionIndex" : 31
}

Wyświetl plik

@ -0,0 +1,30 @@
{
"id" : "757edf0f-0dc4-4b42-869e-1bc2cf3ecf31",
"name" : "do88dok2xjtucxd1_arcgis_rest_services_orange_county_ca_buildings_featureserver",
"request" : {
"url" : "/Do88DoK2xjTUCXd1/arcgis/rest/services/Orange_County_CA_Buildings/FeatureServer?f=pjson",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "{\r\n \"currentVersion\" : 10.7, \r\n \"serviceItemId\" : \"9ba701980ab94d8db87524ac6911f862\", \r\n \"isView\" : true, \r\n \"isUpdatableView\" : true, \r\n \"sourceSchemaChangesAllowed\" : true, \r\n \"serviceDescription\" : \"\", \r\n \"hasVersionedData\" : false, \r\n \"supportsDisconnectedEditing\" : false, \r\n \"hasStaticData\" : false, \r\n \"hasSharedDomains\" : false, \r\n \"maxRecordCount\" : 1000, \r\n \"supportedQueryFormats\" : \"JSON\", \r\n \"supportsVCSProjection\" : false, \r\n \"capabilities\" : \"Query\", \r\n \"description\" : \"\", \r\n \"copyrightText\" : \"\", \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }, \r\n \"initialExtent\" : {\r\n \"xmin\" : -117.88211576072339, \r\n \"ymin\" : 33.735592108734167, \r\n \"xmax\" : -117.88030887680031, \r\n \"ymax\" : 33.737522189288356, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"fullExtent\" : {\r\n \"xmin\" : -118.12928314353422, \r\n \"ymin\" : 33.381942817168351, \r\n \"xmax\" : -117.39614201190716, \r\n \"ymax\" : 33.9621048644816, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"allowGeometryUpdates\" : true, \r\n \"units\" : \"esriDecimalDegrees\", \r\n \"supportsAppend\" : true, \r\n \"supportsSharedDomains\" : true, \r\n \"syncEnabled\" : false, \r\n \"supportsApplyEditsWithGlobalIds\" : false, \r\n \"supportsReturnDeleteResults\" : true, \r\n \"xssPreventionInfo\" : {\r\n \"xssPreventionEnabled\" : true, \r\n \"xssPreventionRule\" : \"InputOnly\", \r\n \"xssInputRule\" : \"rejectInvalid\"\r\n }, \r\n \"layers\" : [\r\n {\r\n \"id\" : 0, \r\n \"name\" : \"Orange_County_Buildings\", \r\n \"parentLayerId\" : -1, \r\n \"defaultVisibility\" : true, \r\n \"subLayerIds\" : null, \r\n \"minScale\" : 160000, \r\n \"maxScale\" : 0, \r\n \"geometryType\" : \"esriGeometryPolygon\"\r\n }\r\n ], \r\n \"tables\" : []\r\n}",
"headers" : {
"Content-Type" : "text/plain; charset=utf-8",
"Cache-Control" : "public, max-age=30, s-maxage=30",
"Last-Modified" : "Thu, 28 May 2020 02:43:00 GMT",
"ETag" : "-1513483306",
"Server" : "Microsoft-IIS/10.0",
"X-ArcGIS-Correlation-Id" : "|b0293fee4207a146986fc77b3404f762.8f95b5b4_",
"X-ArcGIS-Instance" : "MTSDS_Web_IN_1",
"X-Powered-By" : "ASP.NET",
"Date" : "Mon, 01 Jun 2020 16:37:03 GMT",
"X-Cache" : "RefreshHit from cloudfront",
"Via" : "1.1 4b2d2d4c49521bf403522140b78283a1.cloudfront.net (CloudFront)",
"X-Amz-Cf-Pop" : "DEN50-C2",
"X-Amz-Cf-Id" : "5DRDMxs0G_McyvwFrt8QSpFrudtSn7H4dtTB_lKGAuPW1qSSMyUmig=="
}
},
"uuid" : "757edf0f-0dc4-4b42-869e-1bc2cf3ecf31",
"persistent" : true,
"insertionIndex" : 37
}

Wyświetl plik

@ -0,0 +1,30 @@
{
"id" : "1b8f292c-d3b0-4281-ad07-680b02579e6b",
"name" : "do88dok2xjtucxd1_arcgis_rest_services_riverside_ca_buildings_featureserver",
"request" : {
"url" : "/Do88DoK2xjTUCXd1/arcgis/rest/services/Riverside_CA_Buildings/FeatureServer?f=pjson",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "{\r\n \"currentVersion\" : 10.7, \r\n \"serviceItemId\" : \"37ff44d836fd4a2d9a80b609e3d589c6\", \r\n \"isView\" : true, \r\n \"isUpdatableView\" : true, \r\n \"sourceSchemaChangesAllowed\" : true, \r\n \"serviceDescription\" : \"\", \r\n \"hasVersionedData\" : false, \r\n \"supportsDisconnectedEditing\" : false, \r\n \"hasStaticData\" : false, \r\n \"hasSharedDomains\" : false, \r\n \"maxRecordCount\" : 1000, \r\n \"supportedQueryFormats\" : \"JSON\", \r\n \"supportsVCSProjection\" : false, \r\n \"capabilities\" : \"Query\", \r\n \"description\" : \"\", \r\n \"copyrightText\" : \"\", \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }, \r\n \"initialExtent\" : {\r\n \"xmin\" : -117.5146144105976, \r\n \"ymin\" : 33.844485330883067, \r\n \"xmax\" : -117.26599679190556, \r\n \"ymax\" : 34.034093431983059, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"fullExtent\" : {\r\n \"xmin\" : -117.54107499999998, \r\n \"ymin\" : 33.858206000000052, \r\n \"xmax\" : -117.26151999999996, \r\n \"ymax\" : 34.03057700100004, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"allowGeometryUpdates\" : true, \r\n \"units\" : \"esriDecimalDegrees\", \r\n \"supportsAppend\" : true, \r\n \"supportsSharedDomains\" : true, \r\n \"syncEnabled\" : false, \r\n \"supportsApplyEditsWithGlobalIds\" : false, \r\n \"supportsReturnDeleteResults\" : true, \r\n \"xssPreventionInfo\" : {\r\n \"xssPreventionEnabled\" : true, \r\n \"xssPreventionRule\" : \"InputOnly\", \r\n \"xssInputRule\" : \"rejectInvalid\"\r\n }, \r\n \"layers\" : [\r\n {\r\n \"id\" : 0, \r\n \"name\" : \"Riverside_buildings\", \r\n \"parentLayerId\" : -1, \r\n \"defaultVisibility\" : true, \r\n \"subLayerIds\" : null, \r\n \"minScale\" : 40000, \r\n \"maxScale\" : 0, \r\n \"geometryType\" : \"esriGeometryPolygon\"\r\n }\r\n ], \r\n \"tables\" : []\r\n}",
"headers" : {
"Content-Type" : "text/plain; charset=utf-8",
"Cache-Control" : "public, max-age=30, s-maxage=30",
"Last-Modified" : "Fri, 24 Apr 2020 15:26:47 GMT",
"ETag" : "-917103859",
"Server" : "Microsoft-IIS/10.0",
"X-ArcGIS-Correlation-Id" : "|51bfce8c109b994bb7a28544d39352e8.a8a777e_",
"X-ArcGIS-Instance" : "MTSDS_Web_IN_19",
"X-Powered-By" : "ASP.NET",
"Date" : "Mon, 01 Jun 2020 16:36:23 GMT",
"X-Cache" : "RefreshHit from cloudfront",
"Via" : "1.1 4b2d2d4c49521bf403522140b78283a1.cloudfront.net (CloudFront)",
"X-Amz-Cf-Pop" : "DEN50-C2",
"X-Amz-Cf-Id" : "KMfmDJNR0r65x0Xg5sYCeExYPqXoAMNd5daa0nOLWjuLLe2cP7NSjw=="
}
},
"uuid" : "1b8f292c-d3b0-4281-ad07-680b02579e6b",
"persistent" : true,
"insertionIndex" : 25
}

Wyświetl plik

@ -0,0 +1,30 @@
{
"id" : "7950efe2-fcb1-4457-9b3a-fd281eb49684",
"name" : "do88dok2xjtucxd1_arcgis_rest_services_sarpy_county_ne_addresses_featureserver",
"request" : {
"url" : "/Do88DoK2xjTUCXd1/arcgis/rest/services/Sarpy_County_NE_Addresses/FeatureServer?f=pjson",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "{\r\n \"currentVersion\" : 10.7, \r\n \"serviceItemId\" : \"9a0a7e1a462b44f0ad043e92fc72ddd3\", \r\n \"isView\" : true, \r\n \"isUpdatableView\" : true, \r\n \"preserveLayerIds\" : true, \r\n \"sourceSchemaChangesAllowed\" : true, \r\n \"serviceDescription\" : \"\", \r\n \"hasVersionedData\" : false, \r\n \"supportsDisconnectedEditing\" : false, \r\n \"hasStaticData\" : false, \r\n \"hasSharedDomains\" : false, \r\n \"maxRecordCount\" : 1000, \r\n \"supportedQueryFormats\" : \"JSON\", \r\n \"supportsVCSProjection\" : false, \r\n \"capabilities\" : \"Query\", \r\n \"description\" : \"\", \r\n \"copyrightText\" : \"\", \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }, \r\n \"initialExtent\" : {\r\n \"xmin\" : -96.35594832668562, \r\n \"ymin\" : 40.897946398790609, \r\n \"xmax\" : -95.84048423516316, \r\n \"ymax\" : 41.29106482737582, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"fullExtent\" : {\r\n \"xmin\" : -96.330894031134449, \r\n \"ymin\" : 40.99807955401792, \r\n \"xmax\" : -95.865538530714332, \r\n \"ymax\" : 41.190931672148515, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"allowGeometryUpdates\" : true, \r\n \"units\" : \"esriDecimalDegrees\", \r\n \"supportsAppend\" : true, \r\n \"supportsSharedDomains\" : true, \r\n \"syncEnabled\" : false, \r\n \"supportsApplyEditsWithGlobalIds\" : false, \r\n \"supportsReturnDeleteResults\" : true, \r\n \"xssPreventionInfo\" : {\r\n \"xssPreventionEnabled\" : true, \r\n \"xssPreventionRule\" : \"InputOnly\", \r\n \"xssInputRule\" : \"rejectInvalid\"\r\n }, \r\n \"layers\" : [\r\n {\r\n \"id\" : 1, \r\n \"name\" : \"Sarpy_County_Addresses\", \r\n \"parentLayerId\" : -1, \r\n \"defaultVisibility\" : true, \r\n \"subLayerIds\" : null, \r\n \"minScale\" : 0, \r\n \"maxScale\" : 0, \r\n \"geometryType\" : \"esriGeometryPoint\"\r\n }\r\n ], \r\n \"tables\" : []\r\n}",
"headers" : {
"Content-Type" : "text/plain; charset=utf-8",
"Cache-Control" : "public, max-age=30, s-maxage=30",
"Last-Modified" : "Sun, 17 May 2020 21:01:28 GMT",
"ETag" : "869591283",
"Server" : "Microsoft-IIS/10.0",
"X-ArcGIS-Correlation-Id" : "|41c34b04a88bce40b3e74799c02ccf53.a8a769f_",
"X-ArcGIS-Instance" : "MTSDS_Web_IN_19",
"X-Powered-By" : "ASP.NET",
"Date" : "Mon, 01 Jun 2020 16:36:39 GMT",
"X-Cache" : "RefreshHit from cloudfront",
"Via" : "1.1 4b2d2d4c49521bf403522140b78283a1.cloudfront.net (CloudFront)",
"X-Amz-Cf-Pop" : "DEN50-C2",
"X-Amz-Cf-Id" : "s4jvzvt6SVXiaO67P8FrkN5rl85bM04VYjEkhZ4h3-Rfx4kq_BfVzw=="
}
},
"uuid" : "7950efe2-fcb1-4457-9b3a-fd281eb49684",
"persistent" : true,
"insertionIndex" : 29
}

Wyświetl plik

@ -0,0 +1,30 @@
{
"id" : "1ab90e03-6781-4f0b-97c0-9e66b728c81c",
"name" : "do88dok2xjtucxd1_arcgis_rest_services_sarpy_county_ne_buildings_featureserver",
"request" : {
"url" : "/Do88DoK2xjTUCXd1/arcgis/rest/services/Sarpy_County_NE_Buildings/FeatureServer?f=pjson",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "{\r\n \"currentVersion\" : 10.7, \r\n \"serviceItemId\" : \"6c6eadce1c6444aa97bebe20bf0fe507\", \r\n \"isView\" : true, \r\n \"isUpdatableView\" : true, \r\n \"preserveLayerIds\" : true, \r\n \"sourceSchemaChangesAllowed\" : true, \r\n \"serviceDescription\" : \"\", \r\n \"hasVersionedData\" : false, \r\n \"supportsDisconnectedEditing\" : false, \r\n \"hasStaticData\" : false, \r\n \"hasSharedDomains\" : false, \r\n \"maxRecordCount\" : 1000, \r\n \"supportedQueryFormats\" : \"JSON\", \r\n \"supportsVCSProjection\" : false, \r\n \"capabilities\" : \"Query\", \r\n \"description\" : \"\", \r\n \"copyrightText\" : \"\", \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }, \r\n \"initialExtent\" : {\r\n \"xmin\" : -96.357334293042641, \r\n \"ymin\" : 40.8979083176391, \r\n \"xmax\" : -95.841354076957316, \r\n \"ymax\" : 41.291420368361024, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"fullExtent\" : {\r\n \"xmin\" : -96.333788256999981, \r\n \"ymin\" : 40.998342824000083, \r\n \"xmax\" : -95.864900112999962, \r\n \"ymax\" : 41.190985862000048, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"allowGeometryUpdates\" : true, \r\n \"units\" : \"esriDecimalDegrees\", \r\n \"supportsAppend\" : true, \r\n \"supportsSharedDomains\" : true, \r\n \"syncEnabled\" : false, \r\n \"supportsApplyEditsWithGlobalIds\" : false, \r\n \"supportsReturnDeleteResults\" : true, \r\n \"xssPreventionInfo\" : {\r\n \"xssPreventionEnabled\" : true, \r\n \"xssPreventionRule\" : \"InputOnly\", \r\n \"xssInputRule\" : \"rejectInvalid\"\r\n }, \r\n \"layers\" : [\r\n {\r\n \"id\" : 1, \r\n \"name\" : \"Sarpy_County_Buildings\", \r\n \"parentLayerId\" : -1, \r\n \"defaultVisibility\" : true, \r\n \"subLayerIds\" : null, \r\n \"minScale\" : 0, \r\n \"maxScale\" : 0, \r\n \"geometryType\" : \"esriGeometryPolygon\"\r\n }\r\n ], \r\n \"tables\" : []\r\n}",
"headers" : {
"Content-Type" : "text/plain; charset=utf-8",
"Cache-Control" : "public, max-age=30, s-maxage=30",
"Last-Modified" : "Sun, 17 May 2020 20:17:05 GMT",
"ETag" : "-189569333",
"Server" : "Microsoft-IIS/10.0",
"X-ArcGIS-Correlation-Id" : "|17ee85e28c7dfc43bd4ce4d7e7f336c4.4c15f059_",
"X-ArcGIS-Instance" : "MTSDS_Web_IN_21",
"X-Powered-By" : "ASP.NET",
"Date" : "Mon, 01 Jun 2020 16:36:32 GMT",
"X-Cache" : "RefreshHit from cloudfront",
"Via" : "1.1 4b2d2d4c49521bf403522140b78283a1.cloudfront.net (CloudFront)",
"X-Amz-Cf-Pop" : "DEN50-C2",
"X-Amz-Cf-Id" : "lGqTOwx17CXM2CIt9OhznvtFs_mHVZecOgJnxGBkX6BDBF73n-3V5A=="
}
},
"uuid" : "1ab90e03-6781-4f0b-97c0-9e66b728c81c",
"persistent" : true,
"insertionIndex" : 27
}

Wyświetl plik

@ -0,0 +1,30 @@
{
"id" : "66d2a4b2-09ce-46d3-b9c9-a0c7489fefab",
"name" : "do88dok2xjtucxd1_arcgis_rest_services_wb_zanzibar_buildings_featureserver",
"request" : {
"url" : "/Do88DoK2xjTUCXd1/arcgis/rest/services/WB_Zanzibar_Buildings/FeatureServer?f=pjson",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "{\r\n \"currentVersion\" : 10.7, \r\n \"serviceItemId\" : \"a4aa6891126544fd8f80d72f5cd88c19\", \r\n \"isView\" : true, \r\n \"isUpdatableView\" : true, \r\n \"sourceSchemaChangesAllowed\" : true, \r\n \"serviceDescription\" : \"\", \r\n \"hasVersionedData\" : false, \r\n \"supportsDisconnectedEditing\" : false, \r\n \"hasStaticData\" : false, \r\n \"hasSharedDomains\" : false, \r\n \"maxRecordCount\" : 1000, \r\n \"supportedQueryFormats\" : \"JSON\", \r\n \"supportsVCSProjection\" : false, \r\n \"capabilities\" : \"Query\", \r\n \"description\" : \"\", \r\n \"copyrightText\" : \"\", \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }, \r\n \"initialExtent\" : {\r\n \"xmin\" : 39.286003222427176, \r\n \"ymin\" : -5.74419491821114, \r\n \"xmax\" : 39.316219573065091, \r\n \"ymax\" : -5.7211504336860015, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"fullExtent\" : {\r\n \"xmin\" : 39.289190614176775, \r\n \"ymin\" : -5.7431377314019594, \r\n \"xmax\" : 39.313032181395613, \r\n \"ymax\" : -5.7222076213435695, \r\n \"spatialReference\" : {\r\n \"wkid\" : 4326, \r\n \"latestWkid\" : 4326\r\n }\r\n }, \r\n \"allowGeometryUpdates\" : true, \r\n \"units\" : \"esriDecimalDegrees\", \r\n \"supportsAppend\" : true, \r\n \"supportsSharedDomains\" : true, \r\n \"syncEnabled\" : false, \r\n \"supportsApplyEditsWithGlobalIds\" : false, \r\n \"supportsReturnDeleteResults\" : true, \r\n \"xssPreventionInfo\" : {\r\n \"xssPreventionEnabled\" : true, \r\n \"xssPreventionRule\" : \"InputOnly\", \r\n \"xssInputRule\" : \"rejectInvalid\"\r\n }, \r\n \"layers\" : [\r\n {\r\n \"id\" : 0, \r\n \"name\" : \"World_Bank_Zanzibar_Buildings\", \r\n \"parentLayerId\" : -1, \r\n \"defaultVisibility\" : true, \r\n \"subLayerIds\" : null, \r\n \"minScale\" : 160000, \r\n \"maxScale\" : 0, \r\n \"geometryType\" : \"esriGeometryPolygon\"\r\n }\r\n ], \r\n \"tables\" : []\r\n}",
"headers" : {
"Content-Type" : "text/plain; charset=utf-8",
"Cache-Control" : "public, max-age=30, s-maxage=30",
"Last-Modified" : "Tue, 26 May 2020 16:00:07 GMT",
"ETag" : "553716923",
"Server" : "Microsoft-IIS/10.0",
"X-ArcGIS-Correlation-Id" : "|6f2c759a9404634eb5f5d9db97a1d88a.4c15eeda_",
"X-ArcGIS-Instance" : "MTSDS_Web_IN_21",
"X-Powered-By" : "ASP.NET",
"Date" : "Mon, 01 Jun 2020 16:36:56 GMT",
"X-Cache" : "RefreshHit from cloudfront",
"Via" : "1.1 4b2d2d4c49521bf403522140b78283a1.cloudfront.net (CloudFront)",
"X-Amz-Cf-Pop" : "DEN50-C2",
"X-Amz-Cf-Id" : "tAbjIS6P5FJXn_8F0IdqMmdFtd3qFlqDlbPdQ-J0nGsa90bYmYVX_Q=="
}
},
"uuid" : "66d2a4b2-09ce-46d3-b9c9-a0c7489fefab",
"persistent" : true,
"insertionIndex" : 35
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -0,0 +1,33 @@
// License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.plugins.mapwithai.data.mapwithai;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.Arrays;
import java.util.Collection;
import org.junit.Rule;
import org.junit.Test;
import org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAIInfo.MapWithAIType;
import org.openstreetmap.josm.plugins.mapwithai.testutils.MapWithAITestRules;
public class MapWithAILayerInfoTest {
@Rule
public MapWithAITestRules rule = (MapWithAITestRules) new MapWithAITestRules().wiremock().projection();
@Test
public void testAddEsriLayer() {
// TODO wiremock
MapWithAIInfo info = new MapWithAIInfo("TEST", "test_url", "bdf6c800b3ae453b9db239e03d7c1727");
info.setSourceType(MapWithAIType.ESRI);
String tUrl = rule.getWireMock().baseUrl() + "/sharing/rest";
for (String url : Arrays.asList(tUrl, tUrl + "/")) {
info.setUrl(url);
Collection<MapWithAIInfo> layers = MapWithAILayerInfo.addEsriLayer(info);
assertFalse(layers.isEmpty());
assertTrue(layers.stream().noneMatch(i -> info.getUrl().equals(i.getUrl())));
assertTrue(layers.stream().allMatch(i -> MapWithAIType.ESRI_FEATURE_SERVER.equals(i.getSourceType())));
}
}
}

Wyświetl plik

@ -124,11 +124,20 @@ public class MapWithAITestRules extends JOSMTestRules {
}
private static void resetMapWithAILayerInfo() {
synchronized (MapWithAITestRules.class) {
synchronized (MapWithAILayerInfo.class) {
MapWithAILayerInfo.instance.clear();
MapWithAILayerInfo.instance.getDefaultLayers().stream().filter(MapWithAIInfo::isDefaultEntry)
.forEach(MapWithAILayerInfo.instance::add);
MapWithAILayerInfo.instance.save();
}
}
/**
* Get the wiremock instance
*
* @return The WireMock
*/
public WireMockServer getWireMock() {
return this.wireMock;
}
}