More

Unable to read different kind of shapefiles

Unable to read different kind of shapefiles


I have written the Java code to read the shapefile and insert it into the table. But the way I have written code it will accept only a multistring .shp file. It fails for other shapefile geometry types, e.g. polygon.

@RequestMapping(value = "/file.htm", method = RequestMethod.POST) public String fileUploaded(Model model, @Validated File file, BindingResult result) throws IOException, SchemaException { System.out.println("File Name is given below"); System.out.println("File Name is " +file.getFile().getOriginalFilename()); String returnVal = "successFile"; String fileLoc="D:SpringMVCFileUploadspringexamplesrcupload"+file.getFile().getOriginalFilename(); java.io.File newFile = new java.io.File(fileLoc); // if the directory does not exist, create it if (!newFile.getParentFile().exists()) { newFile.getParentFile().mkdirs(); } FileCopyUtils.copy(file.getFile().getBytes(), newFile); DataStore fileDataStore=FileDataStoreFinder.getDataStore(newFile); String typeName=fileDataStore.getTypeNames()[0]; SimpleFeatureCollection collection = fileDataStore.getFeatureSource(typeName).getFeatures(); SimpleFeatureIterator iterator=collection.features(); java.util.Map params = new java.util.HashMap(); params.put( "dbtype", "Oracle"); params.put( "host", "localhost"); params.put( "port", 1521); // params.put( "schema", "PUBLIC"); params.put( "database", "orcl"); params.put( "user", "mdsys"); params.put( "passwd", "mdsys"); DataStore dataStore=DataStoreFinder.getDataStore(params); SimpleFeatureSource featureSource= dataStore.getFeatureSource("COAST_TEST"); final SimpleFeatureType TYPE = DataUtilities.createType("COAST_TEST", "feature_id:Integer,GEOMETRY:MultiLineString,SCALERANK:Integer" ); SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(TYPE); int i=0; ListFeatureCollection dbCollection=new ListFeatureCollection(TYPE); while(iterator.hasNext()){ SimpleFeature feature=iterator.next(); featureBuilder.add(i++); featureBuilder.add(feature.getAttribute("the_geom")); featureBuilder.add(feature.getAttribute("scalerank")); SimpleFeature dbFeature = featureBuilder.buildFeature(null); dbCollection.add(dbFeature); } Transaction transaction = new DefaultTransaction("create"); if (featureSource instanceof SimpleFeatureStore) { SimpleFeatureStore featureStore = (SimpleFeatureStore) featureSource; featureStore.setTransaction(transaction); try { featureStore.addFeatures(dbCollection); transaction.commit(); } catch (Exception problem) { problem.printStackTrace(); transaction.rollback(); } finally { transaction.close(); } } else { System.out.println(typeName + " des not support read/write access"); System.exit(1); } if (result.hasErrors()) { // System.out.println("File Name is given below"); returnVal = "file"; } else { MultipartFile multipartFile = file.getFile(); // System.out.println("File Name is given below"); returnVal = "successFile"; } return returnVal; }

In the above code you will see that Simplefeaturetype object TYPE for table "COAST_TEST" geometry field accepts only multistring. How do I let that object have different type for geometry field based on the kind of shapefile I am uploading?


Usually you would ask the features to give you their schema using:

SimpleFeatureType schema = collection.getSchema();

You can then use that to generate the Oracle schema to write the data into.


Geographic Information Systems (GIS)/Database Specialist, OTI Ethiopia

Dexis is seeking a Geographic Information Systems (GIS)/Database Specialist to support a project with USAID’s Office of Transition Initiatives (OTI) in Ethiopia. This is a three-year contract to support activities that will strengthen democracy and national stability in Ethiopia.

The GIS/Database Specialist will manage and ensure data integrity as related to program activities, and will report to the Monitoring, Evaluation, and Learning (MEL) Manager. This is a full-time position based in Addis Ababa, Ethiopia, with an immediate start date.

USAID’s Office of Transition Initiatives’ (USAID/OTI) new support program aims to deliver fast and adaptable support that helps the Government of Ethiopia and civil society advance democratic reforms and enhance citizen engagement in the governance processes. Dexis Consulting Group (Dexis) will be USAID/OTI’s implementing partner in providing this assistance.

  • Maintain OTI Activity Database content, including quality control to ensure data integrity and compliance with OTI database standards.
  • Provide GIS information to the Program team, including the MEL Manager and MEL Specialists.
  • Direct GIS field and grant mapping support.
  • Interact with OTI/W GIS Unit as directed to ensure gathered data is compliant with established formats and OTI’s GIS/mapping standards.
  • Other responsibilities as assigned by the MEL Manager.

Minimum Requirements:

  • Bachelor’s degree or equivalent university degree in a relevant field.
  • Experience living and working in Ethiopia.
  • Strong analytical skills.
  • Strong written and oral communication skills.
  • Demonstrated knowledge of geospatial data from a wide array of sources, including finding data and compiling metadata.
  • Experience utilizing Geographic Information Systems (GIS) and other data analysis databases.
  • Ability to identify and develop creative and innovative approaches to monitor activity outcomes to support and improve activity design and implementation.
  • Capacity to understand and analyze the political and security context at the local, state, federal, and regional levels.
  • Ability to work with local, national, and international partners and third parties supporting M&E.
  • Ability to prioritize and manage a high-volume workload in a fast-paced work environment.
  • Experience working in environments experiencing political transition.
  • Fluency in written and spoken English and Amharic.

Converting infrastructure systems to geographic information systems

Geographic information systems’ ability to effectively manage and analyze spatial data makes it an ideal means for cities to manage their infrastructure systems. However, converting from paper maps and computer-aided design (CAD) drawings can be challenging with legacy data that often contains errors or potential missing data. A new paper in the Journal of Infrastructure Systems, “Smart Data Management of Urban Infrastructure Using Geographic Information Systems,” by Booma Sowkarthiga Balasubramani Mohamed Badhrudeen, A.M.ASCE Sybil Derrible, A.M.ASCE and Isabel Cruz, presents a smart data-management framework to successfully convert infrastructure maps from CAD to GIS.

Cities all over the world are converting maps of their infrastructure systems from legacy formats, such as paper maps and computer-aided design drawings, to geographic information systems. Compared with CAD, GIS tend to offer more flexibility in terms of managing, updating, analyzing, and processing data. Nonetheless, the conversion process to GIS can be extremely challenging from a technical point of view. Moreover, the original data in a legacy format often contain errors, and pieces of infrastructure are often missing. What is more, even once the conversion process is complete, the maintenance of the data and the fusion of the data set with other data sets can be challenging. Leveraging recent technological advances (such as machine learning and semantic reasoning), this paper proposes a framework to better manage infrastructure data. More specifically, a smart data-management protocol is presented to successfully convert infrastructure maps from CAD to GIS that includes a data-cleaning procedure in CAD and machine-learning algorithmic solutions to validate or suggest edits of the infrastructure once converted to GIS. In addition, the protocol includes elements of version control to keep track of how urban infrastructure evolves over time as well as a procedure to combine GIS infrastructure maps with other data sets (such as sociodemographic data) that can be used for optimal scheduling of asset maintenance and repair.


Vision 2020 & beyond: Growing role of Geographic Information System in transforming India

GIS technology has been applied across sectors, from agriculture, water, environment, healthcare, to town planning, which are many of the key priority areas identified by the Government.

GIS is one of the most enabling technologies today, it is disruptive and transformative and as India looks to become a $5 trillion technology, the role that GIS can play in various areas of governance should not be underestimated. Location Analytics and Machine Learning can help the nation in unlocking the full potential of the enormous amounts of data that gets generated in various government departments and ministries. We have already seen how the applications of GIS have helped in India’s growth story so far. Programs like Direct Benefit Transfer, Swachh Bharat, Smart cities, and government initiatives in Infrastructure Development, Water resources, Forest management, Mining, Electric and Gas Utilities, Telecommunications etc. have realized the benefits of GIS technology.

As per a study conducted by Geospatial Media and Communications the GIS adoption is expected to grow with a CAGR of over 13%. India’s improved remote sensing and image analysis capabilities together with the technical talent will help in wide-spread adoption of GIS across various state and central government departments.

Impact of GIS in 2019

GIS technology has been applied across sectors, from agriculture, water, environment, healthcare, to town planning, which are many of the key priority areas identified by the Government. While government is still the largest user of GIS, the acceptability of GIS in private sector, especially with easy access to cloud infrastructure, is increasing rapidly. Some of the key highlights of GIS applications across various public and private sectors for the year 2019 include the following:

Tackling water scarcity challenges: As per a recent Central Water Commission report, around 65% of reservoirs are drying in India. Also, the NITI Aayog’s Composite Water Management Index highlights worsening ground water condition in 21 major cities of the country which is expected to deplete to zero level by 2020. GIS has played a crucial role in enabling government efforts to improve water conditions across India.

Various water focused organizations such as Central Ground Water Board (CGWB) and Central Water Commission (CWC), mission mode programs by government such as Integrated Watershed Management Programme (IWMP), Interlinking of Rivers and National Mission for Clean Ganga have begun using GIS extensively. Many water utilities have adopted GIS to efficiently manage and maintain their water distribution networks, minimise leakages as well as non-revenue water.

Climate change and disaster management: Climate change is one of the key focus areas of the United Nations’ Sustainable Development Goals (SDGs). India has employed GIS technology for improved environment understanding, strategic decision making, monitoring of climate change and ascertaining future risks. As GIS optimizes planning, analyses and increases preparedness against calamities such as floods, landslides, earthquakes and so on, the National Disaster Management Authority (NDMA) has specially focussed on GIS technologies. In 2019, GIS was extensively used in emergency preparedness for cyclone Fani which helped save many lives. During Kerala floods, GIS was used extensively for post-disaster recovery, relief and rehabilitation efforts.

Urban transformation: Smart cities mission is one of the ambitious programs of the government under which 100 smart cities are being developed. In addition, modernization of 500 cities is planned under Atal Mission for Rejuvenation and Urban Transformation (AMRUT). GIS today powers digital transformation roadmap for the cities which includes core processes of urban local bodies and utilities in areas such as land management, property taxation, citizen engagement, and utility infrastructure planning and management. Cities such as Bhubaneswar have launched GIS based portals for citizen engagement as well as for sharing the progress of various city initiatives. At Municipal Corporation of Greater Mumbai (MCGM), GIS applications are deployed by 16 departments including Solid Waste Management, Development Planning, Roads and Traffic, Sewage, Water, Property Tax, Vigilance, Disaster Management Planning, Tree Authority, Healthcare, among others.

  • Manufacturing: In 2019, we saw higher adoption of GIS in the manufacturing sector. GIS helps manufacturing organizations in improving efficiency and reduction in cost. This is achieved through location analytics using the data available within the organization.
  • Agriculture insurance: Agriculture is a priority area for the Government. Farmers suffer when their crops are destroyed due to flooding, draught or other reasons. GIS technology is helping insurance companies in assessment of the damage to crops, and faster and accurate processing of insurance claims.

While all the sectors discussed are expected to continue stronger adoption of GIS technologies, some areas are expected to stand out in 2020.

Governance: Adoption of GIS technology-based applications is expected to help government at both state and national level in program implementation, monitoring and management. Programs launched by government for infrastructure development, urban transformation, healthcare, education, water and agriculture can benefit using GIS based dashboards. Today, lot of data comes through IoTs and other means, this data can be integrated with GIS systems and used by government departments for the identification of areas that require more support, delivery of services and monitoring the progress. GIS is also expected to help governments in improving their competitiveness and ease of doing business. We expect more GIS based portals to be launched in 2020 for data-sharing among government departments, and with citizens.

Agriculture: The application of remote sensing and GIS techniques in agriculture sector will significantly increase thereby enabling multi-stakeholder collaboration responsible for overall agricultural transformation. The use of GIS, integrated with IoT sensors and drones, will help with rapid, better and near real-time information. This real-time information combined with historical data, and emerging technologies such as artificial intelligence (AI) and machine learning (ML) will drive informed decision making to leverage best in class farming practices.

Healthcare: With massive programs such as Ayushman Bharat and Pradhan Mantri Jan Arogya Abhiyan being rolled out by the government, GIS systems are expected to support these programs for effective implementation. GIS can help in identifying the underserved locations for establishing the health and wellness centres and tracking the effectiveness of various initiatives such as child immunisations, management, control and pre-emptive steps taken to contain vector-borne diseases such as dengue and malaria.

Infrastructure: GIS is already a core component in major infrastructure development programs such as Bharatmala, Sagarmala, Ports Cities and utility programs like R-APDRP and City Gas Distribution. The integration with BIM, IoT devices and the use of GIS for project monitoring will further boost its use across this sector in 2020.

Mapping India: Last year we saw a major leap towards modernization of mapping practices and ensuring quick availability of authoritative data through portals like Bharat GeoHub. Automation of data creation & mapping and dissemination via service delivery platforms like Bharat GeoHub is expected to exponentially drive the utilization of GIS data for various initiatives by government, businesses as well as citizens. Survey of India has begun installation of CORS network (continuously operating reference stations) across India. This would improve location accuracy hence improving the overall data quality.

Implementations in telecommunication sector: Telecom operators in the country are looking to optimize their costs in 4G network installation and management. The planning for 5G rollout by major tele-companies is also expected to start in 2020 or 2021. The adoption of FTTx services is also expected to increase across the country. These will be the drivers for growth for the use of GIS in telecommunication.

GIS in private sector: GIS is expected to be adopted by the private sector at a whole new level. Various business segments such as banks, insurance companies, automobile, real-estate, construction, retail and logistics will benefit from implementing GIS. Applications of GIS are expected to grow across core business processes such as site selection, territory planning & optimization, dealer management, customer segmentation, optimization of distribution networks and supply chain.


Maps For Printing (Pdf Format)

Milepost Maps

The milepost maps display mileposts along the state highway system at 10 mile intervals (5 mile intervals for the Puget Sound enlargement) as well as mileposts at the junctions of state highways, along with county and region boundaries, to the nearest one hundredth of a mile.

State Base Maps

The state base map shows the state highway system, county boundaries and selected communities in two different sizes. The Puget Sound enlargement base map shows the state highway system, county boundaries and selected communities in two different sizes, but at a larger scale than the statewide map. The simple design allows for other highway information to be drawn on the map.

General Highway Map (State Wall Map)

The State Wall Map is a single-sheet map which includes all of Washington State, selected road information, geographical features and political boundaries.

Puget Sound View (pdf 2.1 mb)
(this has no legend, it pairs with the statewide map)

Other Maps Available in PDF Format:

Freight and Goods (FGTS) Maps : Freight and Goods Transportation System (FGTS) maps are provided to display tonnage volume classifications on county roads, city streets, and state highways. The state and Puget Sound maps show a generalized view and the county, urbanized area, and town (rural city) maps show more detail.
Please visit the Freight and Goods (FGTS) home page to select from their list of maps.


Aquifers

An aquifer is a body of porous rock or sediment saturated with groundwater. Groundwater enters an aquifer as precipitation seeps through the soil. It can move through the aquifer and resurface through springs and wells.

Earth Science, Geology, Social Studies

Aquifer House

A water well system next to a house, showing how aquifers are an important source of water.

An aquifer is a body of rock and/or sediment that holds groundwater. Groundwater is the word used to describe precipitation that has infiltrated the soil beyond the surface and collected in empty spaces underground.

There are two general types of aquifers: confined and unconfined. Confined aquifers have a layer of impenetrable rock or clay above them, while unconfined aquifers lie below a permeable layer of soil.

Many different types of sediments and rocks can form aquifers, including gravel, sandstone, conglomerates, and fractured limestone. Aquifers are sometimes categorized according to the type of rock or sediments of which they are composed.

A common misconception about aquifers is that they are underground rivers or lakes. While groundwater can seep into or out of aquifers due to their porous nature, it cannot move fast enough to flow like a river. The rate at which groundwater moves through an aquifer varies depending on the rock&rsquos permeability.

Much of the water we use for domestic, industrial, or agricultural purposes is groundwater. Most groundwater, including a significant amount of our drinking water, comes from aquifers. In order to access this water, a well must be created by drilling a hole that reaches the aquifer. While wells are manmade points of discharge for aquifers, they also discharge naturally at springs and in wetlands.

Groundwater can become depleted if we use it at a faster rate than it can replenish itself. The replenishment of aquifers by precipitation is called recharging. Depletion of aquifers has increased primarily due to expanding agricultural irrigation. Groundwater can become contaminated when an excessive amount of pesticides and herbicides are sprayed on agricultural fields, septic tanks leak, or landfills are improperly lined or managed and toxic materials seep through the soil into the aquifer.

Aquifers naturally filter groundwater by forcing it to pass through small pores and between sediments, which helps to remove substances from the water. This natural filtration process, however, may not be enough to remove all of the contaminants.

A water well system next to a house, showing how aquifers are an important source of water.


Unable to read different kind of shapefiles - Geographic Information Systems

#!/usr/bin/python2.4 # # Copyright 2007 The Python-Twitter Developers # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. '''A library that provides a Python interface to the Twitter API'''


16 Answers 16

Is it possible that the lines are ^M-terminated? This is a potential issue when moving files from Windows to UNIX systems. One easy way to check is to use vi in "show me the binary" mode, with vi -b /etc/apache2/domain.ssl/domain.ssl.crt/domain.com.crt .

If each line ends with a control-M, like this

you've got a file in Windows line-terminated format, and apache doesn't love those.

Your options include moving the file over again, taking more care or using the dos2unix command to strip those out you can also remove them inside vi, if you're careful.

Edit: thanks to @dave_thompson_085, who points out that this answer no longer applies in 2019. That is, Apache/OpenSSL are now tolerant of ^M-terminated lines, so they don't cause problems. That said, other formatting errors, several different examples of which appear in the comments, can still cause problems check carefully for these if the certificate has been moved across systems.



Global Roads

Downloads

Center for International Earth Science Information Network - CIESIN - Columbia University, and Information Technology Outreach Services - ITOS - University of Georgia. 2013. Global Roads Open Access Data Set, Version 1 (gROADSv1). Palisades, NY: NASA Socioeconomic Data and Applications Center (SEDAC). https://doi.org/10.7927/H4VD6WCT. Accessed DAY MONTH YEAR.

* When authors make use of data they should cite both the data set and the scientific publication, if available. Such a practice gives credit to data set producers and advances principles of transparency and reproducibility. Please visit the data citations page for details. Users who would like to choose to format the citation(s) for this dataset using a myriad of alternate styles can copy the DOI number and paste it into Crosscite's website.

&dagger For EndNote users, please check the Research Note field for issues with importing authors that are organizations when using the ENW file format.

The global and regional data are available as zip files in Esri Geodatabases (.gdb) format. The shapefiles (.shp) are for the regional data only. Downloaded files need to be uncompressed in a single folder using either WinZip (Windows file compression utility) or similar application before they can be accessed by your GIS software package. Users should expect an increase in the size of downloaded data after decompression.

The data are stored in geographic coordinates of decimal degrees based on the World Geodetic System spheroid of 1984 (WGS84). Users should consult the gROADSv1 documentation for complete information on the data set.


Topographic Information

Geoscience Australia's National Geographic Information Group is the Australian Government's national mapping agency. We provide authoritative geographic information services and products to enable evidence-based decision making, deliver government policy, assist industry development needs and support community wellbeing. More about our capabilities.

Digital Topographic Data
Map data for use in Geographic Information System (GIS) applications is available in varying scales. It is free to download or can be purchased on digital media. Theme and Reference Maps
Reference maps of Australia include wall maps, folio and report maps and general reference maps. Thematic maps include external territories, tourist maps, maritime zones and more.