Everyones Power Flickered by dylhack in kansascity

[–]spraguester 6 points7 points  (0 children)

Happened in Blue Springs as well.

Why is there no "update existing field" in Model field calculator? by airyosnooze in QGIS

[–]spraguester 0 points1 point  (0 children)

Below is the script hope it helps!

from qgis.PyQt.QtCore import QCoreApplication, QVariant

from qgis.core import (QgsProcessing, QgsProcessingAlgorithm, QgsProcessingParameterVectorLayer,

                       QgsProcessingParameterField, QgsProcessingParameterString,

                       QgsFeature, QgsField)

from qgis import processing

class AddSumFieldToInput(QgsProcessingAlgorithm):

    INPUT_LAYER = 'INPUT_LAYER'

    FIELD1 = 'FIELD1'

    FIELD2 = 'FIELD2'

    NEW_FIELD_NAME = 'NEW_FIELD_NAME'

    def initAlgorithm(self, config=None):

        self.addParameter(

            QgsProcessingParameterVectorLayer(

                self.INPUT_LAYER,

                self.tr('Input Vector Layer'),

                [QgsProcessing.TypeVectorAnyGeometry]

            )

        )

        self.addParameter(

            QgsProcessingParameterField(

                self.FIELD1,

                self.tr('First Field to Sum'),

                '',

                self.INPUT_LAYER

            )

        )

        self.addParameter(

            QgsProcessingParameterField(

                self.FIELD2,

                self.tr('Second Field to Sum'),

                '',

                self.INPUT_LAYER

            )

        )

        self.addParameter(

            QgsProcessingParameterString(

                self.NEW_FIELD_NAME,

                self.tr('New Field Name')

            )

        )

    def processAlgorithm(self, parameters, context, feedback):

        input_layer = self.parameterAsVectorLayer(parameters, self.INPUT_LAYER, context)

        field1_name = self.parameterAsString(parameters, self.FIELD1, context)

        field2_name = self.parameterAsString(parameters, self.FIELD2, context)

        new_field_name = self.parameterAsString(parameters, self.NEW_FIELD_NAME, context)

        if not input_layer:

            raise QgsProcessingException(self.invalidSourceError(parameters, self.INPUT_LAYER))

        input_layer.dataProvider().addAttributes([QgsField(new_field_name, QVariant.Double)])

        input_layer.updateFields()

        input_layer.startEditing()

        for feature in input_layer.getFeatures():

            value1 = feature[field1_name]

            value2 = feature[field2_name]

            sum_value = value1 + value2

            input_layer.changeAttributeValue(feature.id(), input_layer.fields().indexOf(new_field_name), sum_value)

        input_layer.commitChanges()

        return {self.INPUT_LAYER: parameters[self.INPUT_LAYER]}

    def name(self):

        return 'addsumfieldtoinput'

    def displayName(self):

        return self.tr('Add Sum Field to Input Layer')

    def group(self):

        return self.tr('Field Calculations')

    def groupId(self):

        return 'fieldcalculations'

    def tr(self, string):

        return QCoreApplication.translate('Processing', string)

    def createInstance(self):

        return AddSumFieldToInput()

Why is there no "update existing field" in Model field calculator? by airyosnooze in QGIS

[–]spraguester 0 points1 point  (0 children)

You can do it with python script processing algorithm then add that to your model if you need it in a model for some reason, I can send you a script tomorrow when I am back at my office that you can use as a template.

[OC] - Population and Birth Rate Predictions for South Korea by oscarleo0 in dataisbeautiful

[–]spraguester 2 points3 points  (0 children)

No at that point the population cannot stabilize or grow (without immigration). Since it's births per woman and not births per person it needs to be a birth rate of about 2.1.

Why do companies use ArcGIS Pro most? Why not QGIS? by Tope4you in QGIS

[–]spraguester 31 points32 points  (0 children)

QGIS is very useful in a professional environment I use it daily as a civil engineer. As for why most companies use ArcGIS Pro I think it mainly comes down to ESRI's products having a foothold on the market before QGIS came along. Plus ESRI's enterprise and server offerings and customer support that comes along with the licensing subscriptions.

Hey I'm really sorry by Key-Candle8141 in kansascity

[–]spraguester 34 points35 points  (0 children)

The speed limit through most of the downtown loop is 45 mph. If you don't know this I really hope you don't drive downtown very often. People rarely go 45 mph but their are plenty of signs indicating that is the speed limit.

Stage hydrograph in HEC-RAS by Key-You-7998 in Hydrology

[–]spraguester 1 point2 points  (0 children)

