tmackinnon.com - Canadian Geomatics Portfolio
  • Home
  • Dram Selection
  • Terms of Use
  • Cartography, GIS, and the Art of Map Making
  • GIS Mobile Mapping
  • GIS Web Mapping
  • Privacy Policy
  • Light Detection and Ranging (LiDAR)
  • tmackinnon Geospatial Resume
  • Search
  • Remote Sensing
  • Geographic Information Systems (GIS)
  • Geospatial Related Awards
  • Geospatial Publications
  • GIS and Geomatics
  • About Me
  • Contact Information
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu

Tag Archive for: batch export

PCI EASI Script [PIX_to_SHP_batch_export.eas]

January 6, 2008/in EASI Scripts

This simple EASI script used with the MODEL command in PCI will batch convert vector files stored in PCIDSK (PIX) format into Shape File (SHP) format with the exact same file name as the input files. This was originally created for PCI Geomatica v9.1 but was last tested and working with no problems in PCI Geomatica v10.0


!—————————————————————————-
!—————————————————————————-
!
! Batch Export PIX Vector to SHP Script
! [PIX_to_SHP_batch_export.eas]
!
! This script will export vector segments from PIX files located in a
! given directory into Shape files and place the new files into the same
! directory. The script assumes that no SHP files with the same names
! already exist and all the input files are setup the same with the
! vector segments stored the same.
!
!—————————————————————————-
!—————————————————————————-
! Define variables
!—————————————————————————-

!to store location of input & output files

local string in_files

!for the file format and extension types

local string type, ext

!file names

local string bn, fn

!to store directory listing of input files

local mstring dirlist

!to store vector segment number

local integer vec

local integer i

local $Z

!—————————————————————————-
! Clear the EASI window and then show the header information
!—————————————————————————-

PRINT @(1 ,1,CLREOS)

print “———————————————————————–”
print @reverse,” ‘Batch export PIX vector to SHP’ EASI Script “,@alloff
print “”
print “”
print “”
print “———————————————————————–”
print “”
print ” This script will export vectors from PIX files in a given directory ”
print ” into SHP format using the same file names as the input files. ”
print “”
print ” All input vector files are expected to be setup the same with all ”
print ” vectors to be exported, stored using the same segment number.”
print “”
print “———————————————————————–”
print “”

!—————————————————————————-
! Collect input from user
!—————————————————————————-

print “Enter the directory that contains the PIX files to export to SHP:”

input “>” in_files

print “Enter the vector segment number that the vector is stored in:”

input “>” vec

!——————————————————————-
! Get the contents of the directory
!——————————————————————-

type =”pix

dirlist = getdirectory(in_files)

let $Z = “\

for i = 1 to f$len(dirlist)

!——————————————————————-
! Extract parts of the filenames
!——————————————————————-

fn = in_files + $Z + dirlist[i]

ext = getfileextension(fn)

bn = getfilebasename(fn)

if (ext ~= type) then

print “”
print “Exporting:”, bn, “from PIX to SHP”
print “”

!—————————————————————-
! Set up the parameters and execute the FEXPORT command
!—————————————————————-

fili = in_files + $Z + dirlist[i]
filo = in_files + $Z + bn
dbiw =
dbic =
dbib =
dbvs = vec
dblut =
dbpct =
ftype =”SHP
foptions =

R Fexport

PRINT @(1 ,1,CLREOS)

endif

endfor

PRINT @(1 ,1,CLREOS)

print “——————————————————————-”
print “”
print @reverse,” ‘Batch export PIX vector to SHP’ EASI Script Finished “,@alloff
print “”
print “——————————————————————-”

return

!—————————————————————————-
!—————————————————————————-

https://tmackinnon.com/wp-content/uploads/PCI-geomatics.png 300 300 Ted MacKinnon https://tmackinnon.com/wp-content/uploads/tmackinnon_2022_4.png Ted MacKinnon2008-01-06 21:35:242014-05-22 07:01:45PCI EASI Script [PIX_to_SHP_batch_export.eas]
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Filter by Categories
2004 NB LIDAR project
3D Images
3D Modeling
AGRG
Arizona
Awards
Canada
Cartography
Central America
Data Integration
Digital Elevation Models
EASI Scripts
ERDAS
Flood Modeling
GIS
GPS
Granada
Image Gallery
International Travel
LIDAR
Managua
Masaya
Mobile Mapping
New Brunswick
Newfoundland
Nicaragua
North West Territories
Northern Ontario
Nunavut
Ontario
Other
Past Projects
PCI Geomatica
photogrammetry
Publications
RADARSAT
Remote Sensing
Resources
Rio Blanco
RS Software
Satellites
Spatial Modeling
Terrain Analysis
TITAN
Travel Blog
USA
Washington - DC
Web Sites Portfolio
Free Canadian Geospatial Resources
Download Canadian Open Data
Browse Canadian GIS Jobs
Canadian Geomatics News

Remote Sensing

  • Advocate Harbour Color Shaded Relief Map
    Advocate Harbour Color Shaded Relief MapJune 15, 2015 - 2:01 PM
  • Geomatics Acronyms and Abbreviations
    Geomatics Acronyms and AbbreviationsMay 30, 2014 - 6:44 AM
  • 3D Modeling with High Resolution LIDAR
    3D Modeling with High Resolution LiDARApril 24, 2014 - 1:42 PM
  • Color shaded reliefs utilize chromo stereoscopic techniques to help emphasize the depth of the Z dimension from traditional DEMs
    Color Shaded Relief ModelsJuly 3, 2012 - 9:31 AM

Cartography

  • Converting Decimal Degrees to Degrees Minutes Seconds
    Converting Decimal Degrees to Degrees Minutes SecondsDecember 29, 2017 - 8:36 AM
  • Advocate Harbour Color Shaded Relief Map
    Advocate Harbour Color Shaded Relief MapJune 15, 2015 - 2:01 PM
  • map showing UTM zones in Canada
    UTM Rows and ZonesFebruary 17, 2014 - 9:28 AM
  • Canadian using a UTM map
    Converting between UTM, MTM and LAT/LONGJuly 5, 2013 - 11:42 AM
Proud Supporter of the Royal Canadian Geographical Society
Proud to be a member of the Royal Canadian Geographical Society's College of Fellows

GIS

  • Time Zones in Google Earth
    Google Earth Time Zones ClockMarch 21, 2022 - 3:16 PM
  • Converting Decimal Degrees to Degrees Minutes Seconds
    Converting Decimal Degrees to Degrees Minutes SecondsDecember 29, 2017 - 8:36 AM
  • Geomatics Acronyms and Abbreviations
    Geomatics Acronyms and AbbreviationsMay 30, 2014 - 6:44 AM
  • Spatial Database Modeling of forest stands in Kejimkujik National Park
    Geomatics – GIS data base modelingMarch 5, 2014 - 11:30 AM
© Copyright tmackinnon.com
  • Link to X
  • Link to Instagram
  • Link to LinkedIn
  • Link to Facebook
  • Link to Pinterest
  • Link to Youtube
  • Link to Rss this site
  • Home
  • GIS and Geomatics
  • Contact
Scroll to top Scroll to top Scroll to top