In a blow to environmentalists’ efforts to stop pollution from large hog farms, a North Carolina judge has thrown out two lawsuits against Smithfield Foods, the nation’s biggest pork producer. The superior court judge ruled that the plaintiffs — environmental groups and river users — lacked standing in the case and had not shown that the alleged wrongdoing damaged them directly enough to warrant a court challenge. The plaintiffs, who said they would appeal the ruling, counter that pollution-free rivers are a birthright for citizens. They hope to force Smithfield to clean up pollution in three rivers and stop using open pits to store hog waste. The company faces similar lawsuits in three other states in federal court.