benyamindsmith / starBliss

Create beautiful, print quality maps of the night sky in R
44 stars 2 forks source link

Potential inconsistencies in results #5

Closed laresbernardo closed 1 year ago

laresbernardo commented 1 year ago

I've tried to double check the results with mapsformoments output and it seems off (shouldn't they show the same?)

Screenshot 2023-01-20 at 8 11 04 AM

Also, not sure what to think about the line on the lower section. Do you have any documentation on how to interpret these?

benyamindsmith commented 1 year ago

@laresbernardo Just applied a fix to deal with longitude argument and it looks better:

plot_starmap(location="Caracas, Capital District,Venezuela",
             date="1992-02-29", 
             line1_text="Caracas, Capital District, Venezuela",
             line2_text= "February 29,1992") %>% 
    ggsave("ErrorPlot.png", plot = ., width = unit(10, 'in'), 
           height = unit(15, 'in'))

image

I looks like that there's an issue with the constellation lines joining in the proper order that MapsForMoments has. Thats why it still looks like that there are some inconsistencies.

benyamindsmith commented 1 year ago

@laresbernardo it also looks like there may be some projection issues as far as the map map is concerned.

laresbernardo commented 1 year ago

Using latest dev version, here's another reproducible example with 2 weird lines:

plot_starmap(
  location= "Caracas, Venezuela",
  date = as.Date("1991-03-17"),
  style = "black")
Screenshot 2023-01-21 at 10 18 16 PM
benyamindsmith commented 1 year ago

@laresbernardo yes this is definitely a problem . I reason its related to the problem Kim Fitter encountered when she was trying to plot the constellation maps. See here: https://kimnewzealand.github.io/2019/02/21/celestial-maps/

I think I need to convert the constellation linestrings to points, crop the "over reaching points" and re-convert it back to a linestrings for them to work.

I've been looking at st_crop() but it hasn't been working for our use case.

UPDATE: After looking into the issue I decided to bring the issue to StackOverflow for help (link).

benyamindsmith commented 1 year ago

@laresbernardo Check out the fix here- its based on the StackOverflow answer I got .

Let me know if there are still problems. Otherwise I will close this issue.

laresbernardo commented 1 year ago

Yeah, I think that did the trick! Love SO :)