Questions tagged [geojsonio]

24 questions
3
votes
1 answer

Export SpatialPolygonsDataFrame as geojson or topojson in R

I am trying to convert a geojson of London local authorities into a hex cartogram where each hexagon represents one local authority. It works in R but when I try to export the generated hexgrid as geojson or topojson I get the following error: Error…
console.log
  • 177
  • 2
  • 16
2
votes
1 answer

Creating GEOJSON files in R using GEOJSON_WRITE

I am new to geospatial data and I am trying to convert a csv to GEOJSON using geojsonio and sf packages. I want my output to be in this format { "type": "FeatureCollection", "features": [ { …
brad7192
  • 21
  • 3
2
votes
2 answers

How to preserve IDs with geojsonio package?

I am trying to read a topoJSON file generated with geojsonio package: https://raw.githubusercontent.com/pachamaltese/chilemaps/master/data-raw/r15_arica_y_parinacota.json Here's a preview of the relevant part on first entry in that…
pachadotdev
  • 3,345
  • 6
  • 33
  • 60
1
vote
1 answer

How to create a geojson file from an image overlay?

I am looking for a way to create a geojson file from the distributions of the health sectors in my region which are different than any political division readily available on osm: There are fantastic tools such as geojson.io to draw custom polygons…
G. Macia
  • 1,204
  • 3
  • 23
  • 38
1
vote
0 answers

Convert edit_feature into an sp object

Drawing a polygon using R leaflet, how can the drawn object be converted into an sp object? The goal is to use it for filtering spatial points. library(leaflet.extras) library(sp) library(geojsonio) # Define UI ui <- fluidPage( useShinyjs(), …
Vlad
  • 3,058
  • 4
  • 25
  • 53
1
vote
1 answer

Parsing GeoJSON Data to Polygon using Java

I have following Geo JSON file data which i want to parse in Polygon(using java) Geo JSON File [ { "_id": "58a58bf685979b5415f3a39a", "updatedAt": "2017-03-27T14:04:34.470Z", "createdAt": "2017-02-16T11:24:38.375Z", "__v": 0, …
Arun Kumar
  • 6,534
  • 13
  • 40
  • 67
1
vote
0 answers

Read a geojson file with mixed geometries geojsonio::geojson_read

I am trying to create a chorpleth of Belgium in shiny (R) using this geojson file (github view). I am following the tutorial of rstudio to get the basics right. While doing this I encountered the following error while trying to use the…
Robin VdE
  • 77
  • 2
  • 8
1
vote
1 answer

display() in geojsonio gives 401 error

I am trying to Visualize a geojson file. import geojsonio as gj contents = open("taluk.geojson").read() gj.display(contents) But it gives the below error: AuthenticationFailed Traceback (most recent call…
Tom J Muthirenthi
  • 3,028
  • 7
  • 40
  • 60
1
vote
1 answer

How to draw polygons sharing exact same edges (borders) using Leaflet Draw

Using geojson.io page I want to draw some districts/countries. I'm drawing each district separately as there is no multipolygons in Leaflet Draw. However when I'm drawing the borders even with maximum zoom - the borders will never be exactly the…
Pawel Stadnicki
  • 403
  • 3
  • 9
1
vote
1 answer

How to load properties table of topojson in R as a dataframe?

I'm trying to read the properties table into r as a dataframe. I'm using geojsonio. library('geojsonio') Then I load my topojson file. house_map <- topojson_read("./tl_2016_us_cd115/tl_2016_us_cd115_simplify.topojson") That is all good. Now I have a…
Union find
  • 7,759
  • 13
  • 60
  • 111
0
votes
0 answers

Why is there no output for mapview() command in R 4.2.2 (August 2023)?

After installing the "mapview" package in R 4.2.2 and importing its library into a Jupyter notebook, I cannot create any maps. Although the data is loaded, any attempt to render a map figure when running a code block results in no output and no…
0
votes
0 answers

How to avoid the right (info) sidebar when I open geojson.io via API?

I've written a Python function to open a geojson.io page with JSON data following these instructions. My function works fine but, when I call it, I can't stop the right info sidebar (the bar that shows the JSON data) from appearing. Is there a way…
0
votes
1 answer

Convert a geojson file to data.frame (from Eurostat) and make a map

I am trying to convert an Eurostat's geojson file here to a dataframe using packages geojsonio and broom, but when the file is converted into the dataframe using the broom::tidy() function many of the columns in the geojson file are not converted…
Bruno Guarita
  • 767
  • 10
  • 21
0
votes
0 answers

Not able to properly convert the osm data to geojson with osm2geojson on python

I am running into an issue when converting osm data to geoJson data using osm2geojson. Here is a piece of code that I am using to convert the data. ` def get_osm_geometry(osm_id): retries_left = OSM_RETRIES while retries_left: …
0
votes
0 answers

geojsonio::geojson_read error for a geojson file "conversion from feature type sfc_GEOMETRY to sp is not supported"

I downloaded a geojson file of Iraq's electrical grid from EnergyData. You can download the file yourself here: https://development-data-hub-s3-public.s3.amazonaws.com/ddhfiles/145188/electric-network-iraq.geojson and visit the webpage…
1
2