1
$\begingroup$
ycData = 
  Dataset[
    Import[
     "https://geo.datav.aliyun.com/areas_v3/bound/640100_full.json", 
     "RawJSON"]]["features", All];
hlxData = ycData[5, Key["geometry"], Key["coordinates"], 1];

hlxGeoPlt = Quiet@GeoGraphics[
   {
    EdgeForm[Black],
    FaceForm[Red],
    Polygon@Map[GeoPosition, Map[Reverse, Normal@hlxData, {2}], {2}]
    },
   
   Frame -> True,
   FrameTicks -> All,
   GeoRange -> Quantity[30, "Miles"],
   GeoBackground -> None,
   ImageSize -> 700,
   BaseStyle -> {FontSize -> 12, FontFamily -> "Times New Roman", 
     Black},
   GeoScaleBar -> {"Imperial", "Kilometers"}
   ]

get this

enter image description here

I want to draw some points on the map,like this

enter image description here

This is a schematic. I don't actually know the exact point, so I have to find it manually,I used a tool that comes with Wolfram and found a few points myself

enter image description here

by hand I have find some point .

(*by hand*)
path1 = {
    {106.3032, 41.98753},
    {106.3096, 41.99726},
    {106.3096, 41.99726},
    {106.3184, 42.00899},
    {106.3286, 42.01981},
    {106.3494, 42.04681},
    {106.3638, 42.06126},
    {106.3682, 42.0741},
    {106.4294, 42.12032}
    } /. {{x_, y_} -> {y, x}};
(*plot*)
pathGeoPlt = GeoGraphics[
  {Red,
   PointSize[.01],
   Point@GeoPosition@path1},
  GeoBackground -> None]

enter image description here

I tried to add the points I found to my starting point image, but failed!

enter image description here

How should I do?

$\endgroup$

1 Answer 1

2
$\begingroup$

I am not sure how you copied the data by hand from the plot, but you got the wrong set of coordinates for the points you chose by hand. Use the "Get Coordinates" tool to select points (right click on the plot), then click on the points of interest, and copy them to clipboard (CTRL+C or equivalent in your system), move to a new insertion point and paste the selected points as GeoCoordinates objects (CTRL+V or equivalent). See this clip:

copy and paste from geographics

Now you have a list of points:

handpath = {
   GeoPosition[{38.72612538228502, 106.33815314973353`}, "ITRF00"], 
   GeoPosition[{38.70174707024354, 106.304069768805}, "ITRF00"], 
   GeoPosition[{38.71615344136305, 106.19187863991533`}, "ITRF00"], 
   GeoPosition[{38.71836954848582, 106.07258680666554`}, "ITRF00"]};

With those, and simplifying your code a little:

hlxData = 
  Query["features", 5, "geometry", "coordinates", 1, 1, Map@Reverse]@
   Import["https://geo.datav.aliyun.com/areas_v3/bound/640100_full.json", "RawJSON"];

GeoGraphics[
  {
    {EdgeForm[Black], FaceForm[Red], GeoPolygon[hlxData]},
    {Red, PointSize[0.01], Point@ handpath}
  },
  GeoGridRange -> All,
  Frame -> True, FrameTicks -> All, GeoRange -> Quantity[25, "Miles"], 
  GeoBackground -> None, ImageSize -> 700, 
  BaseStyle -> {FontSize -> 12, FontFamily -> "Times New Roman", Black}, 
  GeoScaleBar -> {"Imperial", "Kilometers"}
]

plot of region and points within it

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.