Skip to content

Instantly share code, notes, and snippets.

View raprasad's full-sized avatar

Raman Prasad raprasad

View GitHub Profile
@raprasad
raprasad / geoconnect_test.md
Last active May 11, 2017 12:46
geoconnect test
@raprasad
raprasad / update_geo_2017_0315.md
Created March 15, 2017 17:48
Update Dataverse geoconnect server

Please run the following SQL command against your Dataverse Postgres db

update worldmapauth_tokentype set 
mapitlink = 'https://geoconnect.datascience.iq.harvard.edu/shapefile/map-it', 
hostname='geoconnect.datascience.iq.harvard.edu' 
where name = 'GEOCONNECT';
@raprasad
raprasad / update_geo_2017_0315.md
Created March 15, 2017 17:48
Update Dataverse geoconnect server

Please run the following SQL command against your Dataverse Postgres db

update worldmapauth_tokentype set 
mapitlink = 'https://geoconnect.datascience.iq.harvard.edu/shapefile/map-it', 
hostname='geoconnect.datascience.iq.harvard.edu' 
where name = 'GEOCONNECT';
@raprasad
raprasad / verify_wm_layers.md
Last active March 23, 2017 21:32
Quick note on verifying WorldMap layers

Note: of these 3 points, the core question is in 3. Geoconnect uses a Dataverse API endpoint to delete any stale WorldMap layer metadata objects.

  • e.g. Is this the preferred method or use other options?

Current Approach

1. Add Dataverse API endpoint* to retrieve WorldMap layer metadata objects

@raprasad
raprasad / polystroke.md
Last active March 27, 2017 18:57
add polygon stroke
  • Update contrib/datavere_styles/style_rules_formatter.py

In def format_sld_xml(...), add the following after the line:

  • Existing line
        self.formatted_sld_xml = remove_whitespace_from_xml(xml_str)
@raprasad
raprasad / tab_thumb.md
Last active March 31, 2017 15:27
tabular thumbnail

Updates

Code snippets to make a map thumbnail available for a tabular file

This is only a partial solution

DataFileServiceBean.java

method: public boolean thumbnailSupported (DataFile file) {

@raprasad
raprasad / layer_delete.md
Last active April 18, 2017 15:04
delete layers for restricted files

Use case:

  • A Dataverse user takes an action on a file, such as restricting it, that requires the deletion of any existing WorldMap layers for that file
  • Delete path: Dataverse -> Geoconnect via API -> WorldMap via API -> layer deleted
  • This differs from other cases in that the Geoconnect UI is not used

Geoconnect connection to the Worldmap API

  • Geoconnect holds WorldMap credentials which allow it access to the WorldMap API
@raprasad
raprasad / pre-centroid.md
Last active April 24, 2017 15:08
initial sld

Initial SLD

<?xml version="1.0" encoding="UTF-8"?>
<sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0">
  <sld:NamedLayer>
    <sld:Name>centroid_tz9</sld:Name>
    <sld:UserStyle>
      <sld:Name>centroid_tz9</sld:Name>
      <sld:FeatureTypeStyle>
@raprasad
raprasad / geo_guide.md
Last active April 25, 2017 20:03
dev guide feedback
@raprasad
raprasad / user_guide_notes.md
Last active April 25, 2017 20:32
User Guide notes

Section: 3. Publish & Map Data

(suggested)

  • current: "You will then need to publish this new version of your dataset before you can use this button."
  • updated: "Next, publish this new version of your dataset to use the "Map Data" button."

Section: 6. View Results

  • Change end of 1st sentence: