Message Boards Message Boards

Show polygon of ESRI shp file on satellite image

Posted 9 days ago

Hi, I'm trying to show the outline of a NZ land title in shp format on a satellite image.
I can import the shp file but i can't see how to show just the edge of the titles.

imported shp file

I thought it would be something like

GeoGraphics[titles, FaceForm[ Opacity[1.] ], EdgeForm[{Red, Thick}], Background -> "Satellite"]

but that just comes up error.
Any help appreciated, there doesn't seem to be a gentle introduction to GIS with Mathematica.

POSTED BY: Joe Gamman
3 Replies
Posted 4 days ago

Thanks, i got the GIS guy at work to generate a shp file that is OK to post to a public forum - the title surrounding Taranaki, a beautiful mountain in NZ.

The upload wouldn't accept a .zip or the .shx component of the shapefile triplet - i don't think the two i've attached are usable without it.

shapefile = Import["/Users/admin/Documents/Taranaki shp.shp"]

works fine enter image description here


fails: GeoPolygon is not a Graphics primitive or directive.

I've tried everything suggested from ChatGPT3.5 and they all fail. I'm using mma v12.1.1.0

Weirdly, even the non-shapefile suggestion by Arnoud Buzing failed - all I got was a street map image of Auckland: GeoPolygon is not a Graphics primitive or directive.

POSTED BY: Joe Gamman

It would be easier if you shared your data file, but maybe this works for you (I can't try it out myself, because I don't have your data file):

    EdgeForm[{Red, Thick}], 
    GeoPolygon[ Entity["AdministrativeDivision", {"Auckland", "NewZealand"}]]
POSTED BY: Arnoud Buzing

Attaching your data to the post would be helpful.

POSTED BY: Sam Carrettie
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract