Questions tagged [shapefile]

The Esri shapefile or simply a shapefile is a popular geospatial vector data format for geographic information systems (GIS) software. Questions about shapefiles are best asked on the GIS Stack Exchange.

For questions about shapefiles it is recommended that you research/ask at the GIS Stack Exchange.

Excerpt from Wikipedia:

The Esri Shapefile or simply a shapefile is a popular geospatial vector data format for geographic information systems software. It is developed and regulated by Esri as a (mostly) open specification for data interoperability among Esri and other software products.

Shapefiles spatially describe geometries: points, polylines, and polygons. Each item may also have attributes that describe the items.

A "shapefile" is actually a set of several files. Three individual files are mandatory to store the core data that comprises a shapefile: .shp, .shx, .dbf

1985 questions
4
votes
2 answers

Creating random polygons within a set shapefiles boundary in R

I have a shapefile which is the national boundary line of Chile. If possible, I would like to randomly generate e.g. 1000 polygons within this area. I'm wondering what the best way would be to go about this in R? I thought maybe, loading the…
JPD
  • 2,561
  • 5
  • 22
  • 26
4
votes
1 answer

Importing non-English shapefiles

I'm trying to import a shape-file like this: fn <- "Proj1" my_shp <- readShapeSpatial(fn) On a windows-computer (32-bit) it works ok, but when I do the same from a Ubuntu-machine (64-bit, English OS, R2.14.0), I get "Error in make.names(onames,…
Chris
  • 2,256
  • 1
  • 19
  • 41
4
votes
1 answer

Is there a performance rationale for mixing a binary file's endianness?

I'm writing a parser for the most common geographic data storage type, a collection of files called a "shapefile". This is my first project where I've had to think about endianness. It turns out that the geometry storage is mixed endian; some…
canisrufus
  • 665
  • 2
  • 6
  • 19
4
votes
1 answer

Getting "No SCHEMA dataset name was specified" while running FME script

While running the FME script I am encountering the following error message : No SCHEMA dataset name was specified (couldn't find a value for SCHEMA_2_DATASET' or SCHEMA_DATASET') I have upgraded to the new FME version 2021.2 from the old FME version…
Mritunjay
  • 71
  • 6
4
votes
1 answer

How to make continuous legend in ggplot2?

I have little query regarding the legend in ggplot2. How can I make legend in a continuous level from the attached code. In this code the legend is in discrete form I want to make it in continuous form (smooth continuous pattern) The code is…
user_3264
  • 107
  • 8
4
votes
2 answers

Creating Shape Files from SQL Server using Ogr2ogr

I am trying to run the following code in a command window. The code executes, but it gives me no values in the .SHP files. The table has GeographyCollections and Polygons stored in a Field of type Geography. I have tried many variations for the…
Tor Storli
  • 41
  • 1
  • 3
4
votes
1 answer

Unable to open datasource `' with the following drivers

I am trying to ensure I have geodjango properly installed so I can follow this tutorial. I have used Brew as my installer for Geodjango prequisites: postgresql, postgis, gdal, libgeoip. My gdal version is most recent: 3.1.2. However when I try to…
deadant88
  • 920
  • 9
  • 24
4
votes
1 answer

Error in st_normalize.sfc(x, c(x_range[1], y_range[1], x_range[2], y_range[2])) : domain must have a positive range

Background: I am using ggplot2 geom_point to map animal location points by week. As a basemap, I am using a shapefile from my computer. Here is an example of my data: datexample <- data.frame( "animal" = c("A","B"), "yearweek" = c(202028,…
cgxytf
  • 421
  • 4
  • 11
4
votes
0 answers

concave polygon into convex polygons using r

I am trying to split a concave polygon into convex polygons using r. I am trying to figure out how to successfully accomplish this for one polygon with the hopes of implementing this on a large number of polygons in an automated way. The only way…
sea83
  • 81
  • 5
4
votes
1 answer

specifying specific breaks in legend using ggplot2

library(raster) library(dplyr) library(ggplot2) get.shapefile.df <- function(shp.in, df.in, region.var){ require(sf) require(sp) require(plyr) require(ggplot2) shp.in@data$id <- rownames(shp.in@data) shp.in@data <- plyr::join(shp.in@data,…
89_Simple
  • 3,393
  • 3
  • 39
  • 94
4
votes
1 answer

Plot shapefile city borders on top of cartopy map

I'm trying to plot the outline of Bay Area city/town borders on top of a cartopy terrain map using a shapefile obtained here and following this example. For some reason, the borders don't show up, even when I specify borders are on top via zorder.…
Michael Boles
  • 369
  • 5
  • 15
4
votes
1 answer

Generate grid of latitude-longitude coordinates that fall within polygon

I'm trying to plot data onto a map. I would like to generate data for specific points on the map (e.g. transit times to one or more prespecified location) for a specific city. I found data for New York City here:…
lstbl
  • 527
  • 5
  • 17
4
votes
2 answers

how to import spatial data to mysql 8 (Mysql WorkBench 8.0)

I have been trying to load spatial data to mysql 8 db and seems like it is not working. the import data section basically does not move from 0% but the tables are created with null values on every columns. Anyone know why this is happening? The…
4
votes
1 answer

Add new column attribute to the shapefile and save it to database using Geotools Java

I am transforming a shapefile by adding a new column attributes. Since this task is performed using Java, the only option I know for now is using Geotools. I have 2 main concerns: 1. I am not able to figure out how do I actually add a new column…
GeoFresher
  • 301
  • 2
  • 12
4
votes
0 answers

Use custom map in Apache Superset Dashboard

Superset dashboards currently supports standard country maps (geojson) with ISO Codes. What would be the best way to import a custom map (like a forest map or an ocean map for example...) in order to display it on a Superset Dashboard? P.S. : the…
Jean Valet
  • 131
  • 1
  • 2
  • 7