1

I have downloaded the hourly solar radiation data from NREL which is in CSV format but the problem is that the file does not have an exclusive column called latitude and longitude. There are 100s of CSV files like this and each file represents a latitude/longitude (we can say, point location). I have attached a screenshot of the file along with this post. I am not able to figure out how to import it in ArcGIS/QGIS.

The screenshot is for Bangalore city, India. The highlighted portion in red shows the latitude and longitude for the city. Can somebody please help me import this in ArcGIS/QGIS?

Screenshot of the sample file (click to magnify):

sample file

Please find the same file attached here: http://www.sendspace.com/file/m9t19n

This file represents hourly solar radiation data for a particular latitude longitude (in this case, Bangalore).

Clarification: Essentially I would like to perform a site suitability analysis for solar for the state of Karnataka, India. My understanding is that, I will have point locations of the station representing the excel file in question, as the attribute. Then I will extract those locations with a certain DNI value, then intersect it with the land use to determine suitability.

I want to have the location of the station as well as all the attributes mapped to the location in the excel. So one location will have the entire excel as the attribute table (.dbf for the shapefile) and so on.

  • Do you need the full attribute table (the full hourly data) in qgis, or do you only need to extract the stations positions? – til_b Apr 7 '14 at 11:21
  • I need the full attribute table(All the columns and rows in the excel file) – user23916 Apr 7 '14 at 11:22
  • You will end up with a timeseries of data (temporal)? What is the analysis you want to perform (GIS is for spatial data)? – Willy Apr 7 '14 at 11:34
  • Essentially I would like to perform a site suitability analysis for solar for the state of Karnataka, India. My understanding is that, I will have point locations of the station representing the excel file in question, as the attribute.Then I will extract those locations with a certain DNI value, then intersect it with the land use to determine suitability. – user23916 Apr 7 '14 at 11:41
  • I hope I was clear – user23916 Apr 7 '14 at 11:42
3

You could preprocess your data with a python script like the following:

import re

f = open("radwx_sample.csv","r")
# read file header
header = f.readline()
header_fields = header.split(",")

lat = header_fields[4].strip()
lon = header_fields[5].strip()
hgt = header_fields[6].strip()
print("llh: %s %s %s" % (lat,lon,hgt))

# next line is csv data header
csvheader = f.readline()

print("lat,lon,hgt,"+ csvheader)

# read data lines
for line in f.readlines():
    print("%s,%s,%s,%s" % (lat,lon,hgt,line.strip()))

f.close()
  • Can you please let me know how to batch process large no of CSV files in this case. My programming background is limited. – user23916 Apr 7 '14 at 11:45
  • 1
    @user23916 - If you don't have much programming knowledge this is going to be tough to do! This may be a better question for stackoverflow. – Simbamangu Apr 7 '14 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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