codeant-ai-for-open-source[bot] commented on code in PR #37103:
URL: https://github.com/apache/superset/pull/37103#discussion_r2686870186
##########
superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries/jersey.geojson:
##########
@@ -0,0 +1,76 @@
+{"type": "FeatureCollection",
+"name": "jersey",
+"crs": {"type": "name", "properties": {"name":
"urn:ogc:def:crs:OGC:1.3:CRS84"}},
Review Comment:
**Suggestion:** The GeoJSON includes a top-level "crs" member; RFC 7946
forbids the CRS member and many modern GeoJSON consumers ignore or error on it
— remove the "crs" property to avoid interoperability issues. [possible bug]
**Severity Level:** Critical 🚨
```suggestion
```
<details>
<summary><b>Why it matters? ⭐ </b></summary>
RFC 7946 removed the top-level "crs" member; removing it improves
interoperability with modern GeoJSON parsers. The file's coordinates appear to
already be in lon/lat, so deleting the crs line is the correct, safe action.
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:**
superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries/jersey.geojson
**Line:** 3:3
**Comment:**
*Possible Bug: The GeoJSON includes a top-level "crs" member; RFC 7946
forbids the CRS member and many modern GeoJSON consumers ignore or error on it
— remove the "crs" property to avoid interoperability issues.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
```
</details>
##########
superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries/jersey.geojson:
##########
@@ -0,0 +1,76 @@
+{"type": "FeatureCollection",
+"name": "jersey",
+"crs": {"type": "name", "properties": {"name":
"urn:ogc:def:crs:OGC:1.3:CRS84"}},
+"features": [{"type": "Feature", "properties": {"ISO": "JE", "NAME_1":
"Jersey"},
+"geometry": {"type": "MultiPolygon",
+"coordinates": [[[[-83.8084227, 33.7186084], [-83.8084926, 33.7179995],
[-83.8085005, 33.7173877], [-83.8084464, 33.7167776],
+[-83.8083307, 33.7161735], [-83.8081542, 33.7155796], [-83.8079182,
33.7150002], [-83.8076242, 33.7144394], [-83.8072745, 33.7139012],
+[-83.8068715, 33.7133894], [-83.8064181, 33.7129077], [-83.8059175,
33.7124595], [-83.8053733, 33.712048], [-83.8047892, 33.7116761],
+[-83.8041696, 33.7113465], [-83.8035188, 33.7110615], [-83.8028415,
33.7108231], [-83.8021424, 33.7106331], [-83.8014265, 33.7104928],
+[-83.800699, 33.7104031], [-83.799965, 33.7103648], [-83.7992296, 33.7103781],
[-83.7984983, 33.7104429], [-83.7977761, 33.7105587],
+[-83.7970683, 33.7107247], [-83.7963797, 33.7109398], [-83.7957155,
33.7112024], [-83.7950801, 33.7115107], [-83.7944783, 33.7118623],
+[-83.7939143, 33.712255], [-83.793392, 33.7126857], [-83.7931025, 33.7130089],
[-83.7925195, 33.7136086], [-83.7921676, 33.7140898],
+[-83.7918616, 33.7145923], [-83.7916035, 33.7151129], [-83.7913947,
33.7156487], [-83.7912365, 33.7161964], [-83.7911299, 33.7167526],
+[-83.7910755, 33.717314], [-83.7910736, 33.7178772], [-83.7911243,
33.7184388], [-83.7912273, 33.7189955], [-83.7913818, 33.7195438],
+[-83.7915871, 33.7200805], [-83.7918418, 33.7206024], [-83.7921445,
33.7211062], [-83.7924932, 33.7215889], [-83.792886, 33.7220477],
+[-83.7933203, 33.7224797], [-83.7937937, 33.7228824], [-83.7943032,
33.7232534], [-83.7948458, 33.7235903], [-83.7954182, 33.7238912],
+[-83.7960169, 33.7241542], [-83.7966384, 33.7243778], [-83.7972788,
33.7245606], [-83.7979344, 33.7247015], [-83.7986012, 33.7247997],
+[-83.7992751, 33.7248545], [-83.7999521, 33.7248657], [-83.800628,
33.7248331], [-83.801299, 33.724757], [-83.8021552, 33.7245706],
+[-83.8026646, 33.7244604], [-83.803348, 33.7242343], [-83.804006, 33.7239611],
[-83.804634, 33.7236427], [-83.8052275, 33.7232814],
+[-83.8057823, 33.7228799], [-83.8062945, 33.7224408], [-83.8067603,
33.7219674], [-83.8071764, 33.721463], [-83.80754, 33.7209313],
+[-83.8078484, 33.7203759], [-83.8080995, 33.7198009], [-83.8082913,
33.7192104], [-83.8084227, 33.7186084]]], [[[-1.8930382, 49.3157189],
+[-1.9031219, 49.320521], [-1.9132055, 49.3253226], [-1.9232892, 49.3301238],
[-1.9333728, 49.3349245], [-1.9434565, 49.3397248],
+[-1.9535402, 49.3445245], [-1.9636238, 49.3493238], [-1.9737075, 49.3541226],
[-1.9837911, 49.358921], [-1.9938748, 49.3637189],
+[-2.0013751, 49.3705744], [-2.0088755, 49.377429], [-2.0163758, 49.3842826],
[-2.0238761, 49.3911352], [-2.0313765, 49.3979869],
+[-2.0388768, 49.4048376], [-2.0463772, 49.4116874], [-2.0538775, 49.4185362],
[-2.0613778, 49.4253841], [-2.0688782, 49.432231],
+[-2.0763785, 49.439077], [-2.0838788, 49.445922], [-2.0913792, 49.452766],
[-2.0988795, 49.4596091], [-2.1335686, 49.4074579],
+[-2.2176605, 49.3624676], [-2.2950459, 49.325767], [-2.3891134, 49.2959748],
[-2.4799491, 49.2644641], [-2.5605483, 49.219875],
+[-2.5587673, 49.2113967], [-2.5569864, 49.2029169], [-2.5552054, 49.1944356],
[-2.5534244, 49.1859529], [-2.5516435, 49.1774688],
+[-2.5498625, 49.1689832], [-2.5480815, 49.1604961], [-2.5463006, 49.1520076],
[-2.5445196, 49.1435176], [-2.5427386, 49.1350262],
+[-2.5409576, 49.1265333], [-2.5391767, 49.118039], [-2.5373957, 49.1095432],
[-2.5356147, 49.101046], [-2.5338338, 49.0925473],
+[-2.5320528, 49.0840471], [-2.5302718, 49.0755455], [-2.5284909, 49.0670424],
[-2.5267099, 49.0585379], [-2.5267097, 49.0497707],
+[-2.5267094, 49.041002], [-2.5267092, 49.0322317], [-2.5267089, 49.0234599],
[-2.5267087, 49.0146865], [-2.5267085, 49.0059116],
+[-2.5267082, 48.9971352], [-2.526708, 48.9883572], [-2.5267077, 48.9795776],
[-2.5267075, 48.9707965], [-2.5267073, 48.9620139],
+[-2.526707, 48.9532297], [-2.5267068, 48.9444439], [-2.5267065, 48.9356566],
[-2.5267063, 48.9268678], [-2.513812, 48.9243389],
+[-2.5009178, 48.9218099], [-2.4880235, 48.9192808], [-2.4751293, 48.9167515],
[-2.462235, 48.9142222], [-2.4493408, 48.9116926],
+[-2.4364465, 48.909163], [-2.4235523, 48.9066332], [-2.410658, 48.9041033],
[-2.3977638, 48.9015733], [-2.3848695, 48.8990431],
+[-2.3719752, 48.8965129], [-2.359081, 48.8939825], [-2.3461867, 48.8914519],
[-2.3332925, 48.8889213], [-2.3203982, 48.8863905],
+[-2.307504, 48.8838595], [-2.2946097, 48.8813285], [-2.2817155, 48.8787973],
[-2.2688212, 48.876266], [-2.255927, 48.8737346],
+[-2.2430327, 48.871203], [-2.229838, 48.8712032], [-2.2166433, 48.8712033],
[-2.2034486, 48.8712035], [-2.1902539, 48.8712036],
+[-2.1770592, 48.8712038], [-2.1638645, 48.871204], [-2.1506698, 48.8712041],
[-2.1374751, 48.8712043], [-2.1242804, 48.8712044],
+[-2.1110857, 48.8712046], [-2.097891, 48.8712047], [-2.0846963, 48.8712049],
[-2.0721961, 48.872601], [-2.0596959, 48.8739972],
+[-2.0471957, 48.8753932], [-2.0346955, 48.8767893], [-2.0221953, 48.8781853],
[-2.0096951, 48.8795812], [-1.9971949, 48.8809771],
+[-1.9846947, 48.882373], [-1.9847084, 48.8896646], [-1.9847088, 48.8969596],
[-1.9847091, 48.9042534], [-1.9847095, 48.9115462],
+[-1.9847099, 48.9188379], [-1.9847102, 48.9261286], [-1.9847106, 48.9334182],
[-1.984711, 48.9407067], [-1.9766107, 48.9453073],
+[-1.9685104, 48.9499074], [-1.9604101, 48.9545071], [-1.9523098, 48.9591064],
[-1.9442096, 48.9637052], [-1.9383905, 48.9707455],
+[-1.9325714, 48.9777849], [-1.9267523, 48.9848232], [-1.9209333, 48.9918606],
[-1.9151142, 48.9988969], [-1.9092951, 49.0059323],
+[-1.903476, 49.0129666], [-1.897657, 49.02], [-1.8923532, 49.0264138],
[-1.8870494, 49.0328268], [-1.8817457, 49.0392389], [-1.8764419, 49.0456503],
+[-1.8711381, 49.0520608], [-1.8658344, 49.0584705], [-1.8605306, 49.0648793],
[-1.8586856, 49.0732816], [-1.8568405, 49.0816825],
+[-1.8549955, 49.090082], [-1.8531504, 49.0984801], [-1.8513054, 49.1068768],
[-1.8494603, 49.115272], [-1.8476153, 49.1236658],
+[-1.8457703, 49.1320582], [-1.8439252, 49.1404492], [-1.8420802, 49.1488387],
[-1.8402351, 49.1572268], [-1.8383901, 49.1656135],
+[-1.836545, 49.1739988], [-1.8347, 49.1823827], [-1.8347002, 49.1908255],
[-1.8347005, 49.1992668], [-1.8347007, 49.2077067],
+[-1.834701, 49.2161451], [-1.8347012, 49.2245821], [-1.8347014, 49.2330177],
[-1.8347017, 49.2414518], [-1.8347019, 49.2498845],
+[-1.8411837, 49.2572038], [-1.8476655, 49.264522], [-1.8541473, 49.2718391],
[-1.8606291, 49.2791551], [-1.867111, 49.28647],
+[-1.8735928, 49.2937839], [-1.8800746, 49.3010966], [-1.8865564, 49.3084083],
[-1.8930382, 49.3157189]]], [[[-63.7173939, 45.6478777],
+[-63.7181845, 45.6496926], [-63.7141065, 45.6502539], [-63.7174392,
45.6563211], [-63.7169885, 45.6564377], [-63.7194249, 45.6608886],
+[-63.7143889, 45.6623019], [-63.7050444, 45.6619152], [-63.7026204,
45.6625444], [-63.6923378, 45.6638782], [-63.6930094, 45.6662319],
+[-63.6945098, 45.6715928], [-63.6958549, 45.6738303], [-63.7040053,
45.6755592], [-63.7028629, 45.6783631], [-63.7015215, 45.6839497],
+[-63.6934156, 45.6853937], [-63.6928972, 45.6898423], [-63.6984164,
45.6906577], [-63.6984093, 45.6908269], [-63.7053325, 45.690199],
+[-63.7049303, 45.6945355], [-63.7175631, 45.6958584], [-63.7189031,
45.6956252], [-63.7192126, 45.695622], [-63.7218011, 45.6950093],
+[-63.722113, 45.6949924], [-63.7222677, 45.6950367], [-63.7224835,
45.6949679], [-63.7229156, 45.6949527], [-63.7238237, 45.6948097],
+[-63.7244678, 45.6948411], [-63.7248346, 45.6949455], [-63.7272278,
45.6945944], [-63.727357, 45.6945594], [-63.7277326, 45.6943014],
+[-63.7283924, 45.6939732], [-63.7299017, 45.6933983], [-63.7304166,
45.6932843], [-63.7309827, 45.6932618], [-63.731699, 45.6934282],
+[-63.7322485, 45.6936119], [-63.7330825, 45.6936443], [-63.7331713,
45.6937076], [-63.7334304, 45.6937619], [-63.7338761, 45.6937687],
+[-63.7344971, 45.6936638], [-63.7345947, 45.6937035], [-63.741538,
45.6915727], [-63.7524673, 45.6888346], [-63.750996, 45.6859456],
+[-63.7636789, 45.6828758], [-63.7594493, 45.6754203], [-63.7588179,
45.6744797], [-63.7580207, 45.6735066], [-63.7568269, 45.6723389],
+[-63.7554678, 45.6712757], [-63.7454886, 45.6648412], [-63.7443851,
45.6639866], [-63.7437665, 45.663345], [-63.7432441, 45.6626315],
+[-63.7428502, 45.6618933], [-63.7425878, 45.6611505], [-63.7423356,
45.6611838], [-63.7421677, 45.6600696], [-63.7422563, 45.6589317],
+[-63.7351919, 45.6578872], [-63.734741, 45.657832], [-63.7342954, 45.657758],
[-63.7338579, 45.6576659], [-63.7330026, 45.6574406],
+[-63.7325859, 45.6573128], [-63.7321772, 45.6571715], [-63.7314025,
45.6568693], [-63.7310377, 45.6567094], [-63.7306834, 45.6565369],
+[-63.730342, 45.6563529], [-63.7300137, 45.6561572], [-63.7296907,
45.6559391], [-63.7293821, 45.655712], [-63.7290889, 45.6554752],
+[-63.7288099, 45.6552295], [-63.7285466, 45.6549748], [-63.7267378,
45.6530757], [-63.7238468, 45.6500291], [-63.7235857, 45.6498033],
+[-63.7230776, 45.6493427], [-63.7228319, 45.6491089], [-63.7225914,
45.6488715], [-63.7223185, 45.6486609], [-63.7220391, 45.6484556],
+[-63.7216096, 45.6481566], [-63.7214692, 45.6480651], [-63.7211621,
45.6478648], [-63.720858, 45.6476773], [-63.7205564, 45.6475061],
+[-63.7202495, 45.6473411], [-63.7199347, 45.6471833], [-63.7196136,
45.6470309], [-63.7192859, 45.6468846], [-63.718953, 45.6467456],
+[-63.7182588, 45.6464772], [-63.7178975, 45.6463488], [-63.7175297,
45.6462274], [-63.7171567, 45.6461151], [-63.7167797, 45.64601],
+[-63.7165227, 45.6459443], [-63.7173939, 45.6478777]]]]}}]}
Review Comment:
**Suggestion:** The geometry contains three entirely different polygons (one
in the US, one in the Channel Islands, one in Canada). This file is declared
for ISO "JE" (Jersey) but the coordinates include unrelated shapes; keep only
the polygon that belongs to Jersey to avoid rendering/fetching wrong geometries
and incorrect country mapping. [logic error]
**Severity Level:** Minor ⚠️
```suggestion
"coordinates": [[[[ -1.8930382, 49.3157189], [-1.9031219, 49.320521],
[-1.9132055, 49.3253226], [-1.9232892, 49.3301238], [-1.9333728, 49.3349245],
[-1.9434565, 49.3397248],
[-1.9535402, 49.3445245], [-1.9636238, 49.3493238], [-1.9737075,
49.3541226], [-1.9837911, 49.358921], [-1.9938748, 49.3637189],
[-2.0013751, 49.3705744], [-2.0088755, 49.377429], [-2.0163758, 49.3842826],
[-2.0238761, 49.3911352], [-2.0313765, 49.3979869],
[-2.0388768, 49.4048376], [-2.0463772, 49.4116874], [-2.0538775,
49.4185362], [-2.0613778, 49.4253841], [-2.0688782, 49.432231],
[-2.0763785, 49.439077], [-2.0838788, 49.445922], [-2.0913792, 49.452766],
[-2.0988795, 49.4596091], [-2.1335686, 49.4074579],
[-2.2176605, 49.3624676], [-2.2950459, 49.325767], [-2.3891134, 49.2959748],
[-2.4799491, 49.2644641], [-2.5605483, 49.219875],
[-2.5587673, 49.2113967], [-2.5569864, 49.2029169], [-2.5552054,
49.1944356], [-2.5534244, 49.1859529], [-2.5516435, 49.1774688],
[-2.5498625, 49.1689832], [-2.5480815, 49.1604961], [-2.5463006,
49.1520076], [-2.5445196, 49.1435176], [-2.5427386, 49.1350262],
[-2.5409576, 49.1265333], [-2.5391767, 49.118039], [-2.5373957, 49.1095432],
[-2.5356147, 49.101046], [-2.5338338, 49.0925473],
[-2.5320528, 49.0840471], [-2.5302718, 49.0755455], [-2.5284909,
49.0670424], [-2.5267099, 49.0585379], [-2.5267097, 49.0497707],
[-2.5267094, 49.041002], [-2.5267092, 49.0322317], [-2.5267089, 49.0234599],
[-2.5267087, 49.0146865], [-2.5267085, 49.0059116],
[-2.5267082, 48.9971352], [-2.526708, 48.9883572], [-2.5267077, 48.9795776],
[-2.5267075, 48.9707965], [-2.5267073, 48.9620139],
[-2.526707, 48.9532297], [-2.5267068, 48.9444439], [-2.5267065, 48.9356566],
[-2.5267063, 48.9268678], [-2.513812, 48.9243389],
[-2.5009178, 48.9218099], [-2.4880235, 48.9192808], [-2.4751293,
48.9167515], [-2.462235, 48.9142222], [-2.4493408, 48.9116926],
[-2.4364465, 48.909163], [-2.4235523, 48.9066332], [-2.410658, 48.9041033],
[-2.3977638, 48.9015733], [-2.3848695, 48.8990431],
[-2.3719752, 48.8965129], [-2.359081, 48.8939825], [-2.3461867, 48.8914519],
[-2.3332925, 48.8889213], [-2.3203982, 48.8863905],
[-2.307504, 48.8838595], [-2.2946097, 48.8813285], [-2.2817155, 48.8787973],
[-2.2688212, 48.876266], [-2.255927, 48.8737346],
[-2.2430327, 48.871203], [-2.229838, 48.8712032], [-2.2166433, 48.8712033],
[-2.2034486, 48.8712035], [-2.1902539, 48.8712036],
[-2.1770592, 48.8712038], [-2.1638645, 48.871204], [-2.1506698, 48.8712041],
[-2.1374751, 48.8712043], [-2.1242804, 48.8712044],
[-2.1110857, 48.8712046], [-2.097891, 48.8712047], [-2.0846963, 48.8712049],
[-2.0721961, 48.872601], [-2.0596959, 48.8739972],
[-2.0471957, 48.8753932], [-2.0346955, 48.8767893], [-2.0221953,
48.8781853], [-2.0096951, 48.8795812], [-1.9971949, 48.8809771],
[-1.9846947, 48.882373], [-1.9847084, 48.8896646], [-1.9847088, 48.8969596],
[-1.9847091, 48.9042534], [-1.9847095, 48.9115462],
[-1.9847099, 48.9188379], [-1.9847102, 48.9261286], [-1.9847106,
48.9334182], [-1.984711, 48.9407067], [-1.9766107, 48.9453073],
[-1.9685104, 48.9499074], [-1.9604101, 48.9545071], [-1.9523098,
48.9591064], [-1.9442096, 48.9637052], [-1.9383905, 48.9707455],
[-1.9325714, 48.9777849], [-1.9267523, 48.9848232], [-1.9209333,
48.9918606], [-1.9151142, 48.9988969], [-1.9092951, 49.0059323],
[-1.903476, 49.0129666], [-1.897657, 49.02], [-1.8923532, 49.0264138],
[-1.8870494, 49.0328268], [-1.8817457, 49.0392389], [-1.8764419, 49.0456503],
[-1.8711381, 49.0520608], [-1.8658344, 49.0584705], [-1.8605306,
49.0648793], [-1.8586856, 49.0732816], [-1.8568405, 49.0816825],
[-1.8549955, 49.090082], [-1.8531504, 49.0984801], [-1.8513054, 49.1068768],
[-1.8494603, 49.115272], [-1.8476153, 49.1236658],
[-1.8457703, 49.1320582], [-1.8439252, 49.1404492], [-1.8420802,
49.1488387], [-1.8402351, 49.1572268], [-1.8383901, 49.1656135],
[-1.836545, 49.1739988], [-1.8347, 49.1823827], [-1.8347002, 49.1908255],
[-1.8347005, 49.1992668], [-1.8347007, 49.2077067],
[-1.834701, 49.2161451], [-1.8347012, 49.2245821], [-1.8347014, 49.2330177],
[-1.8347017, 49.2414518], [-1.8347019, 49.2498845],
[-1.8411837, 49.2572038], [-1.8476655, 49.264522], [-1.8541473, 49.2718391],
[-1.8606291, 49.2791551], [-1.867111, 49.28647],
[-1.8735928, 49.2937839], [-1.8800746, 49.3010966], [-1.8865564,
49.3084083], [-1.8930382, 49.3157189]]]]}
```
<details>
<summary><b>Why it matters? ⭐ </b></summary>
The PR's GeoJSON indeed contains three spatially unrelated polygons (US
coords, Channel Islands coords, and Canada coords). Keeping only the Channel
Islands / Jersey polygon fixes a real logic bug where consumers would associate
wrong geometry with ISO "JE".
</details>
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:**
superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries/jersey.geojson
**Line:** 6:76
**Comment:**
*Logic Error: The geometry contains three entirely different polygons
(one in the US, one in the Channel Islands, one in Canada). This file is
declared for ISO "JE" (Jersey) but the coordinates include unrelated shapes;
keep only the polygon that belongs to Jersey to avoid rendering/fetching wrong
geometries and incorrect country mapping.
Validate the correctness of the flagged issue. If correct, How can I resolve
this? If you propose a fix, implement it and please make it concise.
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]