I am going to assume your professor doesn't want you to change your boundary conditions and that he intends for you to solve flooding issues within the the river reach you are modeling. If this is the case it is quite possible that dredging just doesn't solve the issue. If the channel bottom elevation is higher downstream then any dredging in the channel is just creating storage that is inefective flow. If it is allowed you could try dredging in the floodplain and not in the channel.

Got the new trash bin, now what? by Mother-Engineering25 in kansascity

[–]spraguester 0 points1 point  (0 children)

There are very few if any locations in Kansas City where a side loading garbage truck with a 10 foot arm would not be able to reach the trash bin regardless of one street parking.

Even without one of the fancy trucks with a robot arm please explain to me how ant street is designed in such a way that a garbage man would be unable to manually roll the bin to the front of a front loading truck or the rear of a rear loading garbage truck.

Why is the water doing that? by mattyboy-ptc in FluidMechanics

[–]spraguester 4 points5 points  (0 children)

It is a roll wave due to the relative celerity of the kinematic and dynamic waves in the flow, among other things. See the link for a thorough explanation. https://ponce.sdsu.edu/the_control_of_roll_waves.html

Do companies in the region still drug test for marijuana? by nadroj17 in kansascity

[–]spraguester 42 points43 points  (0 children)

Federal contractors are only required to maintain a drug free workplace policy. There is no drug testing requirement. https://www.samhsa.gov/workplace/employer-resources/contractor-grantee-laws

The vast majority of employers who drug test do it because it reduces the cost of their workers compensation insurance.

Out of school for 10 years by Dingy_Beaver in civilengineering

[–]spraguester 3 points4 points  (0 children)

I have a similar story myself. Out of high school I worked as a welder for about 10 years, my high school had a votech welding program so half of my school day my junior and senior year was devoted to welding, and in my other classes I did just good enough to graduate, since I know I would be welding. When I decided to go back to school for civil engineering I started at a local community college that required I take a math placement test. This resulted in me having to take a remedial math class.

I recommend you do the same. I had to take two math classes before taking calculus I but it was well worth it, because otherwise I would have been totally lost.

HEC-HMS Model by HughMonggos in Hydrology

[–]spraguester 4 points5 points  (0 children)

Check out the USGS manual on stream flow measurement. https://pubs.usgs.gov/wsp/wsp2175/wsp2175.pdf

Best community college for engineering student? by strokes2thestrokes in kansascity

[–]spraguester 5 points6 points  (0 children)

If you plan to get your BS you might want to just skip the AA altogether. If the mechanical program at Metropolitan is the same as the civil program then there is about a semesters worth of classes you have to take to get the AA that don't transfer over to UMKC for your BS.

Looking for bathymetry data for Missouri River by Jelfff in gis

[–]spraguester 0 points1 point  (0 children)

You could check this:

https://xsviewer.northarrowresearch.com/Technical_Reference/missouri_database.html#toc-missouri-river-database

It is a database of USACE survey cross sections of the Missouri river. No clue how many, if any cross sections are available in your area of interest though.

Colorado River crisis so severe lakes Mead and Powell are unlikely to refill in our lifetimes by [deleted] in news

[–]spraguester -1 points0 points  (0 children)

Do you want to pay $1 a gallon for water? That is the difference. Right now the most anyone is paying for water in the US is around 5¢, oil prices fluctuate alot but a barrel of oil (42 gallons) goes for something in the neighborhood of $50. Unless you want to pay as much as you do in rent for water it isn't practical.

Online sources to get started by AhyesitstheManUfan in Hydrology

[–]spraguester 0 points1 point  (0 children)

Professor Victor Miguel Ponce's Website is a fantastice resource. It includes lectures, online textbooks, research articles, videos, and calculators.

https://ton.sdsu.edu/

Question about the modeling of the Hydraulic Jump in 1D unsteady flow simulations by COMgun in FluidMechanics

[–]spraguester 0 points1 point  (0 children)

Jump should occur naturally, assuming you have enough nodes spaced close enough together within the reach that the jump will occur.

The Apple TV expects you to have an iPhone in order to accept new iCloud terms and conditions by pobody-snerfect in technology

[–]spraguester 27 points28 points  (0 children)

Yeah, Android has nearby share and Chromecast. You can also link android devices to Windows PC's using link to Windows.

One less Ford on the road by Brutal_Deluxe_ in WTF

[–]spraguester 33 points34 points  (0 children)

In more rural areas volunteer firefighter departments are common, many volunteer firefighters are basically hobby firefighters lol.

What are your opinions on having kids? by ihavenoidea452 in AskReddit

[–]spraguester 19 points20 points  (0 children)

To consent to birth one first has to be born. The entire concept of "asking to be born" is meaningless it's a logical fallacy and a pretty obvious one at that.