npm install --save-dev @babel/core @babel/preset-env npm run-script dev or npm run-script production npm run watch php artisan serve migrations to add..... alter table user_project_mapping add project_role int; CREATE TABLE IF NOT EXISTS roles (id serial PRIMARY KEY, role_id int NOT NULL, role_name VARCHAR (25) NULL); INSERT INTO roles ("id", "role_id", "role_name") VALUES (DEFAULT, 1, 'owner'); INSERT INTO roles ("id", "role_id", "role_name") VALUES (DEFAULT, 2, 'editor'); INSERT INTO roles ("id", "role_id", "role_name") VALUES (DEFAULT, 3, 'viewer'); owner can Edit and Delete entire project editor can do all front end editing viewer can only look at front end data import 'leaflet/dist/leaflet.css'; was missing from resources/js/components/Map/Map.js jeet seems to be using the pro version of font awesome, but there are no license keys in the code he pushed _________________________________ these could all be just issues that aren't issues because i messed with the data in the example files i'm using to do the imports INFILTRATION - for subcatch 1, i stored 0 and 50 at the end of line even though it wasn't in example1.inp - on 2, 4th column has 3.14 instead of 4.14 SUBCATCH - same thing, first item has values from other items for 4th field through end of record move landuses above coverages __________________________________ FIXED landuse must be before - fixed BUILDUP - fixed COVERAGES - fixed WASHUP - fixed BACKDROPS header should be BACKDROP - fixed VERTICESS should be VERTICES - fixed DONE - make migrations for.. alter table inp_subcatch rename to inp_subcatchment; alter table inp_evap rename to inp_evaporation; alter table inp_backdrop alter column option_value type varchar(100) using option_value::varchar(100); alter table inp_label alter column label type varchar(100) using label::varchar(100); alter table inp_storage alter column shape_parameters type varchar(100) using shape_parameters::varchar(100); alter table inp_control alter column control_value type varchar(100) using control_value::varchar(100); alter table inp_pattern alter column multipliers type varchar(100) using multipliers::varchar(100); alter table inp_lid_control alter column layer_parameters type varchar(100) using layer_parameters::varchar(100); alter table inp_map rename column dimensions to option_name; alter table inp_map rename column units to option_value; alter table inp_map alter column option_value type varchar(100) using option_value::varchar(100); alter table inp_conduit add max_flow varchar(25); alter table inp_weir rename column crest_ht_q_coeff to crest_ht; alter table inp_weir rename to inp_weir_original; CREATE TABLE IF NOT EXISTS INP_WEIR (id serial PRIMARY KEY, project_id VARCHAR (50) NOT NULL, name VARCHAR (25) NULL, from_node VARCHAR (25) NULL, to_node VARCHAR (25) NULL, type VARCHAR (25) NULL, crest_ht VARCHAR (25) NULL, q_coeff VARCHAR (25) NULL, gated VARCHAR (25) NULL, end_con VARCHAR (25) NULL, end_coeff VARCHAR (25) NULL, surcharge VARCHAR (25) NULL, road_width VARCHAR (25) NULL, road_surf VARCHAR (25) NULL); alter table inp_xsection add culvert varchar(25); alter table inp_inflow rename column concern_mass to type; alter table inp_inflow rename column conversion_factor to m_factor; alter table inp_inflow add s_factor varchar(25); alter table inp_inflow add baseline varchar(25); alter table inp_inflow add pattern varchar(25); ______________________________ this week. import INP file ignore all lines with ";;" at the start in tables with option_name, option_value, loop through and insert them one by one in other tables, do one insert per line look at [OUTFALLS] section in example1.inp, there is a long break, a skipped column, and then data for the column after that one. might have to do text delimiting from the start, do massive select case. if line starts with "[", then stay in that case statement until you see another "[". for each switch case, split the line into chunks based on start position for that column, get it all, then trim it. make API endpoint for import INP split it into layers of geojson store all INP data create INP from database tables dynamically (after the user edits certain layers) run simulations https://www.openswmm.org/Topic/19412/inp-parsing-using-php-to-generate-sql-or-postgis-inserts openswwm.org josh@fullcycle.io !NL!$unWTWlP file that runs swmm5 executable is Blockchianwater-Yii-master\controllers\SiteController.php sample geojson file with just features->geometry->coordinates[] https://api.jsonbin.io/b/5c99134f1707511ebd2bec03 type: "Polygon" type: "Feature" type: "FeatureCollection" on example2.inp, show jeet how 90408 is plotted as an example to what needs to be shown on the front end ______________________________ parts of INP file [TITLE] = project name new fields for projects table FLOW_UNITS INFILTRATION FLOW_ROUTING START_DATE START_TIME REPORT_START_DATE REPORT_START_TIME END_DATE END_TIME DRY_DAYS WET_STEP DRY_STEP ROUTING_STEP REPORT_STEP ALLOW_PONDING INERTIAL_DAMPING VARIABLE_STEP LENGTHENING_STEP MIN_SURFAREA COMPATIBILITY ______________________________ jeet needs an endpoint api.importdata sends post of (post GeoJson, projectID, layerName) (return success or fail) api.senddata getAllLayerMeta (post project_id) (return id, layerName) getAllLayers (post project_id) (return array of GeoJSON for all layers) getLayerbyID (post layer_id) (return GeoJSON for just one layer) CREATE TABLE users( user_id serial PRIMARY KEY, username VARCHAR (50) UNIQUE NOT NULL, password VARCHAR (50) NOT NULL, email VARCHAR (355) UNIQUE NOT NULL, created_on TIMESTAMP NOT NULL, last_login TIMESTAMP ); CREATE TABLE projects( project_id serial PRIMARY KEY, project_name VARCHAR (50) UNIQUE NOT NULL ); CREATE TABLE layers( layer_id serial PRIMARY KEY, project_id serial NOT NULL, layer_name VARCHAR (50) UNIQUE NOT NULL, geojson geometry(GeometryCollection,4326) ); CREATE TABLE user_project_mapping( user_project_mapping serial PRIMARY KEY, user_id serial , project_id serial NOT NULL ) EDIT ATTRIBUTES return json with layer data for selected layer (column headers in top row, data under that (or maybe there's a better way to format it so he knows what the column names are)) tab leafletjs from jeet.... "I’ll send you some of the resources I’ve explored/used and can also give you some sample files I’ve used this to convert shape file to geojson https://github.com/calvinmetcalf/shapefile-js Convert a Shapefile to GeoJSON. Not many caveats. Contribute to calvinmetcalf/shapefile-js development by creating an account on GitHub. This is the mapping library + some of the plugings https://leafletjs.com/plugins.html This is the demo I had showed you yesterday http://alpha.blockchainwater.ai/platform?prj=1 To test it, you can use http://geojson.io simply edit geojson map data" AWS Management Console Sign-in URL: https://730549969381.signin.aws.amazon.com/console User name: Joshthomos password: hh%jjEst9O(4 command line SWMM INP simulation https://github.com/blockchainwater/Blockchianwater-Yii/tree/master/swmm openswmm account josh@fullcycle.io !NL!$unWTWKNlP installed all postgis extensions on ubuntu https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postgis-on-ubuntu-14-04 didn't use the version specific stuff, just from sudo apt-get update sudo apt-get install postgis through the end SELECT admin, ST_Y(ST_Centroid(wkb_geometry)) as latitude FROM ne_110m_admin_0_countries ORDER BY latitude DESC LIMIT 10; psql -U postgres -d postgresgis -c "SELECT postgis_version()" shp2pgsql -I -s 4269 C:\MyData\roads\roads.shp roads | psql -U postgres -d psql -U postgres -d -f SHAPEFILE.sql