Create Sun Points Python Script

1612
11
10-03-2010 12:16 PM
ShaunWeston
Occasional Contributor
I have been recently checking out the new 3D templates located here: http://resources.arcgis.com/gallery/file/3dgis
I'm currently trying to get the Create Sun Points python script to work and I'm having some issues.
I've installed the required python packages and the script seems to run fine, however the output is not quite correct. The points only seem to be created till midday. So, I'm setting the start time to 7am and the end time to 6pm, but it's only creating five points at 7am, 8am, 9am, 10am and 11am. I'm not sure why it's not creating the afternoon sun points. I've tried playing round with the settings with no luck.

Has anyone been using this script or know how it's put together?
Tags (1)
0 Kudos
11 Replies
KhalidDuri1
Esri Contributor
Hello Shaun,

I apologize for the trouble you've experienced. Please use the attached script to generate the Sun sky map points instead of the one on the resource center link. That one will be updated with the one attached here shortly.
0 Kudos
AthenaWong
New Contributor II
Hello Shaun,

I apologize for the trouble you've experienced. Please use the attached script to generate the Sun sky map points instead of the one on the resource center link. That one will be updated with the one attached here shortly.


Hi, I also need some help here.
I've tried both the scripts (from resource and the attachment above), yet it keep returning me with the error message: There are no daylight times for the specified arguments.

I did a number of testings and realize, the problem might have to do with the time zones. (While the Eastern timezone works fine, error occurs on the western ones such as Hanoi, Tokyo, Hong Kong etc.) 

Can you please give me some helpful guides?? 
Thanks
0 Kudos
ShaunWeston
Occasional Contributor
Hi athena.nc,

Would you like to attach some screenshots and/or email me your FGDB you're working with?

Cheers
0 Kudos
AthenaWong
New Contributor II
Hi athena.nc,

Would you like to attach some screenshots and/or email me your FGDB you're working with?

Cheers


Hi Shaun,

Please see the attachment for the error message and sunmap parameters which I've entered.
Thanks!

Cheers,
Athena
0 Kudos
KhalidDuri1
Esri Contributor
Hello Athena,

Apologies for the delayed response, I've been meaning to get back to this thread. I had been unable to reproduce the behavior you've experienced, and was wondering if your input data may not have a spatial reference defined, or possibly has the wrong projection assigned to it. Can you please confirm that it is properly georeferenced by using some reference data (e.g. a basemap)?

If it is properly defined, please let me know if you can share the data or provide some information about what spatial reference your data is in and the extent of the feature class.

Regards,
Khalid
0 Kudos
AthenaWong
New Contributor II
Hi Kduri,

Thanks for your help in advance.  I've checked my data and everything is spatially referenced (Hong Kong 1980 Grid).
I would like to send you the copy of my sample data, however attachments can only be up to 2MB here, is there somewhere that I can send my data through?

Thanks!

Regards,
Athena
0 Kudos
KhalidDuri1
Esri Contributor
Hello Athena,

Can you export a small subset of the data, e.g. select one of the features and export it to a shapefile, then attach?

Regards,
Khalid
0 Kudos
maziyaryousefi
New Contributor II

hi  Kduri -esristaff - I think the Python code has a problem -Attach the corresponding image

0 Kudos
DanPatterson_Retired
MVP Emeritus

If cityengine is using python 3.x, then that may be due to differences between try except error raising between python 2 and 3

0 Kudos