| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This project provides a simple utility to generate SQL (or other format) queries from a JSON resource file containing region data.
mvn clean compile exec:java -Dexec.mainClass="Main"The input JSON file must be located at src/main/java/resources/region.json
Example Input:
{ "geometries": [ { "type": "Polygon", "properties": { "name": "Los Angeles", "zip": "90001", "state": "CA" }, "arcs": "78179, 78180, 78181, 78182, 78183, 78184" }, { "type": "Polygon", "properties": { "name": "San Diego", "zip": "92101", "state": "CA" }, "arcs": "79255, 79256, 79257, 79258, 79259, 79260, 79261" } ] }
When executed, the program generates the SQL file in a platform-specific directory:
Example Output:
INSERT INTO map.geometry (geometryType, regionName, zipCode, stateCode, arcs, idstatefk) VALUES
('Polygon','LOS ANGELES',90001,'CA','78179, 78180, 78181, 78182, 78183, 78184',5),
('Polygon','SAN DIEGO',92101,'CA','79255, 79256, 79257, 79258, 79259, 79260, 79261',5);
| Back | FazBrowse Home | New Git URL |